Free access until 31 December 2026 · Physics and Maths questions and notes, updated continuously · Build a test

ExaminerPrep › IB Maths AI › Notes

IB Maths AI · Topic 3 · 3.8 · HL only

Matrix transformations

This note shows how \( 2\times2 \) matrices describe transformations of the plane: reflections, stretches, enlargements and rotations about the origin. You will learn to build matrices, combine transformations, use the determinant to find area scale factors, and reverse a transformation with an inverse matrix.

Key ideas

A point \( (x, y) \) is written as a column vector \( \begin{pmatrix} x \\ y \end{pmatrix} \). Multiplying it on the left by a \( 2\times2 \) matrix \( \mathbf{M} \) gives the image point: \[ \begin{pmatrix} x' \\ y' \end{pmatrix} = \mathbf{M}\begin{pmatrix} x \\ y \end{pmatrix}. \] These transformations all keep the origin fixed, and they send straight lines to straight lines.

  • Columns of the matrix. The first column of \( \mathbf{M} \) is the image of \( (1, 0) \) and the second column is the image of \( (0, 1) \). This is the quickest way to write down a matrix.
  • Reflections. In the \( x \)-axis, the \( y \)-axis, and the lines \( y = x \) and \( y = -x \).
  • Stretches. A horizontal stretch with scale factor \( k \) multiplies \( x \)-coordinates by \( k \) and leaves \( y \) alone. A vertical stretch does the same to \( y \).
  • Enlargement with centre the origin and scale factor \( k \) multiplies both coordinates by \( k \).
  • Rotation about the origin through angle \( \theta \) anticlockwise. For a clockwise rotation, replace \( \theta \) by \( -\theta \).
  • Composite transformations. If transformation \( \mathbf{A} \) is applied first and then \( \mathbf{B} \), the combined matrix is \( \mathbf{BA} \). The matrix for the first transformation is on the right, closest to the point. Matrix multiplication is not commutative, so order matters.
  • Determinant and area. For \( \mathbf{M} = \begin{pmatrix} a & b \\ c & d \end{pmatrix} \), \( \det\mathbf{M} = ad - bc \). The area scale factor is \( |\det\mathbf{M}| \). A negative determinant means the shape is flipped over (as in a reflection). If \( \det\mathbf{M} = 0 \), everything is flattened onto a line or point, and there is no inverse.
  • Inverse transformation. The inverse matrix \( \mathbf{M}^{-1} \) undoes \( \mathbf{M} \). For \( \det\mathbf{M} \ne 0 \), \( \mathbf{M}^{-1} = \dfrac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix} \). Your GDC can also find matrix products, determinants and inverses.
  • Transforming a line or shape. Transform some points (for a line, two points are enough, or use the substitution method below) and then join or re-fit.

Definitions and formulae

Term or formulaMeaning / when to use
\( \begin{pmatrix} 1&0 \\ 0&-1 \end{pmatrix} \)Reflection in the \( x \)-axis.
\( \begin{pmatrix} -1&0 \\ 0&1 \end{pmatrix} \)Reflection in the \( y \)-axis.
\( \begin{pmatrix} 0&1 \\ 1&0 \end{pmatrix} \)Reflection in the line \( y = x \).
\( \begin{pmatrix} 0&-1 \\ -1&0 \end{pmatrix} \)Reflection in the line \( y = -x \).
\( \begin{pmatrix} k&0 \\ 0&1 \end{pmatrix} \), \( \begin{pmatrix} 1&0 \\ 0&k \end{pmatrix} \)Horizontal stretch, vertical stretch (scale factor \( k \)).
\( \begin{pmatrix} k&0 \\ 0&k \end{pmatrix} \)Enlargement, centre the origin, scale factor \( k \). Area scale factor \( k^2 \).
\( \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} \)Rotation about the origin through \( \theta \) anticlockwise.
\( \mathbf{BA} \)Apply \( \mathbf{A} \) first, then \( \mathbf{B} \).
\( \text{image area} = |\det\mathbf{M}| \times \text{original area} \)Area scale factor.
\( \mathbf{M}^{-1} \)Reverses the transformation \( \mathbf{M} \).

Worked examples

Example 1 A triangle has vertices \( P(1,1) \), \( Q(4,1) \), \( R(1,3) \). It is rotated \( 90^\circ \) anticlockwise about the origin and then stretched horizontally with scale factor 2. (a) Find the single matrix for the combined transformation. (b) Find the image of the triangle. (c) Check the area using the determinant.

(a) Rotation \( 90^\circ \) anticlockwise: \( \mathbf{A} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \) (from \( \cos 90^\circ = 0 \), \( \sin 90^\circ = 1 \)). Stretch: \( \mathbf{B} = \begin{pmatrix} 2 & 0 \\ 0 & 1 \end{pmatrix} \).

The rotation is first, so the combined matrix is \( \mathbf{BA} = \begin{pmatrix} 2&0 \\ 0&1 \end{pmatrix}\begin{pmatrix} 0&-1 \\ 1&0 \end{pmatrix} = \begin{pmatrix} 0 & -2 \\ 1 & 0 \end{pmatrix} \).

(b) \( P \): \( \begin{pmatrix} 0&-2 \\ 1&0 \end{pmatrix}\begin{pmatrix} 1 \\ 1 \end{pmatrix} = \begin{pmatrix} -2 \\ 1 \end{pmatrix} \). \( Q \): \( \begin{pmatrix} 0 \cdot 4 - 2 \cdot 1 \\ 1 \cdot 4 + 0 \end{pmatrix} = \begin{pmatrix} -2 \\ 4 \end{pmatrix} \). \( R \): \( \begin{pmatrix} 0 \cdot 1 - 2 \cdot 3 \\ 1 \cdot 1 + 0 \end{pmatrix} = \begin{pmatrix} -6 \\ 1 \end{pmatrix} \).

(c) Original area \( = \tfrac12 \times 3 \times 2 = 3 \). \( \det(\mathbf{BA}) = (0)(0) - (-2)(1) = 2 \). Image area \( = 2 \times 3 = 6 \).

Direct check: the image has a vertical side from \( (-2,1) \) to \( (-2,4) \) of length 3, and the third vertex is 4 units to the left, so area \( = \tfrac12 \times 3 \times 4 = 6 \).

Answer: \( \begin{pmatrix} 0&-2 \\ 1&0 \end{pmatrix} \); image vertices \( (-2,1) \), \( (-2,4) \), \( (-6,1) \); area 6.

Example 2 The transformation \( \mathbf{T} \) is a reflection in the line \( y = x \) followed by an enlargement with scale factor 3 and centre the origin. Find \( \mathbf{T} \) and the image of the line \( y = 2x + 1 \).

Reflection: \( \begin{pmatrix} 0&1 \\ 1&0 \end{pmatrix} \). Enlargement: \( \begin{pmatrix} 3&0 \\ 0&3 \end{pmatrix} \).

\( \mathbf{T} = \begin{pmatrix} 3&0 \\ 0&3 \end{pmatrix}\begin{pmatrix} 0&1 \\ 1&0 \end{pmatrix} = \begin{pmatrix} 0&3 \\ 3&0 \end{pmatrix} \).

A point \( (x, y) \) maps to \( (X, Y) = (3y, 3x) \). So \( x = \dfrac{Y}{3} \) and \( y = \dfrac{X}{3} \).

Substitute into \( y = 2x + 1 \): \( \dfrac{X}{3} = \dfrac{2Y}{3} + 1 \). Multiply by 3: \( X = 2Y + 3 \), so \( Y = \tfrac12 X - \tfrac32 \).

Check: \( (0, 1) \) is on the original line and maps to \( (3, 0) \). In the image line, \( \tfrac12(3) - \tfrac32 = 0 \). It matches.

Answer: \( \mathbf{T} = \begin{pmatrix} 0&3 \\ 3&0 \end{pmatrix} \); image line \( y = \tfrac12 x - \tfrac32 \).

Example 3 A transformation has matrix \( \mathbf{M} = \begin{pmatrix} 3&1 \\ 2&2 \end{pmatrix} \). (a) A region of area 5.5 is transformed. Find the area of its image. (b) Find \( \mathbf{M}^{-1} \) and the point that maps to \( (7, 6) \).

(a) \( \det\mathbf{M} = (3)(2) - (1)(2) = 4 \). Area of image \( = 4 \times 5.5 = 22 \).

(b) \( \mathbf{M}^{-1} = \dfrac14\begin{pmatrix} 2 & -1 \\ -2 & 3 \end{pmatrix} \).

The original point is \( \mathbf{M}^{-1}\begin{pmatrix} 7 \\ 6 \end{pmatrix} = \dfrac14\begin{pmatrix} 14 - 6 \\ -14 + 18 \end{pmatrix} = \dfrac14\begin{pmatrix} 8 \\ 4 \end{pmatrix} = \begin{pmatrix} 2 \\ 1 \end{pmatrix} \).

Check: \( \mathbf{M}\begin{pmatrix} 2 \\ 1 \end{pmatrix} = \begin{pmatrix} 6+1 \\ 4+2 \end{pmatrix} = \begin{pmatrix} 7 \\ 6 \end{pmatrix} \).

Answer: area 22; the point is \( (2, 1) \).

Common errors

  • Common error: multiplying the matrices in the wrong order. "A then B" is \( \mathbf{BA} \), not \( \mathbf{AB} \).
  • Common error: writing the point as a row and multiplying on the right. Use a column vector and multiply on the left.
  • Common error: using the determinant as the area scale factor with its sign. Use \( |\det\mathbf{M}| \); a negative sign only tells you the shape is flipped.
  • Common error: using the anticlockwise rotation matrix for a clockwise rotation. Replace \( \theta \) with \( -\theta \) (the signs of the \( \sin\theta \) entries swap).
  • Common error: for an enlargement, using \( k \) as the area scale factor. It is \( k^2 \).

Exam tip: Describe a transformation fully: give the type, and the key details (the mirror line, the scale factor, the angle and direction). For a composite, state the order you used before multiplying.

Check yourself

  1. Find the image of \( (3, -2) \) under a reflection in the \( y \)-axis.
    Answer\( \begin{pmatrix} -1&0 \\ 0&1 \end{pmatrix}\begin{pmatrix} 3 \\ -2 \end{pmatrix} = \begin{pmatrix} -3 \\ -2 \end{pmatrix} \), so \( (-3, -2) \).
  2. Find the single matrix for a vertical stretch with scale factor 3 followed by a reflection in the \( x \)-axis.
    Answer\( \begin{pmatrix} 1&0 \\ 0&-1 \end{pmatrix}\begin{pmatrix} 1&0 \\ 0&3 \end{pmatrix} = \begin{pmatrix} 1&0 \\ 0&-3 \end{pmatrix} \).
  3. A shape of area 3 is transformed by \( \begin{pmatrix} 4&-1 \\ 2&3 \end{pmatrix} \). Find the area of the image.
    Answer\( \det = (4)(3) - (-1)(2) = 14 \). Area \( = 14 \times 3 = 42 \).
  4. Find the image of \( (4, 0) \) under a rotation of \( 60^\circ \) clockwise about the origin.
    AnswerUse \( \theta = -60^\circ \): \( \begin{pmatrix} \cos(-60^\circ) & -\sin(-60^\circ) \\ \sin(-60^\circ) & \cos(-60^\circ) \end{pmatrix} = \begin{pmatrix} \tfrac12 & \tfrac{\sqrt3}{2} \\ -\tfrac{\sqrt3}{2} & \tfrac12 \end{pmatrix} \). Image \( = (2,\ -2\sqrt3) \approx (2, -3.46) \).