Skip to main content
Examonaut

Topic 3 · Lesson 2 of 4

Transformations and invariance

Matrices as transformations

A 2×22 \times 2 matrix M\mathbf{M} maps the point with position vector x\mathbf{x} to Mx\mathbf{Mx}. This is a linear transformation: the origin stays fixed, and straight lines map to straight lines. The key fact for finding matrices is:

The columns of M\mathbf{M} are the images of (10)\begin{pmatrix} 1 \\ 0 \end{pmatrix} and (01)\begin{pmatrix} 0 \\ 1 \end{pmatrix}.

So to find the matrix of a transformation, see where it sends the unit vectors. The standard matrices:

  • Reflection in the xx-axis: (100−1)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}; in the yy-axis: (−1001)\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}.
  • Reflection in y=xy = x: (0110)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}; in y=−xy = -x: (0−1−10)\begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}.
  • Rotation through θ\theta anticlockwise about OO: (cos⁡θ−sin⁡θsin⁡θcos⁡θ)\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}.
  • Stretch parallel to the xx-axis, scale factor kk: (k001)\begin{pmatrix} k & 0 \\ 0 & 1 \end{pmatrix}; parallel to the yy-axis: (100k)\begin{pmatrix} 1 & 0 \\ 0 & k \end{pmatrix}.
  • Enlargement, centre OO, scale factor kk: (k00k)\begin{pmatrix} k & 0 \\ 0 & k \end{pmatrix}.

The rotation matrix is in the formula booklet; the others are quickest to work out from the unit vectors.

Try it: choose a transformation, or type your own matrix, and watch where the unit square goes, with the determinant, the invariant lines and the inverse worked out below.

Try it: simulation

Matrix transformations

Loading the simulation…

Successive transformations

ABx=A(Bx)\mathbf{ABx} = \mathbf{A}(\mathbf{Bx}), so AB\mathbf{AB} means B\mathbf{B} first, then A\mathbf{A}. For example, reflecting in the yy-axis and then rotating 90°90° anticlockwise is

(0−110)(−1001)=(0−1−10)\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}

which is a single reflection in y=−xy = -x. Check with a point: (1,0)(1, 0) reflects to (−1,0)(-1, 0) and then rotates to (0,−1)(0, -1), and the matrix sends (1,0)(1, 0) to (0,−1)(0, -1) ✓.

Transformations in three dimensions

The same column rule works in 3D: the columns are the images of i\mathbf{i}, j\mathbf{j} and k\mathbf{k}. You need:

  • Reflection in the plane z=0z = 0: (10001000−1)\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1 \end{pmatrix} (and similarly for x=0x = 0 and y=0y = 0: change the sign of that coordinate).
  • Rotation through θ\theta about the zz-axis: (cos⁡θ−sin⁡θ0sin⁡θcos⁡θ0001)\begin{pmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \end{pmatrix}.
  • About the xx-axis: (1000cos⁡θ−sin⁡θ0sin⁡θcos⁡θ)\begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{pmatrix}; about the yy-axis: (cos⁡θ0sin⁡θ010−sin⁡θ0cos⁡θ)\begin{pmatrix} \cos\theta & 0 & \sin\theta \\ 0 & 1 & 0 \\ -\sin\theta & 0 & \cos\theta \end{pmatrix}.

The signs of the sin⁡θ\sin\theta entries for the yy-axis look reversed; that is because of the order of the axes. (Rotations are anticlockwise when you look from the positive end of the axis towards the origin.) All three are in the formula booklet.

The determinant as a scale factor

Under the transformation with matrix M\mathbf{M}, every area is multiplied by ∣det⁡M∣|\det\mathbf{M}|. If det⁡M<0\det\mathbf{M} < 0, the orientation is reversed: a shape labelled clockwise maps to one labelled anticlockwise, as with any reflection. In 3D, ∣det⁡M∣|\det\mathbf{M}| is the volume scale factor.

So a triangle of area 5 mapped by (312−1)\begin{pmatrix} 3 & 1 \\ 2 & -1 \end{pmatrix}, whose determinant is −5-5, has an image of area 25, with its orientation reversed. A singular matrix squashes the whole plane onto a line (or a point), so areas become zero and the transformation cannot be undone.

Invariant points and lines

An invariant point is mapped to itself: Mx=x\mathbf{Mx} = \mathbf{x}. An invariant line is mapped onto itself, though points on it may move along it. A line of invariant points is stronger: every point on it stays put.

To find invariant points, solve M(xy)=(xy)\mathbf{M}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} x \\ y \end{pmatrix}. To find invariant lines, take a general point (x,mx+c)(x, mx + c) on the line y=mx+cy = mx + c, find its image (x′,y′)(x', y'), and require y′=mx′+cy' = mx' + c for every xx. Comparing the coefficient of xx and the constant terms gives equations for mm and cc.

Worked example

Invariant lines

Find the invariant lines of the transformation with matrix (3−210)\begin{pmatrix} 3 & -2 \\ 1 & 0 \end{pmatrix}.

Show solution
  1. The point (x,mx+c)(x, mx + c) maps to x′=3x−2(mx+c)=(3−2m)x−2cx' = 3x - 2(mx + c) = (3 - 2m)x - 2c and y′=xy' = x.
  2. For the line to be invariant: x=m[(3−2m)x−2c]+cx = m\left[(3 - 2m)x - 2c\right] + c for all xx.
  3. Coefficients of xx: 1=3m−2m21 = 3m - 2m^2, so 2m2−3m+1=02m^2 - 3m + 1 = 0, giving m=1m = 1 or m=12m = \frac{1}{2}.
  4. Constants: 0=c(1−2m)0 = c(1 - 2m). With m=1m = 1 this forces c=0c = 0; with m=12m = \frac{1}{2} any cc works.
  5. Invariant lines: y=xy = x, and every line y=12x+cy = \frac{1}{2}x + c.
  6. On y=xy = x, the point (x,x)(x, x) maps to (x,x)(x, x): it is a line of invariant points.

Practise this topic

Both are part of Premium.