Skip to main content

Unit 4 · Topic 4.13

4.13 Matrices as Functions

A 2 × 2 matrix acts as a function on the plane. Its columns are where it sends the unit vectors ⟨1, 0⟩ and ⟨0, 1⟩, the rotation matrix turns every vector by a fixed angle, the determinant tells you how areas scale, composing transformations multiplies their matrices, and the inverse matrix undoes the transformation.

Key terms

  • rotation matrix
  • composition
  • inverse transformation
  • dilation
  • unit vectors

Columns tell you everything

The matrix [abcd]\begin{bmatrix} a & b \\ c & d \end{bmatrix} sends ⟨1, 0⟩ to ⟨a, c⟩ (its first column) and ⟨0, 1⟩ to ⟨b, d⟩ (its second column).

So to build the matrix for a transformation, ask where it sends ⟨1, 0⟩ and ⟨0, 1⟩, and use those images as the columns.

The transformation sends ⟨x, y⟩ to ⟨ax + by, cx + dy⟩.

Example: a transformation that doubles every horizontal component and leaves vertical components alone sends ⟨1, 0⟩ to ⟨2, 0⟩ and ⟨0, 1⟩ to ⟨0, 1⟩. So its matrix is [2001]\begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix}.

Rotations and dilations

Rotating every vector counterclockwise by θ about the origin uses the matrix [cos⁡θ−sin⁡θsin⁡θcos⁡θ]\begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix}. Its columns are where ⟨1, 0⟩ and ⟨0, 1⟩ land after the rotation.

A dilation by a factor k uses [k00k]\begin{bmatrix} k & 0 \\ 0 & k \end{bmatrix}. A matrix like [2003]\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix} stretches horizontally by 2 and vertically by 3.

The absolute value of the determinant is the factor by which the transformation scales areas. [2003]\begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix} has determinant 6, so every region's area is multiplied by 6. A rotation has determinant cos² θ + sin² θ = 1, so it doesn't change area.

If det(A) = 0, the transformation flattens the whole plane onto a line or a single point. Areas become 0, and no inverse transformation can undo it.

Composition

Applying one linear transformation after another is also a linear transformation. If you apply B first and then A, the combined matrix is AB, because A(Bv) = (AB)v.

Order matters. The matrix written on the right acts first, and AB is usually different from BA.

Rotating by α and then by β is the same as rotating by α + β. If you multiply the two rotation matrices, the sum identities from topic 3.12 turn the entries into cos(α + β) and sin(α + β).

Inverse transformations

Two linear transformations are inverses if composing them sends every vector back to itself. If L(v) = Av, its inverse is L⁻¹(v) = A⁻¹v, which exists when det(A) ≠ 0.

For a rotation by θ, the inverse is the rotation by −θ.

Worked examples

Try each one yourself first, then open the solution.

  1. Example 1

    Rotation matrices

    Use rotation matrices to rotate ⟨3, 1⟩ by π2\frac{\pi}{2} counterclockwise, and ⟨2, 0⟩ by π6\frac{\pi}{6} counterclockwise.

    Show the solution
    1. Step 1: For π2\frac{\pi}{2}: cos = 0 and sin = 1, so the matrix is [0−110]\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}. Then [0−110][31]=[−13]\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 3 \\ 1 \end{bmatrix} = \begin{bmatrix} -1 \\ 3 \end{bmatrix}.
    2. Step 2: For π6\frac{\pi}{6}: cos⁡=32\cos = \frac{\sqrt{3}}{2} and sin⁡=12\sin = \frac{1}{2}, so the matrix is [32−121232]\begin{bmatrix} \frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \frac{1}{2} & \frac{\sqrt{3}}{2} \end{bmatrix}. Then the product with [20]\begin{bmatrix} 2 \\ 0 \end{bmatrix} is [31]\begin{bmatrix} \sqrt{3} \\ 1 \end{bmatrix}.
    3. Step 3: Check: ⟨3,1⟩\langle \sqrt{3}, 1\rangle has length 2 and points at angle π6\frac{\pi}{6}, as expected.

    Answer: ⟨−1, 3⟩ and ⟨3,1⟩\langle \sqrt{3}, 1\rangle.

  2. Example 2

    A matrix from the unit vectors

    A linear transformation sends ⟨1, 0⟩ to ⟨2, 1⟩ and ⟨0, 1⟩ to ⟨−1, 3⟩. Find its matrix and the area of the image of the unit square.

    Show the solution
    1. Step 1: The images are the columns: A=[2−113]A = \begin{bmatrix} 2 & -1 \\ 1 & 3 \end{bmatrix}.
    2. Step 2: det(A) = 2(3) − (−1)(1) = 7.
    3. Step 3: The unit square has area 1, so its image, a parallelogram, has area ∣7∣⋅1=7\lvert 7\rvert \cdot 1 = 7.

    Answer: A=[2−113]A = \begin{bmatrix} 2 & -1 \\ 1 & 3 \end{bmatrix}; the image of the unit square has area 7.

  3. Example 3

    Trap: the order of a composition

    Reflect over the x-axis using R=[100−1]R = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}, then rotate by π2\frac{\pi}{2} using Q=[0−110]Q = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}. Find the matrix of the combined transformation.

    Show the solution
    1. Step 1: The reflection happens first, so it goes on the right: QR.
    2. Step 2: QR=[0−110][100−1]=[0110]QR = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}, which swaps x and y (a reflection over y = x).
    3. Step 3: Check with ⟨1, 0⟩: the reflection leaves it at ⟨1, 0⟩, then the rotation sends it to ⟨0, 1⟩. The first column of QR is ⟨0, 1⟩.
    4. Step 4: The reverse order gives RQ=[0−1−10]RQ = \begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}, a different transformation.

    Answer: QR=[0110]QR = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}.

Common mistakes

  • Writing the images of the unit vectors as rows instead of columns.
  • Multiplying a composition in the order the steps happen. The first transformation goes on the right.
  • Using the clockwise version of the rotation matrix by accident. For counterclockwise, −sin θ is in the top right.

On the exam

  • Unit 4 is not on the AP Precalculus Exam, so you'll see this topic on class tests rather than in May.
  • Expect to build matrices from where the unit vectors go, rotate vectors, compose transformations, and use the determinant to find how areas change.

Connected topics

Videos

  • AP Precalculus – 4.13A Matrices as Functions

    The AlgebrosWatch on YouTube (opens in a new tab)

  • AP Precalculus – 4.13B Matrices as Functions

    The AlgebrosWatch on YouTube (opens in a new tab)

  • Matrix multiplication as composition | Chapter 4, Essence of linear algebra

    3Blue1BrownWatch on YouTube (opens in a new tab)

  • 4.13-A Matrices as Functions Video

    Flamingo Math by Jean AdamsWatch on YouTube (opens in a new tab)

  • Using matrices to transform the plane: Composing matrices | Matrices | Precalculus | Khan Academy

    Khan AcademyWatch on YouTube (opens in a new tab)

Check yourself: 4.13 Matrices as Functions

3 questions on 4.13 Matrices as Functions. Pick an answer to see if you got it, and why.

Question 1 of 3

A linear transformation rotates every vector in the plane π2\frac{\pi}{2} radians counterclockwise about the origin. What is the image of the vector ⟨3, 1⟩?

Question 2 of 3

A transformation first rotates each vector π2\frac{\pi}{2} radians counterclockwise about the origin and then dilates it by a factor of 2. By what factor does this composite transformation change the area of any region in the plane?

Question 3 of 3

A linear transformation sends ⟨1, 0⟩ to ⟨2, 1⟩ and sends ⟨0, 1⟩ to ⟨−1, 3⟩. What is the image of ⟨3, 2⟩?

0 of 3 answered

Something wrong or out of date here?

Something wrong with this page?

What's wrong?

Please don't include personal details.