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 [a b; c d] 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 [2 0; 0 1].

Rotations and dilations

Rotating every vector counterclockwise by θ about the origin uses the matrix [cos θ −sin θ; sin θ cos θ]. Its columns are where ⟨1, 0⟩ and ⟨0, 1⟩ land after the rotation.

A dilation by a factor k uses [k 0; 0 k]. A matrix like [2 0; 0 3] stretches horizontally by 2 and vertically by 3.

The absolute value of the determinant is the factor by which the transformation scales areas. [2 0; 0 3] 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 counterclockwise, and ⟨2, 0⟩ by π/6 counterclockwise.

    Show the solution
    1. Step 1: For π/2: cos = 0 and sin = 1, so the matrix is [0 −1; 1 0]. Then [0 −1; 1 0][3; 1] = [−1; 3].
    2. Step 2: For π/6: cos = √3/2 and sin = 1/2, so the matrix is [√3/2 −1/2; 1/2 √3/2]. Then the product with [2; 0] is [√3; 1].
    3. Step 3: Check: ⟨√3, 1⟩ has length 2 and points at angle π/6, as expected.

    Answer: ⟨−1, 3⟩ and ⟨√3, 1⟩.

  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 −1; 1 3].
    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.

    Answer: A = [2 −1; 1 3]; 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 = [1 0; 0 −1], then rotate by π/2 using Q = [0 −1; 1 0]. 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 −1; 1 0][1 0; 0 −1] = [0 1; 1 0], 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; −1 0], a different transformation.

    Answer: QR = [0 1; 1 0].

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

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 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 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