
Definition: Matrix multiplication builds each entry of the product by taking the dot product of a row from the first matrix with a column from the second.
When is a product defined?
Multiply A (m by n) by B (n by p): the number of columns of A must equal the number of rows of B. The product AB is m by p. Order matters, and AB is usually different from BA.
How do you compute it?
Entry in row i, column j equals (row i of A) · (column j of B).
Worked example: A has rows (2, 0, 1) and (1, 3, 2). B has rows (1, 4), (0, 2) and (5, -1). A is 2 by 3 and B is 3 by 2, so AB is 2 by 2.
- Row 1 · column 1: 2 + 0 + 5 = 7
- Row 1 · column 2: 8 + 0 – 1 = 7
- Row 2 · column 1: 1 + 0 + 10 = 11
- Row 2 · column 2: 4 + 6 – 2 = 8
So AB has rows (7, 7) and (11, 8).
What is a common error?
Multiplying matching entries like addition. That only works for the entrywise product, which is not matrix multiplication. Mathbot pairs rows with columns.
Example: (2×3 matrix)(3×2 matrix) gives a 2×2 matrix, here [[7, 7], [11, 8]]
Where to learn it
- Matrix Operations, Determinants and Inverses – lesson
- Solving Systems and Transforming the Plane – lesson
