Overview
Practice
Watch
Read
Quiz
Next Steps
Read
Matrix Multiplication
Matrix multiplication combines two matrices using a row-by-column rule: pair each row of the first matrix with each column of the second, multiply matching numbers, and add. Learn when multiplication is defined (inner dimensions must match), why order matters, and how to read a worked 2x2 example.
The row-by-column rule
To find the entry in row i, column j of the product, take row i of the first matrix and column j of the second, multiply the paired numbers, and add. In the example above, row 1 is (1, 2) and column 1 is (5, 7), so the top-left entry is (1×5) + (2×7) = 19. Repeat for every row-column pairing to fill the product.
When multiplication is defined
You can only multiply two matrices when their inner dimensions match: an m×n matrix times an n×p matrix. The shared n is what lets each row line up with each column, and the product has size m×p.
Order matters
Matrix multiplication is not commutative: in general, AB is not equal to BA, and one order may be defined while the other is not. This is different from multiplying a matrix by a scalar, where order makes no difference. Multiplication is the engine behind more advanced work such as the inverse of 3×3 matrices with row operations.