1.4 - Matrices for plane transformations

1.4 - Matrices for plane transformations

A two-by-two matrix can transform an entire plane, yet two carefully chosen images determine the whole transformation. Construct these matrices, recognise rotations, reflections, enlargements, stretches and shears, and use the determinant to calculate how areas change.

Images of basis vectors

How can knowing where just two arrows go tell you where every point goes? The key is to choose the unit arrows along the coordinate axes.

Write

e1=(10),e2=(01).\mathbf e_1=\begin{pmatrix}1\\0\end{pmatrix}, \qquad \mathbf e_2=\begin{pmatrix}0\\1\end{pmatrix}.

For example, (3−2)=3e1−2e2\begin{pmatrix}3\\-2\end{pmatrix}=3\mathbf e_1-2\mathbf e_2. Matrix multiplication respects this combination: if the images of e1,e2\mathbf e_1,\mathbf e_2 are u,v\mathbf u,\mathbf v, the image of that point is 3u−2v3\mathbf u-2\mathbf v.

Matrix transformation

The matrix M\mathbf M represents the transformation taking a point with position vector r\mathbf r to the point with position vector Mr\mathbf M\mathbf r.

For M=(abcd)\mathbf M=\begin{pmatrix}a&b\\c&d\end{pmatrix}, writing the image as (X,Y)(X,Y) gives X=ax+byX=ax+by and Y=cx+dyY=cx+dy.

The first column is Me1\mathbf M\mathbf e_1, and the second is Me2\mathbf M\mathbf e_2. This explains both their positions and their order.

[DIAGRAM: asset_name: Basis vectors determine the transformed square; asset_slug: cam9231-transformed-basis; caption: The columns are the images of the unit arrows and the square becomes a parallelogram; description: Two exact coordinate plots show the unit square with basis vectors (1,0) and (0,1), then its image under the matrix with columns (2,1) and (-1,3). The image vertices are (0,0), (2,1), (1,4), (-1,3). Blue and clay consistently identify the first and second basis images, and the far corner is their sum.]
The columns are the images of the unit arrows and the square becomes a parallelogram

Every matrix transformation of this form fixes the origin, since M0=0\mathbf M\mathbf0=\mathbf0. A translation by a nonzero vector cannot be represented by a two-by-two matrix acting on these position vectors.

Constructing the matrix from two images

If

e1↦(ac),e2↦(bd),\mathbf e_1\mapsto\begin{pmatrix}a\\c\end{pmatrix}, \qquad \mathbf e_2\mapsto\begin{pmatrix}b\\d\end{pmatrix},

then

M=(abcd).\mathbf M=\begin{pmatrix}a&b\\c&d\end{pmatrix}.

Put the images in columns, in the order e1,e2\mathbf e_1,\mathbf e_2. Not in the formula booklet: learn it.

You can use the same idea when information is supplied in a less familiar form: first recover the two unit-arrow images by adding or subtracting the given vectors.

Worked example 1: constructing the columns

Question. A transformation sends (1,0)(1,0) to (2,1)(2,1) and (0,1)(0,1) to (−1,3)(-1,3). Find its matrix and the image of P(3,−2)P(3,-2).

Plan. Put the given images into the two columns, then multiply the position vector of PP.

M=(2−113),M(3−2)=(6+23−6)=(8−3).\mathbf M=\begin{pmatrix}2&-1\\1&3\end{pmatrix}, \qquad \mathbf M\begin{pmatrix}3\\-2\end{pmatrix} =\begin{pmatrix}6+2\\3-6\end{pmatrix} =\begin{pmatrix}8\\-3\end{pmatrix}.

Answer. The matrix is (2−113)\begin{pmatrix}2&-1\\1&3\end{pmatrix}, and PP maps to (8,−3)(8,-3).

Check. The vector construction gives 3(2,1)−2(−1,3)=(8,−3)3(2,1)-2(-1,3)=(8,-3), using the given arrows rather than the matrix entries.

Keep the transformation unchanged, but replace the unit arrows by two diagonal arrows. The extra decision is how to reconstruct the unit arrows.

Worked example 2: recovering the unit arrows

Question. A matrix transformation sends (1,1)(1,1) to (1,4)(1,4) and (1,−1)(1,-1) to (3,−2)(3,-2). Find its matrix.

Plan. Add and subtract the given input vectors, doing the same to their images.

Adding the inputs gives (2,0)=2e1(2,0)=2\mathbf e_1. Subtracting the second from the first gives (0,2)=2e2(0,2)=2\mathbf e_2. Hence

Me1=12(1+34−2)=(21)Me2=12(1−34−(−2))=(−13).\begin{aligned} \mathbf M\mathbf e_1&=\frac12\begin{pmatrix}1+3\\4-2\end{pmatrix} =\begin{pmatrix}2\\1\end{pmatrix}\\ \mathbf M\mathbf e_2&=\frac12\begin{pmatrix}1-3\\4-(-2)\end{pmatrix} =\begin{pmatrix}-1\\3\end{pmatrix}. \end{aligned}

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

Check. Its column sum is (1,4)(1,4) and its first column minus its second is (3,−2)(3,-2). Both supplied images are recovered.

Two input vectors determine the matrix uniquely when neither is a multiple of the other. Two arrows along the same line do not generally determine what happens away from that line.

Watch out

The images are columns, not rows. If (1,0)↦(2,1)(1,0)\mapsto(2,1), the first column must be (21)\begin{pmatrix}2\\1\end{pmatrix}; its two coordinates do not form the first row.

Recover the columns before finding another point image.

Rotations, reflections and stretches

Recognising a matrix means describing its geometry completely, including its centre, axis or direction.

Start with a rotation anticlockwise through θ\theta about the origin. The first unit arrow turns to (cos⁡θ,sin⁡θ)(\cos\theta,\sin\theta); the second starts a right angle further round, so it turns to (−sin⁡θ,cos⁡θ)(-\sin\theta,\cos\theta). Those two images give the rotation matrix.

A reflection in the line making angle θ\theta with the positive xx-axis takes an arrow at angle ϕ\phi to one at angle 2θ−ϕ2\theta-\phi. Apply that to the two unit arrows to obtain its two columns. For instance, reflection in y=xy=x exchanges (1,0)(1,0) and (0,1)(0,1).

Standard plane transformations

All centres and fixed axes below pass through the origin.

TransformationMatrixAnticlockwise rotation through θ(cos⁡θ−sin⁡θsin⁡θcos⁡θ)Reflection in the line at angle θ(cos⁡2θsin⁡2θsin⁡2θ−cos⁡2θ)Enlargement, scale factor k(k00k)Stretch parallel to the x-axis, factor s(s001)Stretch parallel to the y-axis, factor s(100s)Shear parallel to the x-axis, factor h(1h01)Shear parallel to the y-axis, factor h(10h1)\begin{array}{c|c} \text{Transformation}&\text{Matrix}\\ \hline \text{Anticlockwise rotation through }\theta& \begin{pmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{pmatrix}\\[6pt] \text{Reflection in the line at angle }\theta& \begin{pmatrix}\cos2\theta&\sin2\theta\\\sin2\theta&-\cos2\theta\end{pmatrix}\\[6pt] \text{Enlargement, scale factor }k& \begin{pmatrix}k&0\\0&k\end{pmatrix}\\[6pt] \text{Stretch parallel to the }x\text{-axis, factor }s& \begin{pmatrix}s&0\\0&1\end{pmatrix}\\[6pt] \text{Stretch parallel to the }y\text{-axis, factor }s& \begin{pmatrix}1&0\\0&s\end{pmatrix}\\[6pt] \text{Shear parallel to the }x\text{-axis, factor }h& \begin{pmatrix}1&h\\0&1\end{pmatrix}\\[6pt] \text{Shear parallel to the }y\text{-axis, factor }h& \begin{pmatrix}1&0\\h&1\end{pmatrix} \end{array}

The reflection angle describes its mirror line, not the angle through which every point turns. Not in the formula booklet: learn it.

These arrays express simple coordinate rules. The stretch (x,y)↦(3x,y)(x,y)\mapsto(3x,y) multiplies horizontal distances from the yy-axis by 33, leaving the yy-axis fixed point by point. The enlargement (x,y)↦(3x,3y)(x,y)\mapsto(3x,3y) multiplies both coordinates; its centre is the origin. A negative enlargement factor also reverses every ray through the origin. Factor zero collapses the plane to the origin.

For the stretches in the table, a positive factor gives the usual one-direction stretch or compression. A negative factor additionally reverses that coordinate's sign, and zero collapses onto the fixed axis.

A horizontal shear has X=x+hy, Y=yX=x+hy,\ Y=y: the horizontal displacement is hyhy, so each point on the xx-axis stays fixed. A vertical shear instead has X=x, Y=y+hxX=x,\ Y=y+hx, fixing the yy-axis. A shear factor needs its sign and the direction of the shear to be meaningful.

Worked example 3: describing a positive shear

Question. Give full geometrical details of the transformation represented by H=(1201)\mathbf H=\begin{pmatrix}1&2\\0&1\end{pmatrix}, and find the image of P(1,3)P(1,3).

Plan. Read the coordinate rule, identify the fixed axis, and use the image of a unit point to specify the shear.

X=x+2y,Y=y.X=x+2y,\qquad Y=y.

Thus the motion is parallel to the xx-axis and its displacement is 2y2y. When y=0y=0, the displacement is zero. Also (0,1)↦(2,1)(0,1)\mapsto(2,1).

For PP, X=1+2(3)=7, Y=3X=1+2(3)=7,\ Y=3.

Answer. A shear parallel to the xx-axis, with the xx-axis fixed and shear factor 22; P↦(7,3)P\mapsto(7,3).

Check. The point keeps its height 33 and moves horizontally by 66, twice its original height, as the description requires.

Change only the sign of the shear factor. The fixed axis stays the same; the displacement reverses.

Worked example 4: reversing the shear direction

Question. Describe fully K=(1−201)\mathbf K=\begin{pmatrix}1&-2\\0&1\end{pmatrix}, and find the image of P(1,3)P(1,3).

Plan. Use the new coordinate rule to specify the signed shear and point image.

X=x−2y,Y=y.X=x-2y,\qquad Y=y.

The xx-axis is still fixed, but now (0,1)↦(−2,1)(0,1)\mapsto(-2,1). For PP, the image is (1−6,3)=(−5,3)(1-6,3)=(-5,3).

Answer. A shear parallel to the xx-axis, with the xx-axis fixed and shear factor −2-2; P↦(−5,3)P\mapsto(-5,3).

Check. The displacement is −6-6 horizontally. Applying the preceding factor-22 shear to the image gives (−5+2(3),3)=(1,3)(-5+2(3),3)=(1,3), recovering the original point.

For rotations, state angle, direction and centre; for reflections, state the mirror line. Thus (0−110)\begin{pmatrix}0&-1\\1&0\end{pmatrix} is a rotation through 90∘90^\circ anticlockwise about the origin, whereas (0110)\begin{pmatrix}0&1\\1&0\end{pmatrix} is reflection in y=xy=x. Both exchange the roles of the coordinates, but only the rotation negates the old yy-coordinate.

Exam tip

A complete shear description can state the fixed axis and a unit-point image, such as “xx-axis fixed and (0,1)↦(2,1)(0,1)\mapsto(2,1)”. Naming “shear” alone leaves its direction and size unspecified.

Use the sign and the fixed axis in your description.

Area scale factors

The determinant measures how a matrix changes area, while its sign records whether orientation is preserved or reversed.

The unit square is spanned by the two unit arrows. Its image is the parallelogram spanned by the two matrix columns (a,c)(a,c) and (b,d)(b,d). The coordinate area formula gives this parallelogram area as ∣ad−bc∣|ad-bc|. For the earlier picture, this is ∣2(3)−(−1)(1)∣=7|2(3)-(-1)(1)|=7.

More generally, if two side vectors are the columns of a matrix V\mathbf V, their signed parallelogram area is det⁡V\det\mathbf V. Their image columns form MV\mathbf M\mathbf V. Expanding the two-by-two determinant gives

det⁡(MV)=(det⁡M)(det⁡V).\det(\mathbf M\mathbf V)=(\det\mathbf M)(\det\mathbf V).

Taking absolute values establishes the same area ratio for every triangle, parallelogram and region built from them.

Area scale factor

For a plane matrix transformation,

image area=∣det⁡M∣×original area.\text{image area}=|\det\mathbf M|\times\text{original area}.

If det⁡M>0\det\mathbf M>0, orientation is preserved. If det⁡M<0\det\mathbf M<0, orientation is reversed. If det⁡M=0\det\mathbf M=0, the image has zero area: the plane collapses to a line or a point.

Area is nonnegative; the signed determinant is not itself an area. Not in the formula booklet: learn it.

Orientation refers to the order of vertices around a figure: a clockwise order becomes anticlockwise under a negative determinant. It does not say that the image lies on a particular side of an axis.

Worked example 5: preserving orientation

Question. A triangle of area 5 cm25\,\mathrm{cm}^2 is transformed by A=(2103)\mathbf A=\begin{pmatrix}2&1\\0&3\end{pmatrix}. Find the image area and state whether orientation is preserved.

Plan. Calculate the determinant, use its magnitude for area and its sign for orientation.

det⁡A=2(3)−1(0)=6,image area=6(5)=30 cm2.\det\mathbf A=2(3)-1(0)=6, \qquad \text{image area}=6(5)=30\,\mathrm{cm}^2.

Answer. The area is 30 cm230\,\mathrm{cm}^2, and orientation is preserved.

Check. Choose a representative triangle with vertices (0,0),(2,0),(0,5)(0,0),(2,0),(0,5). Its images are (0,0),(4,0),(5,15)(0,0),(4,0),(5,15), whose area is 12(4)(15)=30\tfrac12(4)(15)=30.

Negate the entire first row. This reflects the previous image in the yy-axis without changing its area.

Worked example 6: reversing orientation

Question. Transform a triangle of area 5 cm25\,\mathrm{cm}^2 by B=(−2−103)\mathbf B=\begin{pmatrix}-2&-1\\0&3\end{pmatrix}. Find the image area and describe the orientation change.

Plan. Keep the determinant sign separate from the positive area multiplier.

det⁡B=(−2)(3)−(−1)(0)=−6,image area=∣−6∣(5)=30 cm2.\det\mathbf B=(-2)(3)-(-1)(0)=-6, \qquad \text{image area}=|-6|(5)=30\,\mathrm{cm}^2.

Answer. The area is 30 cm230\,\mathrm{cm}^2, and orientation is reversed.

Check. The same representative triangle maps to (0,0),(−4,0),(−5,15)(0,0),(-4,0),(-5,15). Its base and height still give area 3030, but the order of these three vertices is opposite to the preceding image.

When the image area is given, divide by the nonzero area scale factor to recover the original area. If the determinant is zero, that reversal is impossible: different original areas all have zero image area.

A shear has determinant 11, so its slant can change while its area stays the same. An enlargement of factor kk has determinant k2k^2, so its area factor is k2k^2, even for a negative kk.

Watch out

“Area factor −6-6” is incorrect. The area factor is 66; the minus sign in the determinant describes reversed orientation. A negative enlargement factor, however, has a positive determinant in two dimensions.

The opening question now has a geometric answer too: the two unit-arrow images determine every point and the parallelogram that determines the area factor.

Quick Recap

  • The first and second columns are the images of (1,0)(1,0) and (0,1)(0,1).
  • Describe a named transformation with its full centre, axis, direction and scale information.
  • Multiply original area by ∣det⁡M∣|\det\mathbf M|; use the determinant sign separately for orientation.
  • A zero determinant collapses area and prevents an inverse.

Two independent arrows determine the whole matrix transformation, including what happens to every region's area.