<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
Dismiss
Skip Navigation

Limitations of Matrix Multiplication

Number of columns must match number of rows to multiply matrices

Atoms Practice
Estimated6 minsto complete
%
Progress
Practice Limitations of Matrix Multiplication
 
 
 
MEMORY METER
This indicates how strong in your memory this concept is
Practice
Progress
Estimated6 minsto complete
%
Practice Now
Turn In
Limitations of Matrix Multiplication

Mr. Hwan writes the following matrix on the board and asks his students to write down a matrix that they could multiply this matrix by.

\begin{align*}\begin{bmatrix} -3 & 1\\ 2 & 0\\ 4 & -3 \end{bmatrix}\end{align*}

Wanda writes the matrix \begin{align*}\begin{bmatrix} -1 & 2\\ 5 & 3\\ 0 & -2 \end{bmatrix}\end{align*}

Xavier writes the matrix \begin{align*}\begin{bmatrix} 2 & -3\\ 7 & 1 \end{bmatrix}\end{align*}

Zach writes the matrix \begin{align*}\begin{bmatrix} -4 & 1 & 0\\ 8 & 5 & -3 \end{bmatrix}\end{align*}

"One of you has made a mistake," Mr. Hwan says. Who made the mistake?

Limitations to Matrix Multiplication

Matrix multiplication has some limitations, which you will discover in this section.

Note the dimensions of the following matrices. Attempt to multiply the matrices together. What do you notice?

1. \begin{align*}\begin{bmatrix} -2 & 3\\ 1 & -5 \end{bmatrix}\cdot\begin{bmatrix} 1 & -4\end{bmatrix}\end{align*}

2. \begin{align*}\begin{bmatrix} -2\\ 3\\ 5\end{bmatrix}\cdot\begin{bmatrix} 4\\ -1\\ 0\end{bmatrix}\end{align*}

3. \begin{align*}\begin{bmatrix} 5\\ -1\end{bmatrix}\cdot\begin{bmatrix} -3 & 1\\ 4 & 3\end{bmatrix}\end{align*}

1. These matrices are \begin{align*}2 \times 2\end{align*} and \begin{align*}1 \times 2\end{align*}. When we try to multiply them together, there is no element to multiply the values in the second column by as shown below:

\begin{align*}\begin{bmatrix} -2 & 3\\ 1 & -5\end{bmatrix}\cdot\begin{bmatrix} 1 & -4\end{bmatrix} = \begin{bmatrix} -2(1)+3(?) & -2(-4)+3(?)\\ 1(1)+-5(?) & 1(-4)+-5(?)\end{bmatrix}\end{align*}

2. These matrices are both \begin{align*}3 \times 1\end{align*}. Look what happens when we attempt to multiply:

\begin{align*}\begin{bmatrix} -2\\ 3\\ 5\end{bmatrix}\cdot\begin{bmatrix} 4\\ -1\\ 0\end{bmatrix} = \begin{bmatrix} -2(4)+?(-1)+?(0) & \ \\ \\ \\ \end{bmatrix}\end{align*}

We can see right away that we have a problem.

3. In this case we have a \begin{align*}2 \times 1\end{align*} and a \begin{align*}2 \times 2\end{align*} matrix. Again we have trouble multiplying:

\begin{align*}\begin{bmatrix} 5\\ -1\end{bmatrix}\cdot\begin{bmatrix} -3 & 1\\ 4 & 2\end{bmatrix} = \begin{bmatrix} 5(-3)+?(4) & \\ \\ \end{bmatrix}\end{align*}

Therefore, in order to multiply two matrices, \begin{align*}A\end{align*} and \begin{align*}B\end{align*}, the number of columns in matrix \begin{align*}A\end{align*} must be equal to the number of rows in column B.

What do you notice about the dimensions of the two matrices when multiplication is possible? Can you make a conjecture about the requirements of the dimensions of the matrices?

Look at this example: \begin{align*}\begin{bmatrix} -2 & 3\\ 1 & 5\end{bmatrix}\cdot\begin{bmatrix} 4\\ -1\end{bmatrix}.\end{align*} In this case we have \begin{align*}2 \times {\color{red}2} \cdot {\color{red}2} \times 1\end{align*}. The two two’s in the middle are the same (i.e., the number of columns in the first matrix matches the number of rows in the second matrix). Now what is left is the 2 on the left and the 1 on the right. The resulting matrix will have these dimensions: \begin{align*}2 \times 1\end{align*}.

Dimensions of the Product: The product of two matrices, \begin{align*}A\end{align*} and \begin{align*}B\end{align*}, will have the following dimensions – the rows in matrix \begin{align*}A\end{align*} by the columns in matrix \begin{align*}B\end{align*}.

Let's use the following matrices to answer the problems below.

\begin{align*}A = \begin{bmatrix} -2 & 5\\ 1 & 3\end{bmatrix}, \ B = \begin{bmatrix} 1 & 3\\ 0 & -5\end{bmatrix}\end{align*}

1. Find \begin{align*}AB\end{align*}: \begin{align*}\begin{bmatrix} -2 & 5\\ 1 & 3\end{bmatrix}\cdot\begin{bmatrix} 1 & 3\\ 0 & -5\end{bmatrix} = \begin{bmatrix} -2+0 & -6-25\\ 1+0 & 3-15\end{bmatrix} = \begin{bmatrix} -2 & -31\\ 1 & -12\end{bmatrix}\end{align*}

2. Find \begin{align*}BA\end{align*}: \begin{align*}\begin{bmatrix} 1 & 3\\ 0 & -5\end{bmatrix}\cdot\begin{bmatrix} -2 & 5\\ 1 & 3\end{bmatrix} = \begin{bmatrix} -2+3 & 5+9\\ 0-5 & 0-15\end{bmatrix} = \begin{bmatrix} 1 & 14\\ -5 & -15\end{bmatrix}\end{align*}

From this exercise we can see that \begin{align*}AB \ne BA\end{align*}. We only need one example to show that the commutative property does not hold for matrix multiplication.

Matrix multiplication is NOT commutative.

Let's answer the following questions about matrix multiplication.

  1. Which of the following matrix multiplication problems are possible? What are the dimensions of the product?


\begin{align*}\begin{bmatrix} 5\\ -2\\ 1\end{bmatrix}\cdot\begin{bmatrix} 0 & -7 & 3\end{bmatrix}\end{align*}

Yes, the matrices can be multiplied. The dimensions of the matrices are \begin{align*}3 \times {\color{red}1} \ {\color{red}\text{and}} \ {\color{red}1} \times 3\end{align*}, so the result is going to be a \begin{align*}3 \times 3\end{align*} matrix.


\begin{align*}\begin{bmatrix} 4 & -1\\ 2 & 3\end{bmatrix}\cdot\begin{bmatrix} -8\\ 0\end{bmatrix}\end{align*}

Yes, the matrices can be multiplied. The dimensions of the matrices are \begin{align*}2 \times {\color{red}2} \ {\color{red}\text{and}} \ {\color{red}2} \times 1\end{align*}, so the result is going to be a \begin{align*}2 \times 1\end{align*} matrix.

  1. Which of the following matrix multiplication problems are possible? What are the dimensions of the product?


\begin{align*}\begin{bmatrix} 1 & -3\end{bmatrix}\cdot\begin{bmatrix} 4\\ -1\end{bmatrix}\end{align*}

Yes, the matrices can be multiplied. The dimensions of the matrices are \begin{align*}1 \times {\color{red}2} \ {\color{red}\text{and}} \ {\color{red}2}\times 1\end{align*}, so the result is going to be a \begin{align*}1 \times 1\end{align*} matrix.


\begin{align*}\begin{bmatrix} 2 & -5\end{bmatrix}\cdot\begin{bmatrix} -3 & 1\end{bmatrix}\end{align*}

No, the matrices cannot be multiplied. The dimensions of the matrices are \begin{align*}1 \times {\color{red}2} \ {\color{red}\text{and}} \ {\color{red}1} \times 2\end{align*}, the number of columns in the first matrix does not match the number of rows in the second matrix.

  1. Given the matrices: \begin{align*}A = \begin{bmatrix} 2 & -1 & 8\\ 3 & 0 & -5\end{bmatrix}\end{align*} and \begin{align*}B = \begin{bmatrix} -1 & 0\\ 2 & 4\\ 5 & 6\end{bmatrix},\end{align*} find \begin{align*}AB\end{align*} and \begin{align*}BA\end{align*}. What do you notice?

\begin{align*}AB = \begin{bmatrix} 2 & -1 & 8\\ 3 & 0 & -5\end{bmatrix}\cdot\begin{bmatrix} -1 & 0\\ 2 & 4\\ 5 & 6\end{bmatrix} &= \begin{bmatrix} 2(-1)+(-1)(2)+8(5) & 2(0)+(-1)(4)+8(6)\\ 3(-1)+(0)(2)+(-5)(5) & 3(0)+(0)(4)+(-5)(6)\end{bmatrix}\\ &= \begin{bmatrix} -2-2+40 & 0-4+48\\ -3+0-25 & 0+0-30\end{bmatrix} = \begin{bmatrix} 36 & 44\\ -28 & -30\end{bmatrix}\end{align*}

\begin{align*}BA = \begin{bmatrix} -1 & 0\\ 2 & 4\\ 5 & 6\end{bmatrix}\cdot\begin{bmatrix} 2 & -1 & 8\\ 3 & 0 & -5\end{bmatrix} &= \begin{bmatrix} -1(2)+0(3) & -1(-1)+0(0) & -1(8)+0(-5)\\ 2(2)+4(3) & 2(-1)+4(0) & 2(8)+4(-5)\\ 5(2)+6(3) & 5(-1)+6(0) & 5(8)+6(-5)\end{bmatrix}\\ &= \begin{bmatrix} -2+0 & 1+0 & -8-0\\ 4+12 & -2+0 & 16-20\\ 10+18 & -5+0 & 40-30\end{bmatrix} = \begin{bmatrix} -2 & 1 & -8\\ 16 & -2 & -4\\ 28 & -5 & 10\end{bmatrix}\end{align*}

The dimensions of the products are different based on the order in which we multiply them. Clearly, the results are different and the commutative property does not hold for matrix multiplication.

Examples

Example 1

Earlier, you were asked to find the student that made the mistake.

Mr. Hwan's matrix is a 3 x 2 matrix. To multiply it by another matrix, that other matrix must be a 2 x ? matrix, where ? can be any number.

Wanda writes a 3 x 2 matrix, so she is wrong.

Xavier writes a 2 x 2 matrix, so he is correct.

Zach writes a 2 x 3 matrix, so he is correct.

Given: \begin{align*}A = \begin{bmatrix} 1 & -3\\ 5 & -14\end{bmatrix}, \qquad B = \begin{bmatrix} -2\\ 1\end{bmatrix}, \qquad C = \begin{bmatrix} -14 & 3\\ -5 & 1\end{bmatrix},\end{align*} find the following products, if possible.

Example 2

\begin{align*}AB\end{align*}
\begin{align*}AB = \begin{bmatrix} 1 & -3\\ 5 & -14\end{bmatrix}\cdot\begin{bmatrix} -2\\ 1\end{bmatrix} = \begin{bmatrix} 1(-2)+-3(1)\\ 5(-2)+-14(1)\end{bmatrix} = \begin{bmatrix} -2-3\\ -10-14\end{bmatrix} = \begin{bmatrix} -5\\ -24\end{bmatrix}\end{align*}

Example 3

\begin{align*}BA\end{align*}
\begin{align*}BA = \begin{bmatrix} -2\\ 1\end{bmatrix}\cdot\begin{bmatrix} 1 & -3\\ 5 & -14\end{bmatrix}\end{align*} is not possible.

Example 4

\begin{align*}AC\end{align*}


\begin{align*}AC = \begin{bmatrix} 1 & -3\\ 5 & -14\end{bmatrix}\cdot\begin{bmatrix} -14 & 3\\ -5 & 1\end{bmatrix} = \begin{bmatrix} 1(-14)+(-3)(-5) & 1(3)+(-3)(1)\\ 5(-14)+(-14)(-5) & 5(3)+(-14)(1)\end{bmatrix} = \begin{bmatrix} -14+15 & 3-3\\ -70+70 & 15-14\end{bmatrix} = \begin{bmatrix} 1 & 0\\ 0 & 1\end{bmatrix}\end{align*}

Example 5

\begin{align*}CA\end{align*}


\begin{align*}CA = \begin{bmatrix} -14 & 3\\ -5 & 1\end{bmatrix}\cdot\begin{bmatrix} 1 & -3\\ 5 & -14\end{bmatrix} = \begin{bmatrix} -14(1)+3(5) & -14(-3)+3(-14)\\ -5(1)+1(5) & -5(-3)+1(-14)\end{bmatrix} = \begin{bmatrix} -14+15 & 52-52\\ -5+5 & 15-14\end{bmatrix} = \begin{bmatrix} 1 & 0\\ 0 & 1\end{bmatrix}\end{align*}

\begin{align*}^{**}\end{align*}Note: When the product is \begin{align*}\begin{bmatrix} 1 & 0\\ 0 & 1\end{bmatrix},\end{align*} the identity matrix for a \begin{align*}2 \times 2\end{align*} matrix, the product can be found by multiplying the matrices in either order as illustrated here in questions 3 and 4. If the product of two matrices is the inverse matrix, then the matrices are multiplicative inverses of one another. This idea is further explored in other matrix concepts.

Review

Use the following matrices to answer questions 1-10.

\begin{align*}A = \begin{bmatrix} 2 & -1 & 4\end{bmatrix} \qquad B = \begin{bmatrix} -3\\ 5\\ 0\end{bmatrix} \qquad C = \begin{bmatrix} 4 & -1\\ 2 & 5\end{bmatrix} \qquad D = \begin{bmatrix} 3 & -2\end{bmatrix}\end{align*}

\begin{align*}E = \begin{bmatrix} 8 & -1 & 0\\ 2 & 5 & 1\\ 3 & 4 & -3\end{bmatrix} \qquad F = \begin{bmatrix} 5 & 0 & -11\\ -1 & 8 & 9\end{bmatrix}\end{align*}

For each product, determine the dimensions of the resulting matrix or write “cannot be determined”. Do not multiply the matrices together.

  1. \begin{align*}AB\end{align*}
  2. \begin{align*}BA\end{align*}
  3. \begin{align*}CD\end{align*}
  4. \begin{align*}DC\end{align*}
  5. \begin{align*}EA\end{align*}
  6. \begin{align*}EB\end{align*}
  7. \begin{align*}CF\end{align*}
  8. \begin{align*}FC\end{align*}
  9. \begin{align*}DF\end{align*}
  10. \begin{align*}BD\end{align*}

Perform the multiplication if possible. If not possible, write “cannot be determined”.

  1. .
\begin{align*}\begin{bmatrix} 2 & -1\\ -4 & 8\end{bmatrix}\cdot\begin{bmatrix} 5\\ -3\end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 5 & -2\\ 3 & 7\\ -4 & 1\end{bmatrix}\cdot\begin{bmatrix} 5 & -2 & 3\\ 7 & -4 & 1\end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 5 & -3\end{bmatrix}\cdot\begin{bmatrix} -4 & 2\end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 5 & -1 & 3\end{bmatrix}\cdot\begin{bmatrix} -4\\ 7\\ 11\end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 5 & 2\\ -3 & 1\end{bmatrix}\cdot\begin{bmatrix} 4 & -7\end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 2 & -5\end{bmatrix}\cdot\begin{bmatrix} 1 & 0\\ -3 & 4\end{bmatrix}\end{align*}
  1. Challenge Problem
    1. Find \begin{align*}\begin{bmatrix} 5 & 3\\ 8 & 5\end{bmatrix}\cdot\begin{bmatrix} 5 & -3\\ -8 & 5\end{bmatrix}\end{align*}
    2. What is the name of the product matrix?
    3. Can you find \begin{align*}\begin{bmatrix} 5 & -3\\ -8 & 5\end{bmatrix}\cdot\begin{bmatrix} 5 & 3\\ 8 & 5\end{bmatrix}\end{align*} without actually multiplying?
    4. What can you conclude about the two matrices in part a?

Answers for Review Problems

To see the Review answers, open this PDF file and look for section 4.5.

Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes
Please to create your own Highlights / Notes
Show More

Image Attributions

Explore More

Sign in to explore more, including practice questions and solutions for Limitations of Matrix Multiplication.
Please wait...
Please wait...