Unit 4 Topic 4.13

Matrices as Functions

see every function move

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

You have used matrices to move the plane. Now treat each one as a function: its inputs are vectors and its outputs are vectors. Everything you know about functions, composition and inverses carries over, with matrix multiplication doing the work.

Matrices as functions

A 2×22 \times 2 matrix AA defines the function v→Av\mathbf{v} \to A\mathbf{v}. Its domain is every vector in the plane, and its outputs are the vectors AvA\mathbf{v}. Different matrices are different functions; the identity II is the function that changes nothing.

Composition: one matrix for two moves

Apply BB to v\mathbf{v}, then apply AA to the result. The output is A(Bv)A(B\mathbf{v}), and because matrix multiplication can be grouped either way, this equals (AB)v(AB)\mathbf{v}. So the composition of linear transformations "BB, then AA" is the single matrix ABAB. The move done first is written on the right, closest to v\mathbf{v}, just as gg is applied first in f(g(x))f(g(x)).

The vector v = <3, 1> in green is rotated a quarter turn counterclockwise to Rv = <-1, 3> in blue, then reflected across the x-axis to FRv = <-1, -3> in vermillion. A curved arrow marks the rotation and a dashed line the reflection.
Figure 1. Rotate, then reflect: F(Rv)=(FR)vF(R\mathbf{v}) = (FR)\mathbf{v}. LevlPrep original diagram.

Worked example 1. R=[0−110]R = \left[ \begin{matrix} 0 & -1 \\ 1 & 0 \end{matrix} \right] rotates by π2\frac{\pi}{2} counterclockwise and F=[100−1]F = \left[ \begin{matrix} 1 & 0 \\ 0 & -1 \end{matrix} \right] reflects across the xx-axis. Find the matrix for "rotate, then reflect" and apply it to ⟨3,1⟩\left\langle 3, 1 \right\rangle.

Rotate first, so RR goes on the right: FRFR=[100−1][0−110]= \left[ \begin{matrix} 1 & 0 \\ 0 & -1 \end{matrix} \right]\left[ \begin{matrix} 0 & -1 \\ 1 & 0 \end{matrix} \right]=[0−1−10]= \left[ \begin{matrix} 0 & -1 \\ -1 & 0 \end{matrix} \right].

FR[31]=[−1−3]FR\left[ \begin{matrix} 3 \\ 1 \end{matrix} \right] = \left[ \begin{matrix} -1 \\ -3 \end{matrix} \right]. Check in two steps: R[31]=[−13]R\left[ \begin{matrix} 3 \\ 1 \end{matrix} \right] = \left[ \begin{matrix} -1 \\ 3 \end{matrix} \right], then FF flips the sign of the second entry: [−1−3]\left[ \begin{matrix} -1 \\ -3 \end{matrix} \right].

In the other order, RF=[0110]RF = \left[ \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \right], a different move. Order matters.

Composing rotations adds their angles: rotating by π6\frac{\pi}{6} three times is the same as rotating by π2\frac{\pi}{2} once. Areas multiply too: det⁡(AB)=det⁡A⋅det⁡B\det(AB) = \det A \cdot \det B, since BB scales areas by |det⁡B|\left| \det B \right| and then AA scales them again.

Inverses: undoing a move

If det⁡A≠0\det A \ne 0, the inverse matrix A−1A^{-1} is the inverse function: A−1(Av)=vA^{-1}(A\mathbf{v}) = \mathbf{v} for every v\mathbf{v}. To find which input gives a known output w\mathbf{w}, solve Av=wA\mathbf{v} = \mathbf{w} by computing v=A−1w\mathbf{v} = A^{-1}\mathbf{w}.

Worked example 2. M=[3152]M = \left[ \begin{matrix} 3 & 1 \\ 5 & 2 \end{matrix} \right]. Which input does MM send to ⟨4,7⟩\left\langle 4, 7 \right\rangle?

det⁡M=6−5=1\det M = 6 - 5 = 1, so M−1=[2−1−53]M^{-1} = \left[ \begin{matrix} 2 & -1 \\ -5 & 3 \end{matrix} \right].

M−1[47]M^{-1}\left[ \begin{matrix} 4 \\ 7 \end{matrix} \right]=[8−7−20+21]= \left[ \begin{matrix} 8 - 7 \\ -20 + 21 \end{matrix} \right]=[11]= \left[ \begin{matrix} 1 \\ 1 \end{matrix} \right]. Check: M[11]=[47]M\left[ \begin{matrix} 1 \\ 1 \end{matrix} \right] = \left[ \begin{matrix} 4 \\ 7 \end{matrix} \right].

Some inverses are easy to see. A rotation by θ\theta is undone by a rotation by −θ-\theta, and a reflection is undone by itself.

When there is no inverse

If det⁡A=0\det A = 0, the matrix squashes the plane onto a line (or a point), and different inputs land on the same output. For P=[1000]P = \left[ \begin{matrix} 1 & 0 \\ 0 & 0 \end{matrix} \right], P[23]=[20]P\left[ \begin{matrix} 2 \\ 3 \end{matrix} \right] = \left[ \begin{matrix} 2 \\ 0 \end{matrix} \right] and P[2−1]=[20]P\left[ \begin{matrix} 2 \\ -1 \end{matrix} \right] = \left[ \begin{matrix} 2 \\ 0 \end{matrix} \right]. Given only the output ⟨2,0⟩\left\langle 2, 0 \right\rangle, there is no way to know which input it came from, so PP has no inverse function.

Repeating a move

WordsMatrix
BB, then AAABAB
AA twiceA2=AAA^2 = AA
AA, nn timesAnA^n
undo AAA−1A^{-1} (if det⁡A≠0\det A \ne 0)

For M=[3152]M = \left[ \begin{matrix} 3 & 1 \\ 5 & 2 \end{matrix} \right], M2=[145259]M^2 = \left[ \begin{matrix} 14 & 5 \\ 25 & 9 \end{matrix} \right], so applying MM twice sends ⟨1,0⟩\left\langle 1, 0 \right\rangle to the first column, ⟨14,25⟩\left\langle 14, 25 \right\rangle.

Spot a mistake on this page?