Matrix Multiplication as Composition
Matrix multiplication is function composition. The product AB means first apply B and then A, so the order of the factors changes the geometry.
AB = [0.80, -1.00; 1.00, 0.00] · (AB)x = A(Bx)
First apply B (cyan square), then A (amber square). Swapping the factors changes the combined map.
Matrix multiplication is composition. The cyan square is B applied to the original square; the amber square is A applied to that result. Swap the factors to see why AB and BA usually differ.
What you are seeing
Start with a point x. The map B sends it to Bx, then A sends that result to A(Bx).
The product AB is defined so that (AB)x = A(Bx). Its columns are A applied to the columns of B.
Matrix multiplication is not commutative in general: AB and BA can produce different transformations.
Why it matters
Composition explains graphics pipelines, robotics, changes of coordinates, and why matrix order matters in linear algebra and programming.
Complexity & details
For 2×2 matrices, multiplying two matrices costs O(1); applying the result to a point also costs O(1).
Frequently asked questions
Why does order matter?+
Matrix multiplication is composition of functions. Rotating then shearing is generally not the same as shearing then rotating.
What does AB mean visually?+
It is the single matrix that has the same effect as applying B first and A second. The intermediate square shows B; the final square shows AB.