James Ashton MathsFREE MATHEMATICS. OPEN TO EVERYONE.
HomeIB DiplomaA levelAbout
IB Diploma › Maths AI HL › Geometry & trigonometry › Matrix transformations

Matrix transformations

Multiplying a position vector by a 2 × 2 matrix moves the point. Choose the matrix well and every point of a shape is rotated, reflected, stretched or enlarged at once. Computer graphics, animation and fractals are built from exactly this.

AHL 3.9HL onlyPaper 1Paper 2GDC allowed≈ 50 min to work through
Before you start: multiplying matrices, determinants and inverses (Matrices) and the unit circle (The unit circle).

1What you need to know

Tick these off as you go. By the end of the page you should be able to do all of them without notes.

  • Use the matrices for rotations, reflections, stretches and enlargementsAHL 3.9
  • Find the image of a point or shape under a transformation A𝐱+𝐛, including translationsAHL 3.9
  • Identify and describe the transformation a given matrix representsAHL 3.9
  • Combine transformations, multiplying the matrices in the right orderAHL 3.9
  • Use |detA| as the area scale factorAHL 3.9
  • Use the inverse matrix to undo a transformation and find an original pointAHL 3.9

2Notes & worked examples

Each idea is followed by a worked example. Try the question yourself first, then reveal the solution one step at a time.

The big idea

To see what a matrix does, look at where it sends the two unit vectors: (10) goes to the first column and (01) goes to the second. Everything else follows, because the transformation keeps straight lines straight and keeps the origin fixed.

2.1 The standard transformation matrices

Transformation matrices (in the formula booklet) In formula booklet

Rotation anticlockwise through θ about O and reflection in the line y=(tanθ)x:

(cosθ−sinθsinθcosθ)(cos2θsin2θsin2θ−cos2θ)

Horizontal stretch (factor k, y-axis invariant), vertical stretch (factor k, x-axis invariant) and enlargement (factor k, centre O):

(k001)(100k)(k00k)

A clockwise rotation through θ is an anticlockwise rotation through −θ. A translation by (ef) is done by adding the vector: 𝐱↦A𝐱+(ef).

Worked example 1Paper 1
Triangle T has vertices A(1,1), B(4,1) and C(1,3). Find the image of T under a rotation of π2 anticlockwise about the origin.
R=(cosπ2−sinπ2sinπ2cosπ2)=(0−110)
(0−110)(141113)=(−1−1−3141)
Put the points side by side as columns and transform them all at once.
A′(−1,1), B′(−1,4), C′(−3,1)
Worked example 2Paper 1
Find the matrix for a reflection in the line y=3x.
tanθ=3⇒θ=π3, so 2θ=2π3
(cos2π3sin2π3sin2π3−cos2π3)=(−0.50.8660.8660.5)
Worked example 3Paper 1
Describe the transformation given by (0.6−0.80.80.6).
It has the rotation pattern with cosθ=0.6, sinθ=0.8.
Check: 0.62+0.82=1.
θ=cos−10.6=0.927 (first quadrant, since sinθ>0)
Rotation anticlockwise through 0.927 radians (53.1°) about the origin.

2.2 Combining transformations

If A is applied first and then B, the point 𝐱 goes to B(A𝐱)=(BA)𝐱. So the single matrix is BA: the first transformation is written on the right. Since BA≠AB in general, the order matters.

Worked example 4Paper 1
Find the single matrix for a horizontal stretch with scale factor 2 followed by a rotation of π2 anticlockwise about O.
S=(2001), R=(0−110)
RS=(0−110)(2001)=(0−120)
Stretch first, so S goes on the right.
Worked example 5 (faded)Paper 1
Find the image of (2,−1) under an enlargement with scale factor 3, centre O, followed by a translation by (14).
3(2−1)+(14)= (71)  ← you work this out

2.3 The determinant and area

Under the transformation with matrix A, every area is multiplied by |detA|: area of image = |det A| × area of object. Rotations and reflections have |detA|=1, so they keep areas. A negative determinant means the shape has been flipped over (its orientation is reversed).

Worked example 6Paper 1
A triangle of area 6 cm² is transformed by (3124). Find the area of the image.
det=3(4)−1(2)=10
Image area =10×6=60 cm²

2.4 Undoing a transformation

If 𝐱′=A𝐱, then 𝐱=A−1𝐱′. For 𝐱′=A𝐱+𝐛, subtract 𝐛 first: 𝐱=A−1(𝐱′−𝐛). To undo "A then B", use (BA)−1=A−1B−1: undo the last one first.

Worked example 7Paper 1
The point X is mapped to (5,−2) by M=(211−1). Find the coordinates of X.
detM=−3, M−1=−13(−1−1−12)
M−1(5−2)=(13)
X(1,3)
Check: M(13)=(5−2).
On your TI-Nspire Calculator tricks →

On the TI-Nspire, store the matrix (for example as m) and the points as the columns of another matrix p; then m·p transforms every point at once. Set the angle mode to match the question (degrees for 30°, radians for π6) before typing cos and sin into a rotation matrix. det(m) gives the area factor and m^−1 undoes the transformation. For "smallest n with An=I", try a^n for increasing n.

3Explore it

Choose a transformation and change its angle (rotations and reflections) or scale factor k (stretches and enlargements). The red and green dots are the images of (1, 0) and (0, 1): they are the columns of the matrix. The grey dashed flag is the original; the blue flag is its image. The matrix and its determinant (the area scale factor) are shown below.

4Common mistakes & exam tips

Common mistakes

  • Multiplying combined matrices in the order the transformations are listed. "A then B" is BA.
  • Mixing up the rotation and reflection matrices: the reflection has 2θ and a −cos in the bottom right.
  • Putting the gradient of the mirror line in place of θ. The angle is θ=tan−1(gradient).
  • Forgetting the absolute value: an area scale factor of −3 means an area 3 times as big.
  • Describing a transformation incompletely. A rotation needs a centre, an angle and a direction.

Exam tips

  • "Describe fully" for a rotation: rotation, centre O, angle, anticlockwise (or clockwise).
  • For a stretch, give the scale factor and the invariant line (or the direction of the stretch).
  • Check a combined matrix by sending (1,0) through each transformation by hand.
  • For "smallest n such that An=I" with a rotation, find n so that nθ is a multiple of 2π.

5Practice

Fluency questions build the basics. Problem-solving questions make you think about which method to use.

FluencyP1
Write down the matrix for a vertical stretch with scale factor 3.
(1003)
FluencyP2
Find the image of (3,2) under a reflection in the line y=x.
θ=π4: (0110), image (2,3).
FluencyP3
Find the image of (4,0) under a rotation of π6 clockwise about O.
(3.46, −2)
FluencyP4
A square of area 5 cm² is transformed by (142−1). Find the area of the image.
|det|=|−1−8|=9; area 45 cm²
Problem solvingP5
Find the single matrix for a reflection in the x-axis followed by an enlargement, scale factor 2, centre O.
(2002)(100−1)=(200−2)
Problem solvingP6
Show that two successive reflections in y=x leave every point unchanged.
(0110)2=(1001)=I.

6Exam-style questions

Original questions in the style of the IB Maths AI HL exam, with full markschemes. Your GDC is allowed throughout: use it, but write down what you entered and what it gave you. Give yourself about 1 minute per mark.

Question 1Paper 1[5 marks]

The matrix R represents an anticlockwise rotation of 30° about the origin.

  • (a)Write down R, giving the elements to 3 significant figures.[1]
  • (b)Find the smallest positive integer n such that Rn=I.[2]
  • (c)Find the image of the point (4,2) under R.[2]
(a)
(0.866−0.50.50.866)A1
(b)
30n=360(M1)
n=12A1
(c)
R(42)(M1)
(2.46, 3.73)A1
Question 2Paper 1[7 marks]

The matrices P=(2113) and Q=(1−102) represent two transformations. A shape S is transformed by P, and its image is then transformed by Q.

  • (a)Find the single matrix that represents the combined transformation.[2]
  • (b)The area of S is 7.5 cm². Find the area of the final image.[2]
  • (c)A point of S is mapped to (−3,16) by the combined transformation. Find the coordinates of this point.[3]
(a)
QP(M1)
(1−226)A1
(b)
det(QP)=10(A1)
75 cm²A1
(c)
(QP)−1(−316)(M1)
110(62−21)(−316)(A1)
(1.4, 2.2)A1
Question 3Paper 2[9 marks]

An animator makes a spinning logo shrink. Each frame, the logo is transformed by M, a rotation of 40° anticlockwise about the origin followed by an enlargement with scale factor 0.9, centre the origin.

  • (a)Find M.[2]
  • (b)Find detM and interpret its value in this context.[2]
  • (c)The logo starts with an area of 50 cm². Find the number of frames after which its area is first less than 5 cm².[3]
  • (d)Find the smallest number of frames after which the logo is first back in its original orientation.[2]
(a)
0.9(cos40∘−sin40∘sin40∘cos40∘)(M1)
(0.689−0.5790.5790.689)A1
(b)
0.81A1
each frame, the area is multiplied by 0.81 (reduced by 19%)R1
(c)
50(0.81)n<5(M1)
n>10.9(A1)
11 framesA1
(d)
40n=360k(M1)
n=9A1

7Check yourself

Six quick questions, marked instantly. Aim for 6/6 before moving on. Fractions like 3/2 are accepted.

8Past-paper practice

Once you are scoring well above, try these real IB Maths AI HL questions on this topic. Your school or teacher will have the papers.

PaperQuestionFocusDifficulty
May 2023 · TZ2 · Paper 1Q13Combined transformation, its inverse and the area of the original★★☆
Nov 2022 · Paper 1Q9Area of an image; finding a point from its image★★☆
May 2025 · TZ1 · Paper 1Q13Describing a rotation matrix; a sequence of transformations★★☆
Nov 2024 · Paper 2Q6Rotations and enlargements in an animation★★☆
May 2022 · TZ1 · Paper 2Q7A transformation of the form P𝐫+𝐪★★★
Spotted a mistake on this page?Tell me and I'll fix it. The button opens an email with this page already named, or write to jamesashtonmaths@gmail.com.
Report a mistake