Multiplying Matrices
Unit: Matrices
Prerequisites
Later Topics
Lesson Preview
Under certain conditions, we can multiply two matrices together. We'll start with two square matrices.
Consider the two matrices:
When multiplying , the output will be another matrix.
The element is calculated by taking the dot product between the row of with the column of . For the two matrices above:
It can be helpful to think of computing by starting with the first row of . We complete the first row of the output matrix by taking the dot product of the first row of with each column of .
Then we move on to the second row of and compute the dot product with each column of to fill the second row of the output matrix.
We continue this process row by row, always taking the dot product of the current row of with every column of , until all rows of the output matrix are filled.
Finally, a very important property of matrix multiplication in general is that it's not commutative, i.e., . Indeed, for the matrices above:
\begin{align*} \textcolor{blue}{B} \textcolor{red}{A} &= ...... continued in the full lesson.
Ready to Start Learning?
Sign up now to access the full Multiplying Matrices lesson and our entire curriculum!