<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
Dismiss
Skip Navigation
Our Terms of Use (click here to view) and Privacy Policy (click here to view) have changed. By continuing to use this site, you are agreeing to our new Terms of Use and Privacy Policy.

Matrix Multiplication

Multiply rows by columns in different matrices

Atoms Practice
Estimated17 minsto complete
%
Progress
Practice Matrix Multiplication
Practice
Progress
Estimated17 minsto complete
%
Practice Now
Multiplying Two Matrices

Mr. Hwan writes the following matrices on the board and asks his students to multiply them.

\begin{align*}\begin{bmatrix} -3 & 1\\ 2 & 0 \end{bmatrix}\cdot\begin{bmatrix} 4\\ -1 \end{bmatrix}\end{align*}[3210][41]

When they are done multiplying, Mr. Hwan asks, "What element is in the first row, second column of your answer?"

Wanda says that because the two matrices do not have the same dimensions they can't be multiplied. Therefore, there is no answer.

Xavier says that the product is a 2 x 1 matrix so there is no element in the first row, second column.

Zach says that the element requested is 8.

Who is correct?

Multiplying Two Matrices

To multiply matrices together we will be multiplying each element in each row of the first matrix by each element in each column in the second matrix. Each of these products will be added together to get the result for a particular row and column as shown below.

\begin{align*}\begin{bmatrix} \color{red}{a} & \color{red}{b}\\ c & d \end{bmatrix} \cdot \begin{bmatrix} \color{red}{e} & f\\ \color{red}{g} & h \end{bmatrix} = \begin{bmatrix} \color{red}{ae}+\color{red}{bg} & af+bh\\ ce+dg & cf+dh \end{bmatrix}\end{align*}[acbd][egfh]=[ae+bgce+dgaf+bhcf+dh]

Multiply the following matrices

Multiply the matrices: \begin{align*}\begin{bmatrix} 2 & 3\\ -1 & 5 \end{bmatrix}\cdot\begin{bmatrix} -6 & 0\\ 4 & 1 \end{bmatrix}\end{align*}[2135][6401]

By following the rule given above, we get:

\begin{align*}\begin{bmatrix} 2(-6)+3(4) & 2(0)+3(1)\\ -1(-6)+5(4) & -1(0)+5(1) \end{bmatrix} = \begin{bmatrix} -12+12 & 0+3\\ 6+20 & 0+5 \end{bmatrix} = \begin{bmatrix} 0 & 3\\ 26 & 5 \end{bmatrix}\end{align*}[2(6)+3(4)1(6)+5(4)2(0)+3(1)1(0)+5(1)]=[12+126+200+30+5]=[02635]

Multiply the matrices: \begin{align*}\begin{bmatrix} -1 & 3\\ 7 & 0\\ 4 & -2 \end{bmatrix}\cdot\begin{bmatrix} 5 & 8\\ -1 & 2 \end{bmatrix}\end{align*}174302[5182]

In order to multiply these two matrices we need to extend the pattern given in the guidance to apply to a \begin{align*}3\times2\end{align*}3×2 matrix and a \begin{align*}2\times2\end{align*}2×2 matrix. It is important to note that matrices do not need to have the same dimensions in order to multiply them together. However, there are limitations that will be explored in the next topic. All matrix multiplication problems in this topic are possible.

Now, let’s multiply each of the rows in the first matrix by each of the columns in the second matrix to get:

\begin{align*}\begin{bmatrix} -1 & 3\\ 7 & 0\\ 4 & -2 \end{bmatrix}\cdot\begin{bmatrix} 5 & 8\\ -1 & 2 \end{bmatrix} = \begin{bmatrix} -1(5)+3(-1) & -1(8)+3(2)\\ 7(5)+0(-1) & 7(8)+0(2)\\ 4(5)+-2(-1) & 4(8)+-2(2) \end{bmatrix} = \begin{bmatrix} -5-3 & -8+6\\ 35+0 & 56+0\\ 20+2 & 32-4 \end{bmatrix} = \begin{bmatrix} -8 & -2\\ 35 & 56\\ 22 & 28 \end{bmatrix}\end{align*}174302[5182]=1(5)+3(1)7(5)+0(1)4(5)+2(1)1(8)+3(2)7(8)+0(2)4(8)+2(2)=5335+020+28+656+0324=8352225628

Multiply the matrices: \begin{align*}\begin{bmatrix} 3 & -7 & 1\\ 2 & 8 & -5 \end{bmatrix}\cdot\begin{bmatrix} 2\\ 0\\ 9 \end{bmatrix}\end{align*}[327815]209

Sometimes, not only are the matrices different dimensions, but the result has dimensions other than either of the original matrices as is the case in this example. Multiply the matrices row by column to get:

\begin{align*}\begin{bmatrix} 3 & -7 & 1\\ 2 & 8 & -5\end{bmatrix}\cdot\begin{bmatrix} 2\\ 0\\ 9\end{bmatrix} = \begin{bmatrix} 3(2)+-7(0)+1(9) & 2(2)+8(0)+-5(9)\end{bmatrix} = \begin{bmatrix} 6+0+9 & 4+0-45\end{bmatrix} = \begin{bmatrix} 15 & -41\end{bmatrix}\end{align*}[327815]209=[3(2)+7(0)+1(9)2(2)+8(0)+5(9)]=[6+0+94+045]=[1541]

Examples

Example 1

Earlier, you were asked who had the correct matrix. 

When the two matrixes are multiplied, the resulting matrix is:

\begin{align*}\begin{bmatrix} -7\\ 8 \end{bmatrix}\end{align*}[78]

The matrices can be multiplied, but there is no first row, second column in the resulting matrix. The element 8 is in the second row, first column. Therefore Xavier is right.

Multiply the matrices together.

Example 2

\begin{align*}\begin{bmatrix} -4 & 1\\ 5 & -3 \end{bmatrix}\cdot\begin{bmatrix} 2\\ -1 \end{bmatrix}\end{align*}[4513][21]

\begin{align*}\begin{bmatrix} -4 & 1\\ 5 & -3 \end{bmatrix}\cdot\begin{bmatrix} 2\\ -1 \end{bmatrix} = \begin{bmatrix} -4(2)+1(-1)\\ 5(2)+-3(-1) \end{bmatrix} = \begin{bmatrix} -8-1\\ 10+3 \end{bmatrix} = \begin{bmatrix} -9\\ 13 \end{bmatrix}\end{align*}[4513][21]=[4(2)+1(1)5(2)+3(1)]=[8110+3]=[913]

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


\begin{align*}\begin{bmatrix} -3\\ 2\\ 5 \end{bmatrix}\cdot\begin{bmatrix}-2 & -1 & 4 \end{bmatrix} = \begin{bmatrix} -3(-2) & -3(-1) & -3(4)\\ 2(-2) & 2(-1) & 2(4)\\ 5(-2) & 5(-1) & 5(4) \end{bmatrix} = \begin{bmatrix} 6 & 3 & -12\\ -4 & -2 & 8\\ -10 & -5 & 20 \end{bmatrix}\end{align*}

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

\begin{align*}\begin{bmatrix} 5 & -2 \end{bmatrix}\cdot\begin{bmatrix} 1 & 4\\ -3 & -7 \end{bmatrix} = \begin{bmatrix} 5(1)+-2(-3) & 5(4)+-2(-7) \end{bmatrix} = \begin{bmatrix} 5+6 & 20+14 \end{bmatrix} = \begin{bmatrix} 11 & 34 \end{bmatrix}\end{align*}

Review

Multiply the matrices together.

  1. .
\begin{align*}\begin{bmatrix} 2 & -1\\ 0 & 3 \end{bmatrix}\cdot\begin{bmatrix} -4 & 3\\ 2 & 5 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -2 & 7 \end{bmatrix}\cdot\begin{bmatrix} 1 & -4\\ 5 & 3 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -3 & 2\\ 5 & -4\\ -1 & 6 \end{bmatrix}\cdot\begin{bmatrix} -1 & 3\\ 4 & -2 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -8 & 1\\ 3 & 5 \end{bmatrix}\cdot\begin{bmatrix} -4\\ 7 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -1\\ 4\\ 8 \end{bmatrix}\cdot\begin{bmatrix} 2 & -3 & 6 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -5 & 1 \end{bmatrix}\cdot\begin{bmatrix} -9 & 3 & 0\\ 2 & -1 & 6 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 4 & -1\\ 5 & 3 \end{bmatrix}\cdot\begin{bmatrix} 2\\ 6 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -2 & 4 & 7 \end{bmatrix}\cdot\begin{bmatrix} 3\\ -1\\ 5 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -1 & 2 & -4\\ 5 & 3 & 1\\ -5 & 2 & -1 \end{bmatrix}\cdot\begin{bmatrix} 2 & -3 & 5\\ 6 & 2 & 1\\ -4 & 1 & 0 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 1 & -2 & 4 \end{bmatrix}\cdot\begin{bmatrix} -3 & 1 & 2\\ 5 & -1 & 6\\ 1 & 2 & -7 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 6 & 11\\ 1 & 2 \end{bmatrix}\cdot\begin{bmatrix} 2 & -11\\ -1 & 6 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -4 & 5 & 7\\ 1 & 2 & -3\\ 9 & -6 & 8 \end{bmatrix}\cdot\begin{bmatrix} 1\\ 2\\ -1 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -2 & -1 & 3\end{bmatrix}\cdot\begin{bmatrix} -4\\ 5\\ -8 \end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} -10 \end{bmatrix}\cdot\begin{bmatrix} 15\end{bmatrix}\end{align*}
  1. .
\begin{align*}\begin{bmatrix} 2 & 4 \\ -1 & -2 \\ 7 & -12 \end{bmatrix}\cdot\begin{bmatrix} 5\\ -3\end{bmatrix}\end{align*}

Answers for Review Problems

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

Image Attributions

Explore More

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