Matrices & Transformations · Lesson 2 of 3 · ~6 min

Composition is multiplication

Predict

Matrix $A$ rotates the lattice $30^\circ$; matrix $B$ shears it. You run rotate-then-shear, a friend runs shear-then-rotate. Do the lattices end up in the same place?

Run both orders, pressing Reset in between.
Try
Try itPress Apply A · Rot 30°, then Apply B · Shear, and find $1.17$ in product M. Press Reset and reverse the order.
Notice

Rotate-then-shear gives M = B·A, with $1.17$ top-left. Shear-then-rotate gives M = A·B: the lattice leans differently and $1.17$ jumps to the bottom-right. But det M reads $1.00$ every time.

Explain

A then B makes one matrix, the product $BA$. Read it right to left. The matrix nearest $\mathbf{x}$ acts first, like the inner $g$ in $f(g(x))$, so pressing A first made the label read B·A:

$$(BA)\,\mathbf{x} = B(A\mathbf{x})$$

Order matters: shearing a rotated lattice is a different job from rotating a sheared one. So in general $AB \neq BA$. Determinants still multiply in any order, $\det(BA) = \det B \cdot \det A$, and both motions have determinant $1$, so every stack does too.

Apply
Checkpoint — prove it to yourself

You press Apply A · Rot 30° first, then Apply B · Shear. Which single matrix now moves the lattice in one step?

You stack rotations and shears in any order, ten presses in a row. What does det M read at the end?

Transfer: $R_{30}$ turns the plane $30^\circ$ and $R_{60}$ turns it $60^\circ$, and $R_{30} R_{60} = R_{60} R_{30}$ exactly. Does that contradict what you just saw?

Key idea

Matrix multiplication is composition. $BA$ means $A$ first, then $B$. Expect $AB \neq BA$, but $\det(BA) = \det B \cdot \det A$ in any order.

← Lesson 1