Unit 4 Topic 4.12

Linear Transformations and Matrices

see every function move

2 min readfreeNot practiced

Beyond the exam. The AP® Precalculus exam does not test this unit. Many classes teach it, and it prepares you for calculus.

A matrix can do more than store numbers: it can move the whole plane. Multiply every vector by the same 2×22 \times 2 matrix and the plane is rotated, reflected, stretched or slanted. Moves of this kind are called linear transformations, and the matrix is the recipe.

Linear transformations and their matrices

A linear transformation of the plane sends each vector to a new one by a rule of the form

L(⟨x,y⟩)=⟨ax+by,cx+dy⟩.L(\left\langle x, y \right\rangle) = \left\langle ax + by, cx + dy \right\rangle.

Write the input as a column and this is matrix multiplication: [abcd][xy]\left[ \begin{matrix} a & b \\ c & d \end{matrix} \right]\left[ \begin{matrix} x \\ y \end{matrix} \right]=[ax+bycx+dy]= \left[ \begin{matrix} ax + by \\ cx + dy \end{matrix} \right]. For example, L(⟨x,y⟩)L(\left\langle x, y \right\rangle)=⟨x+2y,3x−y⟩= \left\langle x + 2y, 3x - y \right\rangle has the matrix [123−1]\left[ \begin{matrix} 1 & 2 \\ 3 & -1 \end{matrix} \right], and L(⟨1,1⟩)=⟨3,2⟩L(\left\langle 1, 1 \right\rangle) = \left\langle 3, 2 \right\rangle.

Reading the matrix from a picture

Put in ⟨1,0⟩\left\langle 1, 0 \right\rangle: the output is ⟨a,c⟩\left\langle a, c \right\rangle, the first column. Put in ⟨0,1⟩\left\langle 0, 1 \right\rangle: the output is ⟨b,d⟩\left\langle b, d \right\rangle, the second column. So the matrix is "where the two unit vectors go, written as columns".

The unit square with corners (0, 0), (1, 0), (1, 1) and (0, 1), dashed in gray, and its image under the matrix with rows (1, 1) and (0, 2), shaded green: a parallelogram with corners (0, 0), (1, 0), (2, 2) and (1, 2). The image of <1, 0> is <1, 0> (blue arrow) and the image of <0, 1> is <1, 2> (vermillion arrow), the two columns of the matrix.
Figure 1. The unit square and its image under [1102]\left[ \begin{matrix} 1 & 1 \\ 0 & 2 \end{matrix} \right]. LevlPrep original diagram.

Worked example 1. A transformation sends ⟨1,0⟩\left\langle 1, 0 \right\rangle to ⟨2,1⟩\left\langle 2, 1 \right\rangle and ⟨0,1⟩\left\langle 0, 1 \right\rangle to ⟨−1,1⟩\left\langle -1, 1 \right\rangle. Find its matrix and the image of ⟨3,2⟩\left\langle 3, 2 \right\rangle.

Columns: [2−111]\left[ \begin{matrix} 2 & -1 \\ 1 & 1 \end{matrix} \right].

[2−111][32]\left[ \begin{matrix} 2 & -1 \\ 1 & 1 \end{matrix} \right]\left[ \begin{matrix} 3 \\ 2 \end{matrix} \right]=[2(3)+(−1)(2)1(3)+1(2)]= \left[ \begin{matrix} 2(3) + (-1)(2) \\ 1(3) + 1(2) \end{matrix} \right]=[45]= \left[ \begin{matrix} 4 \\ 5 \end{matrix} \right]. Or think of it as 33 copies of ⟨2,1⟩\left\langle 2, 1 \right\rangle plus 22 copies of ⟨−1,1⟩\left\langle -1, 1 \right\rangle.

What stays the same

Because every vector is moved by the same matrix, the origin always goes to the origin ([abcd][00]\left[ \begin{matrix} a & b \\ c & d \end{matrix} \right]\left[ \begin{matrix} 0 \\ 0 \end{matrix} \right]=[00]= \left[ \begin{matrix} 0 \\ 0 \end{matrix} \right]), lines go to lines, and parallel lines stay parallel. A rule that moves the origin, such as ⟨x,y⟩→⟨x+1,y⟩\left\langle x, y \right\rangle \to \left\langle x + 1, y \right\rangle, is not linear.

A catalog of moves

MoveMatrixDeterminant
rotation by θ\theta counterclockwise[cos⁡θ−sin⁡θsin⁡θcos⁡θ]\left[ \begin{matrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{matrix} \right]11
reflection across the xx-axis[100−1]\left[ \begin{matrix} 1 & 0 \\ 0 & -1 \end{matrix} \right]−1-1
reflection across the line y=xy = x[0110]\left[ \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \right]−1-1
dilation by kk[k00k]\left[ \begin{matrix} k & 0 \\ 0 & k \end{matrix} \right]k2k^2
horizontal shear[1k01]\left[ \begin{matrix} 1 & k \\ 0 & 1 \end{matrix} \right]11

The rotation matrix comes from the unit circle: ⟨1,0⟩\left\langle 1, 0 \right\rangle turns to ⟨cos⁡θ,sin⁡θ⟩\left\langle \cos\theta, \sin\theta \right\rangle and ⟨0,1⟩\left\langle 0, 1 \right\rangle turns to ⟨−sin⁡θ,cos⁡θ⟩\left\langle -\sin\theta, \cos\theta \right\rangle.

Worked example 2. Rotate ⟨2,0⟩\left\langle 2, 0 \right\rangle by π6\frac{\pi}{6} counterclockwise.

[32−121232][20]\left[ \begin{matrix} \frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \frac{1}{2} & \frac{\sqrt{3}}{2} \end{matrix} \right]\left[ \begin{matrix} 2 \\ 0 \end{matrix} \right]=[31]= \left[ \begin{matrix} \sqrt{3} \\ 1 \end{matrix} \right], a vector of length 22 at angle π6\frac{\pi}{6}.

Areas and orientation

The unit square goes to the parallelogram made by the two columns, whose area is |det⁡|\left| \det \right|. Every other region is scaled by the same factor, so a triangle of area 55 under a matrix with determinant 33 becomes a triangle of area 1515. A negative determinant also flips the plane over, like a reflection: a counterclockwise trip around a shape becomes a clockwise one.

Spot a mistake on this page?