Composite Transformations
Imagine first doing a rotation and then doing a shear — that is a composition of transformations: one transformation following another.
vector v ──(first) T₁──► T₁(v) ──(then) T₂──► T₂(T₁(v))
The key question: is the composition of two linear transformations still a linear transformation?
Yes it is. Because a linear transformation preserves straight lines and preserves parallel, equally spaced structure, doing it twice preserves them as well — so the composition is still a linear transformation, and it can be represented by a single matrix. That matrix is the product of the two matrices.
Let the matrix of the transformation be , and the matrix of be . Applying first and then , the composition is written:
Note: the matrix that acts first is written on the right! means “first , then ”.
M₂M₁·v = M₂(M₁·v)
└┬─┘ └┬┘
first M₁ then M₂
Geometric intuition: the function notation evaluates first and then . Matrix multiplication works the same way — the rightmost matrix acts first.
Matrix Multiplication Is Not Commutative
In general .
Example: a 90° rotation followed by a shear ≠ a shear followed by a 90° rotationA different order gives a completely different result. This is an essential difference from ordinary multiplication of numbers ().
Let and . Then the composition is:
How to remember it:
- the -th row and -th column of the product = the -th row of times the -th column of (multiply component by component and add)
- Geometric check: column 1 of the product = the position of the image of under , after being transformed by , that is
Example: M₁ = the 90° rotation [[0,-1],[1,0]], M₂ = the shear [[1,1],[0,1]]
Rotate first, then shear:
M₂M₁ = [[1,1],[0,1]]·[[0,-1],[1,0]]
= [[1·0+1·1, 1·(-1)+1·0], [0·0+1·1, 0·(-1)+1·0]]
= [[1, -1],[1, 0]]
How to operate and what to observe:
- switch between “rotate then shear” and “shear then rotate”
- compare the final grid in the two orders — they are completely different!
- confirm: the matrix that acts first is written on the right of the product
| View | Meaning |
|---|---|
| Algebraic | the merging of two consecutive matrix multiplications |
| Geometric | a composition of transformations (right first, then left) |
| Practical | merging several transformations into one, to improve computational efficiency |
Its significance in computer graphics: an object may first be scaled, then rotated, then translated (in practice an affine transformation in homogeneous coordinates). You can pre-multiply these matrices into a single matrix and then perform just one matrix multiplication per vertex — this is one of the principles behind GPU rendering.
Symbols Used in This Article
| Symbol | Type | Pronunciation/Explanation | Meaning in This Article |
|---|---|---|---|
| Mathematical symbol | T one, T two | The two linear transformations, applied in turn | |
| Mathematical symbol | M one, M two | The matrices corresponding to and | |
| Mathematical symbol | M two times M one | The matrix of the composite transformation, with the first-acting written on the right | |
| Mathematical symbol | not equal | Matrix multiplication is not commutative in general | |
| Mathematical symbol | matrix product | The product matrix obtained by multiplying row by column | |
| Mathematical symbol | f of g of x | The notation for function composition, paralleling the “right to left” rule of matrix multiplication |
