C3 - Transformations in two dimensions

C3 - Transformations in two dimensions

How can four matrix entries describe what happens to every point in a plane? You will use the images of two unit vectors to build a transformation matrix, recognise rotations, reflections, stretches and enlargements, and recover a matrix from other known images. The geometry explains why the columns matter.

Images of basis vectors

Can knowing the images of just two points determine the image of every point? For a linear transformation, choose the two unit vectors along the coordinate axes. Every position vector can be built from them.

Write

e1=(10),e2=(01),r=(xy)=xe1+ye2\mathbf{e}_1=\begin{pmatrix}1\\0\end{pmatrix},\qquad \mathbf{e}_2=\begin{pmatrix}0\\1\end{pmatrix},\qquad \mathbf{r}=\begin{pmatrix}x\\y\end{pmatrix}=x\mathbf{e}_1+y\mathbf{e}_2

A linear transformation preserves addition and scalar multiplication: transforming a combination gives the same combination of the transformed vectors. Consequently,

T(xe1+ye2)=xT(e1)+yT(e2)T(x\mathbf{e}_1+y\mathbf{e}_2)=xT(\mathbf{e}_1)+yT(\mathbf{e}_2)

It also sends the origin to the origin, since T(0)=0T(\mathbf{0})=\mathbf{0}. A non-zero translation is therefore not represented by a 2×22\times2 matrix acting on these position vectors.

Transformation matrix

For column vectors, the matrix of a linear transformation is

M=(abcd),r′=Mr\mathbf{M}=\begin{pmatrix}a&b\\c&d\end{pmatrix},\qquad \mathbf{r}'=\mathbf{M}\mathbf{r}

Its first column is T(e1)=(ac)T(\mathbf{e}_1)=\begin{pmatrix}a\\c\end{pmatrix}; its second is T(e2)=(bd)T(\mathbf{e}_2)=\begin{pmatrix}b\\d\end{pmatrix}. The prime labels an image, not a derivative.

Thus Mr\mathbf{M}\mathbf{r} is the image of r\mathbf{r}. Matrix multiplication already builds the correct combination of the two columns:

(abcd)(xy)=x(ac)+y(bd)\begin{pmatrix}a&b\\c&d\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix} =x\begin{pmatrix}a\\c\end{pmatrix}+y\begin{pmatrix}b\\d\end{pmatrix}

[DIAGRAM: asset_name: Two columns determine the plane transformation; asset_slug: aqa7367-basis-images; caption: The images of the unit vectors form the columns and determine the image of every linear combination; description: Two coordinate plots show the original unit square and the parallelogram obtained under the matrix with columns (2,1) and (1,2). The first unit vector and its image are blue; the second and its image are sage. The vertex (1,1) maps to (3,3), the sum of the two column vectors.]
The images of the unit vectors form the columns and determine the image of every linear combination

Worked example 1: using the two columns

Question. A linear transformation sends e1\mathbf{e}_1 to (21)\begin{pmatrix}2\\1\end{pmatrix} and e2\mathbf{e}_2 to (12)\begin{pmatrix}1\\2\end{pmatrix}. Find its matrix and the image of P(2,−1)P(2,-1).

Plan. Place the two given images in columns, then multiply the position vector of PP.

M=(2112),M(2−1)=(4−12−2)=(30)\mathbf{M}=\begin{pmatrix}2&1\\1&2\end{pmatrix},\qquad \mathbf{M}\begin{pmatrix}2\\-1\end{pmatrix} =\begin{pmatrix}4-1\\2-2\end{pmatrix} =\begin{pmatrix}3\\0\end{pmatrix}

Answer. M=(2112)\mathbf{M}=\begin{pmatrix}2&1\\1&2\end{pmatrix} and P′=(3,0)P'=(3,0).

Check. The input is 2e1−e22\mathbf{e}_1-\mathbf{e}_2. Combining its images gives 2(2,1)−(1,2)=(3,0)2(2,1)-(1,2)=(3,0), independently confirming the row calculations.

Change only the sign of the second input coordinate. It now adds the second column instead of subtracting it.

Worked example 2: changing one input coefficient

Question. For the same transformation, find the image of Q(2,1)Q(2,1).

Plan. Multiply the same matrix by the new position vector.

(2112)(21)=(4+12+2)=(54)\begin{pmatrix}2&1\\1&2\end{pmatrix}\begin{pmatrix}2\\1\end{pmatrix} =\begin{pmatrix}4+1\\2+2\end{pmatrix} =\begin{pmatrix}5\\4\end{pmatrix}

Answer. Q′=(5,4)Q'=(5,4).

Check. From PP to QQ, the input changes by 2e22\mathbf{e}_2. The output should change by 2(1,2)=(2,4)2(1,2)=(2,4). Indeed, (5,4)−(3,0)=(2,4)(5,4)-(3,0)=(2,4).

Rows combine input coordinates; columns record basis-vector images. Those are different descriptions of the same multiplication.

Watch out

If e1↦(2,1)\mathbf{e}_1\mapsto(2,1), put 2 above 1 in the first column. Writing the images as rows usually represents a different transformation.

Use fresh basis images for your turn.

Rotations, reflections and scalings

A familiar movement gives a matrix once you know where the unit vectors go. For an anticlockwise rotation through θ\theta, the unit vectors finish at angles θ\theta and θ+π2\theta+\frac{\pi}{2}, giving columns (cos⁡θ,sin⁡θ)(\cos\theta,\sin\theta) and (−sin⁡θ,cos⁡θ)(-\sin\theta,\cos\theta).

Rotation and reflection in the plane

An anticlockwise rotation through θ\theta about the origin has matrix

Rθ=(cos⁡θ−sin⁡θsin⁡θcos⁡θ)\mathbf{R}_{\theta}=\begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}

Reflection in the line through the origin making angle α\alpha with the positive xx-axis has matrix

Fα=(cos⁡2αsin⁡2αsin⁡2α−cos⁡2α)\mathbf{F}_{\alpha}=\begin{pmatrix}\cos2\alpha&\sin2\alpha\\\sin2\alpha&-\cos2\alpha\end{pmatrix}

For a non-vertical line, its equation is y=(tan⁡α)xy=(\tan\alpha)x. For the vertical line x=0x=0, use α=π2\alpha=\frac{\pi}{2} directly in the matrix. Both matrices are in the formula booklet.

For reflection, an incoming direction at angle β\beta leaves at angle 2α−β2\alpha-\beta: the mirror line bisects the angle between them. Applying that rule to the two unit vectors explains the doubled angle in the formula. A clockwise rotation through a positive angle ϕ\phi uses θ=−ϕ\theta=-\phi.

Worked example 3: a rotation through sixty degrees

Question. Find the matrix of an anticlockwise rotation through π3\frac{\pi}{3} about the origin and the image of (2,0)(2,0).

Plan. Substitute exact trigonometric values into the rotation matrix, then multiply.

R=(12−323212),R(20)=(13)\mathbf{R}=\begin{pmatrix}\frac12&-\frac{\sqrt3}{2}\\\frac{\sqrt3}{2}&\frac12\end{pmatrix},\qquad \mathbf{R}\begin{pmatrix}2\\0\end{pmatrix}=\begin{pmatrix}1\\\sqrt3\end{pmatrix}

Answer. The matrix is R\mathbf{R} above; the image is (1,3)(1,\sqrt3).

Check. The image has distance 1+3=2\sqrt{1+3}=2 from the origin and direction π3\frac{\pi}{3}, as a rotation requires.

Keep the first basis-vector image the same, but change the second by using a reflection. One point image can agree even when two transformations differ.

Worked example 4: a reflection with the same first column

Question. Find the matrix of reflection in y=x3y=\frac{x}{\sqrt3} and the image of (2,0)(2,0).

Plan. The mirror angle is α=π6\alpha=\frac{\pi}{6}; use 2α=π32\alpha=\frac{\pi}{3} in the reflection matrix.

F=(123232−12),F(20)=(13)\mathbf{F}=\begin{pmatrix}\frac12&\frac{\sqrt3}{2}\\\frac{\sqrt3}{2}&-\frac12\end{pmatrix},\qquad \mathbf{F}\begin{pmatrix}2\\0\end{pmatrix}=\begin{pmatrix}1\\\sqrt3\end{pmatrix}

Answer. The matrix is F\mathbf{F} above; the image is again (1,3)(1,\sqrt3).

Check. The midpoint (32,32)(\frac32,\frac{\sqrt3}{2}) lies on the mirror line. The joining segment has slope −3-\sqrt3, perpendicular to its slope 13\frac1{\sqrt3}. These are the two geometric conditions for reflection.

The second columns differ, so the two transformations do not agree everywhere. For instance, they send (0,1)(0,1) to different points.

Some useful special cases follow immediately:

TransformationMatrix
Reflection in y=0y=0, the xx-axis(100−1)\begin{pmatrix}1&0\\0&-1\end{pmatrix}
Reflection in x=0x=0, 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}
Reflection in y=−xy=-x(0−1−10)\begin{pmatrix}0&-1\\-1&0\end{pmatrix}

A stretch parallel to the xx-axis with positive factor kk sends (x,y)(x,y) to (kx,y)(kx,y); its matrix is diag⁡(k,1)\operatorname{diag}(k,1). A stretch parallel to the yy-axis uses diag⁡(1,k)\operatorname{diag}(1,k). Here diag⁡\operatorname{diag} means a diagonal matrix with the listed entries. An enlargement with centre the origin and signed scale factor kk sends (x,y)(x,y) to (kx,ky)(kx,ky), so its matrix is kIk\mathbf{I}. The name enlargement includes positive factors below 1, which reduce lengths. A negative factor also puts each non-zero point on the opposite ray; factor zero collapses every point to the origin. These scaling matrices follow from the basis images and are not separately printed in the booklet.

Worked example 5: stretching one coordinate

Question. Find the matrix of a stretch parallel to the xx-axis with factor 3, and its image of (2,−1)(2,-1).

Plan. Multiply the first coordinate by 3 and leave the second unchanged.

S=(3001),S(2−1)=(6−1)\mathbf{S}=\begin{pmatrix}3&0\\0&1\end{pmatrix},\qquad \mathbf{S}\begin{pmatrix}2\\-1\end{pmatrix}=\begin{pmatrix}6\\-1\end{pmatrix}

Answer. S=diag⁡(3,1)\mathbf{S}=\operatorname{diag}(3,1); the image is (6,−1)(6,-1).

Check. The point stays on the horizontal line y=−1y=-1, and its distance from the yy-axis changes from 2 to 6.

Change only the second diagonal entry from 1 to 3. Both coordinates now scale equally.

Worked example 6: scaling both coordinates

Question. Find the matrix of an enlargement with centre the origin and scale factor 3, and its image of (2,−1)(2,-1).

Plan. Multiply both coordinates by 3.

E=(3003),E(2−1)=(6−3)\mathbf{E}=\begin{pmatrix}3&0\\0&3\end{pmatrix},\qquad \mathbf{E}\begin{pmatrix}2\\-1\end{pmatrix}=\begin{pmatrix}6\\-3\end{pmatrix}

Answer. E=3I\mathbf{E}=3\mathbf{I}; the image is (6,−3)(6,-3).

Check. The original and image have the same direction, and their distances from the origin are 5\sqrt5 and 353\sqrt5. Lengths scale by 3.

A stretch factor applies perpendicular to its fixed axis: a stretch parallel to the xx-axis leaves the yy-axis fixed. State the direction of the stretch, rather than just saying “stretch factor 3”.

Watch out

For reflection, use twice the mirror-line angle. Reflection in a line at angle α\alpha is not rotation through α\alpha; even when one point has the same image, the second basis-vector image distinguishes them.

Apply the reflection formula to another mirror line.

Finding a transformation matrix

The given points need not be unit vectors. If two input vectors are independent, you can combine them to recover e1\mathbf{e}_1 and e2\mathbf{e}_2, then make the columns from their images. Independent means neither vector is a scalar multiple of the other; otherwise their images leave a whole direction undetermined.

For u=(1,1)T\mathbf{u}=(1,1)^{\mathsf T} and v=(1,−1)T\mathbf{v}=(1,-1)^{\mathsf T}, adding and subtracting give

e1=12(u+v),e2=12(u−v)\mathbf{e}_1=\tfrac12(\mathbf{u}+\mathbf{v}),\qquad \mathbf{e}_2=\tfrac12(\mathbf{u}-\mathbf{v})

Linearity allows exactly the same combinations of the images. Alternatively, write M=(abcd)\mathbf{M}=\begin{pmatrix}a&b\\c&d\end{pmatrix} and solve for the four entries.

Worked example 7: recovering the basis images

Question. A linear transformation sends (11)\begin{pmatrix}1\\1\end{pmatrix} to (31)\begin{pmatrix}3\\1\end{pmatrix} and (1−1)\begin{pmatrix}1\\-1\end{pmatrix} to (13)\begin{pmatrix}1\\3\end{pmatrix}. Find its matrix.

Plan. Add and subtract the image vectors to obtain the two columns.

T(e1)=12[(31)+(13)]=(22)T(e2)=12[(31)−(13)]=(1−1)\begin{aligned} T(\mathbf{e}_1)&=\tfrac12\left[\begin{pmatrix}3\\1\end{pmatrix}+\begin{pmatrix}1\\3\end{pmatrix}\right]=\begin{pmatrix}2\\2\end{pmatrix}\\ T(\mathbf{e}_2)&=\tfrac12\left[\begin{pmatrix}3\\1\end{pmatrix}-\begin{pmatrix}1\\3\end{pmatrix}\right]=\begin{pmatrix}1\\-1\end{pmatrix} \end{aligned}

Answer. M=(212−1)\mathbf{M}=\begin{pmatrix}2&1\\2&-1\end{pmatrix}.

Check. Its column sum is (3,1)T(3,1)^{\mathsf T}, and first column minus second is (1,3)T(1,3)^{\mathsf T}. Both supplied images are recovered.

Keep the inputs and first output unchanged; change only the second output. Watch how this alters both recovered columns.

Worked example 8: changing one known image

Question. A linear transformation sends (11)\begin{pmatrix}1\\1\end{pmatrix} to (31)\begin{pmatrix}3\\1\end{pmatrix} and (1−1)\begin{pmatrix}1\\-1\end{pmatrix} to (−11)\begin{pmatrix}-1\\1\end{pmatrix}. Find its matrix.

Plan. Use the same half-sum and half-difference of the new outputs.

T(e1)=12(22)=(11),T(e2)=12(40)=(20)T(\mathbf{e}_1)=\tfrac12\begin{pmatrix}2\\2\end{pmatrix}=\begin{pmatrix}1\\1\end{pmatrix},\qquad T(\mathbf{e}_2)=\tfrac12\begin{pmatrix}4\\0\end{pmatrix}=\begin{pmatrix}2\\0\end{pmatrix}

Answer. M=(1210)\mathbf{M}=\begin{pmatrix}1&2\\1&0\end{pmatrix}.

Check. Writing unknown entries instead gives a+b=3a+b=3, a−b=−1a-b=-1, c+d=1c+d=1, c−d=1c-d=1. Their solution is a=1a=1, b=2b=2, c=1c=1, d=0d=0, confirming the matrix independently.

This answers the opening question: two independent input images determine the entire linear transformation. Two arbitrary points do not suffice if their position vectors lie along the same line through the origin. Also check any stated origin image: a proposed non-zero image of the origin rules out linearity immediately.

Quick Recap

  • A matrix acts on a column vector; its columns are the images of the coordinate unit vectors.
  • Rotations use the turning angle; reflections use twice the mirror-line angle.
  • A stretch changes one coordinate scale; an enlargement about the origin changes both equally.
  • Two independent input images determine a unique linear transformation.

Four entries describe the whole plane because every position vector is a combination of two basis vectors.