Composition of
Transformations
Learn how combining linear transformations works through matrix multiplication, and discover why order matters when composing maps.
What Is a Linear Transformation?
A linear transformation is a function \( T: \mathbb{R}^n \to \mathbb{R}^m \) that preserves two key operations: vector addition and scalar multiplication.
Every linear transformation from \(\mathbb{R}^n\) to \(\mathbb{R}^m\) can be represented by an \(m \times n\) matrix. The transformation \(T(\mathbf{x}) = A\mathbf{x}\) maps input vectors by matrix multiplication.
Seeing a Transformation in Action
What Is Composition?
When you apply one transformation and then another, you are composing them. If \(S\) and \(T\) are linear transformations, the composition \(S \circ T\) means: first apply \(T\), then apply \(S\).
Core Theorem: Matrix Product
This is the deep reason matrix multiplication exists: it was invented precisely to represent composition of linear maps. The product \(AB\) encodes "first apply \(B\), then apply \(A\)."
Why \(AB\) Equals Composition
Order Matters: \(AB \neq BA\)
Unlike scalar multiplication, matrix multiplication is not commutative. Composing transformations in a different order generally gives a different result.
Properties of Composition
How to Compute a Composition
Example 1: Simple Composition
Let \( A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} \) (shear) and \( B = \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix} \) (scale). Find the matrix of \( S \circ T \) where \( T(\mathbf{x}) = B\mathbf{x} \) and \( S(\mathbf{x}) = A\mathbf{x} \).
Example 2: Rotation then Reflection
Let \( R_{90} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \) (90° rotation) and \( M = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} \) (reflect over \(x\)-axis). Find \( M \circ R_{90} \).
Now try the reverse order: \( R_{90} \circ M \).
\(MR_{90} \neq R_{90}M\): one reflects across \(y = -x\), the other across \(y = x\). Order matters!
Example 3: Composing in \(\mathbb{R}^3\)
Let \( A = \begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \) and \( B = \begin{bmatrix} 1 & 0 & 0 \\ 3 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \). Find \(AB\).
Geometric Chain of Transformations
Each transformation is a matrix. The entire chain can be collapsed into a single matrix \(C = M_3 \cdot M_2 \cdot M_1\). This single matrix maps any vector from the original space directly to the final result.
Determinants and Area Scaling
The determinant tells you how a transformation scales area (in 2D) or volume (in 3D). For a composition:
Common Mistakes
Summary Table
| Property | Scalar Functions | Linear Transformations |
|---|---|---|
| Notation | \(f \circ g\) | \(S \circ T\) or \(AB\) |
| Meaning | \(f(g(x))\) | \(A(B\mathbf{x})\) |
| Associative? | Yes | Yes |
| Commutative? | Generally no | Generally no |
| Identity | \(f(x) = x\) | \(I\) (identity matrix) |
| Inverse | \(f^{-1}\) | \(A^{-1}\) (if exists) |
Question 1 of 5
If \( T(\mathbf{x}) = B\mathbf{x} \) and \( S(\mathbf{x}) = A\mathbf{x} \), which matrix represents \( S \circ T \)?
Question 2 of 5
Let \( A = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix} \) and \( B = \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix} \). What is \(AB\)?
Question 3 of 5
Which property does matrix multiplication not satisfy in general?
Question 4 of 5
If \(\det(A) = 3\) and \(\det(B) = -2\), what is \(\det(AB)\)?
Question 5 of 5
If \(A\) is \(3 \times 2\) and \(B\) is \(2 \times 4\), what are the dimensions of \(AB\)?