Lesson 5 of 8 · 15 min

One transformation after another

Find the single matrix for a sequence of transformations as a product in the right order, see why the order changes the result, and combine rotations by adding angles.

What you will be able to do

  • Explain why "A\bm{A} followed by B\bm{B}" has matrix BA\bm{BA}.
  • Find and describe the single transformation equivalent to a sequence of two or three.
  • Show with an example that changing the order usually changes the result.
  • Use RαRβ=Rα+β\bm{R}_\alpha\bm{R}_\beta = \bm{R}_{\alpha + \beta} to combine rotations and find powers of a rotation matrix.

A photo app rotates your picture and then flips it. Could one transformation have done both at once? Follow a point through.

Apply A\bm{A} to X\bm{X} to get AX\bm{AX}. Then apply B\bm{B} to that: B(AX)\bm{B}(\bm{AX}). Matrix multiplication is associative, so B(AX)=(BA)X\bm{B}(\bm{AX}) = (\bm{BA})\bm{X}. The single matrix BA\bm{BA} does both jobs in one step.

Key idea

Composition is a matrix product

The transformation A\bm{A} followed by B\bm{B} has matrix BA\bm{BA}.

The first transformation sits on the right, next to the point it acts on, just like f(g(x))f(g(x)) means "do gg first". For three transformations, A\bm{A} then B\bm{B} then C\bm{C} is CBA\bm{CBA}.

Interactive

Rotate, reflect, and swap the order

Here A\bm{A} is the reflection in the xx-axis and B\bm{B} is the rotation of 90°90° anticlockwise. Compare AB\bm{AB} with BA\bm{BA}: each is a reflection, but in different lines.

Worked example

Reflect then rotate, or rotate then reflect?

  • Complex familiar
  • Technology free

Let S\bm{S} be the reflection in the xx-axis and R\bm{R} the rotation of 90°90° anticlockwise about the origin.

(a) Find the single matrix for S\bm{S} followed by R\bm{R}, and describe the transformation.

(b) Find the single matrix for R\bm{R} followed by S\bm{S}, and describe it.

5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Write the words in order, then the matrices in reverse order.

  2. Multiply, then recognise the result from its pattern.

  3. Check the first column by following (1,0)(1, 0) through by hand.

Watch out for

  • Writing "S\bm{S} then R\bm{R}" as SR\bm{SR}.

  • Calling a result with determinant −1-1 a rotation.

The same two transformations in different orders. Reflect then rotate (blue) lands in a different place from rotate then reflect (amber).

Find the single matrix for a rotation of 90°90° anticlockwise about the origin followed by a dilation of factor 3 parallel to the xx-axis.

Rotations about the origin are the friendly exception. Turning by β\beta and then by α\alpha is a turn by α+β\alpha + \beta, whichever comes first:

RαRβ=Rα+β=RβRα\bm{R}_\alpha\bm{R}_\beta = \bm{R}_{\alpha + \beta} = \bm{R}_\beta\bm{R}_\alpha

So rotations about the same centre commute, and repeating a rotation multiplies its angle: (Rθ)n=Rnθ(\bm{R}_\theta)^n = \bm{R}_{n\theta}.

Proof that RαRβ=Rα+β\bm{R}_\alpha\bm{R}_\beta = \bm{R}_{\alpha + \beta}
RαRβ=[cos⁡(α)−sin⁡(α)sin⁡(α)cos⁡(α)][cos⁡(β)−sin⁡(β)sin⁡(β)cos⁡(β)]\bm{R}_\alpha\bm{R}_\beta = \begin{bmatrix} \cos(\alpha) & -\sin(\alpha) \\ \sin(\alpha) & \cos(\alpha) \end{bmatrix}\begin{bmatrix} \cos(\beta) & -\sin(\beta) \\ \sin(\beta) & \cos(\beta) \end{bmatrix} =[cos⁡(α)cos⁡(β)−sin⁡(α)sin⁡(β)−(sin⁡(α)cos⁡(β)+cos⁡(α)sin⁡(β))sin⁡(α)cos⁡(β)+cos⁡(α)sin⁡(β)cos⁡(α)cos⁡(β)−sin⁡(α)sin⁡(β)]= \begin{bmatrix} \cos(\alpha)\cos(\beta) - \sin(\alpha)\sin(\beta) & -(\sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta)) \\ \sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta) & \cos(\alpha)\cos(\beta) - \sin(\alpha)\sin(\beta) \end{bmatrix}

By the angle sum identities, cos⁡(α)cos⁡(β)−sin⁡(α)sin⁡(β)=cos⁡(α+β)\cos(\alpha)\cos(\beta) - \sin(\alpha)\sin(\beta) = \cos(\alpha + \beta) and sin⁡(α)cos⁡(β)+cos⁡(α)sin⁡(β)=sin⁡(α+β)\sin(\alpha)\cos(\beta) + \cos(\alpha)\sin(\beta) = \sin(\alpha + \beta), so

RαRβ=[cos⁡(α+β)−sin⁡(α+β)sin⁡(α+β)cos⁡(α+β)]=Rα+β\bm{R}_\alpha\bm{R}_\beta = \begin{bmatrix} \cos(\alpha + \beta) & -\sin(\alpha + \beta) \\ \sin(\alpha + \beta) & \cos(\alpha + \beta) \end{bmatrix} = \bm{R}_{\alpha + \beta}

Swapping α\alpha and β\beta gives the same matrix, so the two rotations commute.

Let R\bm{R} be the matrix of the rotation of 40°40° anticlockwise about the origin. Find the smallest positive integer nn for which Rn=I\bm{R}^n = \bm{I}.

Common mistake

Reading the product left to right

It is tempting to write the matrices in the order you read the words. "Reflect, then rotate" is RS\bm{R}\bm{S}, with the reflection S\bm{S} on the right. A quick check: test your product on (1,0)(1, 0) and follow the point through each transformation by hand.

A transformation has matrix T=PQ\bm{T} = \bm{PQ}. Which transformation is applied to a point first?

Choose one answer

Summary

  • "A\bm{A} followed by B\bm{B}" has matrix BA\bm{BA}; "A\bm{A} then B\bm{B} then C\bm{C}" has matrix CBA\bm{CBA}.

  • Order usually matters: reflect-then-rotate and rotate-then-reflect are different transformations.

  • Rotations about the origin commute and add: RαRβ=Rα+β\bm{R}_\alpha\bm{R}_\beta = \bm{R}_{\alpha + \beta}, so (Rθ)n=Rnθ(\bm{R}_\theta)^n = \bm{R}_{n\theta}.

  • Check a composition by following (1,0)(1, 0) and (0,1)(0, 1) through each step: their images are the columns of the product.

Finished the lesson?

Try the 3 quick checks above and the lesson completes itself, or mark it complete now.

Lesson 5 of 80% read

Save your progress with a free account