SECTION 1
Historical Context & Motivation
Have you ever used a photo-editing app to rotate a picture and then flip it? You just performed two transformations, one after the other. Mathematicians call this process composition — combining two actions into a single action. The idea of composing transformations has deep roots in the history of mathematics, and it became one of the most important tools in modern science and technology.
1770s • Euler & Rotations
1855 • Cayley & Matrix Algebra
1888 • Lie Groups
1950s–Today • Computer Graphics & AI
The central question this lesson answers is: When you apply one linear transformation and then another, what single transformation does the same job? Understanding this lets you simplify chains of operations into one clean step, saving time and revealing hidden structure.
SECTION 2
Core Principles & Definitions
Before we compose transformations, let's nail down a few building-block ideas. A transformation is any rule that takes an input (like a point or a vector) and produces an output. A linear transformation is a special kind that keeps lines straight and the origin fixed. Think of stretching, reflecting, rotating, or shearing a shape — these are all linear transformations.
Linear Transformation
Composition (S ∘ T)
Matrix Representation
Order Matters
KEY TAKEAWAY
SECTION 3
Visual Explanation
The diagram below shows how a vector v is first transformed by T (a 90° counter-clockwise rotation), producing T(v). Then S (a reflection across the x-axis) is applied to T(v), giving the final output S(T(v)). The single combined transformation S ∘ T takes v directly to the same final point.
Notice how the original cyan vector at (2, 1) moves to (−1, 2) after the rotation T, and then to (−1, −2) after the reflection S. The gold matrix on the right side of the diagram is the product of the two individual matrices. Multiplying this single matrix by v gives (−1, −2) directly — no need to do two separate steps!
SECTION 4
Mathematical Framework
Every linear transformation in ℝ² (the 2-D plane) can be written as a matrix. If T is represented by matrix A and S is represented by matrix B, then the composition S ∘ T is represented by the product B × A. Pay close attention to the order: because T acts first, its matrix A goes on the right.
COMPOSITION RULE
v = input vector, A = matrix for T, B = matrix for S, BA = matrix for the composed transformation S ∘ T.
Let's see why the order matters. Matrix multiplication is associative — meaning (BA)v = B(Av) — but it is generally not commutative, which means BA ≠ AB in most cases. So S ∘ T and T ∘ S usually give different results.
2 × 2 MATRIX MULTIPLICATION
Each entry in the product is the dot product of a row from the left matrix and a column from the right matrix. Semicolons separate rows.
LINEARITY PRESERVED
The composition of two linear transformations is itself linear. This is a key property: composing linear maps always stays in the world of linear maps.
Order Tip
SECTION 5
Detailed Breakdown — Common Compositions
Different pairs of transformations produce interesting combined effects. The diagram below illustrates three common compositions and the matrices that result from them. Understanding these patterns helps you predict what a composition will do before you compute it.
| First (T) | Second (S) | Composition S ∘ T |
|---|---|---|
| Rotate 90° CCW | Reflect over x-axis | Reflect over line y = −x |
| Scale by 2 | Rotate 90° CCW | Rotate 90° CCW and scale by 2 |
| Reflect over x-axis | Reflect over y-axis | Rotate 180° |
| Rotate θ | Rotate φ | Rotate (θ + φ) |
Common composition results in ℝ²
A particularly cool pattern: two rotations always compose into a single rotation whose angle is the sum of the two individual angles. And two reflections across different lines compose into a rotation by twice the angle between the lines.
SECTION 6
Worked Example
Let's walk through a full example. Suppose T is a reflection over the y-axis and S is a rotation by 90° counter-clockwise. We want the matrix for S ∘ T and then apply it to the vector v = (3, 1).
Finding S ∘ T and Applying It to v = (3, 1)
- 1
Step 1 — Write the matrix for T (reflect over y-axis)
Reflecting over the y-axis flips the x-coordinate. The matrix is A = [−1, 0; 0, 1]. This sends (x, y) to (−x, y).A = [−1, 0; 0, 1] - 2
Step 2 — Write the matrix for S (rotate 90° CCW)
A 90° counter-clockwise rotation has the matrix B = [0, −1; 1, 0]. This sends (x, y) to (−y, x).B = [0, −1; 1, 0] - 3
Step 3 — Multiply B × A to get the composition matrix
Row 1 of B dot column 1 of A: (0)(−1) + (−1)(0) = 0. Row 1 of B dot column 2 of A: (0)(0) + (−1)(1) = −1. Row 2 of B dot column 1 of A: (1)(−1) + (0)(0) = −1. Row 2 of B dot column 2 of A: (1)(0) + (0)(1) = 0.BA = [0, −1; −1, 0] - 4
Step 4 — Apply BA to v = (3, 1)
Multiply [0, −1; −1, 0] × [3; 1]. First component: (0)(3) + (−1)(1) = −1. Second component: (−1)(3) + (0)(1) = −3.(S ∘ T)(v) = (−1, −3) - 5
Step 5 — Verify by doing T then S separately
T(v) = A × (3, 1) = (−3, 1). Then S(T(v)) = B × (−3, 1) = (−1, −3). ✓ Same answer! The single matrix BA does the same job as applying T and then S one at a time.Verified: (−1, −3) ✓
SECTION 7
Strengths, Limitations & Comparisons
Composition of linear transformations is powerful, but it has boundaries. Let's compare it with doing transformations one at a time and see where each approach shines.
| Feature | One-at-a-Time | Composition (Single Matrix) |
|---|---|---|
| Speed for many points | Slow — each point goes through every matrix separately | Fast — multiply the combined matrix by each point once |
| Ease of setup | Easy — just list the matrices | Requires matrix multiplication first |
| Understanding intermediate steps | You see each intermediate result | Intermediate results are hidden |
| Works for non-linear transforms? | Yes — you can chain any functions | Only works when both transformations are linear |
| Scalability (10+ transforms) | Very slow | Very efficient — multiply all matrices once, reuse the result |
Comparing approaches to multiple transformations
KEY TAKEAWAY
SECTION 8
Connection to Advanced Theory
The idea of composing linear transformations grows into some of the most important topics you'll encounter later in mathematics. Here's a glimpse of where it leads.
| This Lesson | Advanced Extension |
|---|---|
| Composing two 2×2 matrices | Composing n×n matrices for higher-dimensional spaces (3-D graphics, data science) |
| Order matters (BA ≠ AB) | Group theory studies which sets of transformations can be composed and when order can be swapped (abelian groups) |
| Single matrix for S ∘ T | Matrix decompositions (SVD, eigendecomposition) break a complex matrix into simpler composed parts |
| Linear transformations only | Affine transformations add translations; handled by augmenting the matrix to 3×3 (or 4×4 in 3-D) |
From composition basics to advanced topics
In computer graphics, a single frame of a video game might compose dozens of transformations — scaling a character model, rotating it to face the camera, and projecting it onto a flat screen. All of these are multiplied into one 4×4 matrix that is applied to thousands of points in the model. The concept you learned today is the engine behind that process.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
Summary
The composition of linear transformations lets you combine two (or more) transformations into a single operation. If transformation T has matrix A and transformation S has matrix B, then the composed transformation S ∘ T has matrix BA (the product of B and A). The key rule is to read right to left: the transformation that acts first goes on the right in the matrix product.
Because matrix multiplication is not commutative, the order of composition matters — S ∘ T usually gives a different result from T ∘ S. However, the composition of two linear transformations is always linear, which means you stay in the world of matrices no matter how many transformations you chain together. This principle powers everything from video-game graphics to data science and robotics.