intro practice · coding problem
Multiply 2×2 matrices by hand
Compute AB where A = [[1, 2], [0, 1]] and B = [[1, 0], [3, 1]]. Then apply A to vector x = [1, 1] and B to the result — does AB·x equal A·(B·x)?
The mechanism
A matrix is a machine that takes vectors in and pushes vectors out. Columns tell you where the basis vectors land. Matrix multiply chains machines — output of one feeds the next.
Expected evidence
AB = [[7, 2], [3, 1]]; AB·x = [9, 4] = A·(B·x). Matrix multiplication is composition.
Try this drill in the practice workspace →
Hints when you need them
- Row × column for each entry.
- Order matters: AB ≠ BA in general.
Watch for these mistakes
- Multiplying matrices in the wrong order (not commutative)
- Confusing rows vs columns when reading a transformation
- Assuming every square matrix is invertible