Back to homeMathematics · AP Precalculus · Change subject
Start for free
Parametric Functions, Vectors, and Matrices · Vectors and Matrices

Matrices as Linear Transformations

Practise this section (12)

When you flip a photo in an editing app, spin a character in a video game, or pinch to zoom, your phone is multiplying coordinates by a small grid of numbers called a matrix. How can one little grid rotate, flip, or stretch every point of an image? And how does the app "undo" the move? By the end of this page you will be able to build these matrices, predict what they do to area, and reverse them.

A matrix moves the plane

A $2\times 2$ matrix times a column vector gives a new vector. Multiply each row of the matrix by the vector:

$$\begin{bmatrix}a & b\\ c & d\end{bmatrix}\begin{bmatrix}x\\ y\end{bmatrix}=\begin{bmatrix}ax+by\\ cx+dy\end{bmatrix}$$

For example, with $A=\begin{bmatrix}2 & 1\\ 0 & 3\end{bmatrix}$ and $\mathbf{v}=\langle 1, 2\rangle$:

$$A\mathbf{v}=\begin{bmatrix}2(1)+1(2)\\ 0(1)+3(2)\end{bmatrix}=\begin{bmatrix}4\\ 6\end{bmatrix}$$

So the rule $T(\mathbf{v})=A\mathbf{v}$ takes every point $(x, y)$ of the plane to a new point. We call $T$ a linear transformation. Two facts follow from the arithmetic: $T(\mathbf{u}+\mathbf{v})=T(\mathbf{u})+T(\mathbf{v})$ and $T(c\mathbf{v})=c\,T(\mathbf{v})$. Because of them, straight lines stay straight, and the origin never moves, since $A\langle 0,0\rangle=\langle 0,0\rangle$.

The columns tell the whole story

Let $\mathbf{i}=\langle 1, 0\rangle$ and $\mathbf{j}=\langle 0, 1\rangle$ be the unit vectors along the axes. Multiplying shows

$$A\mathbf{i}=\begin{bmatrix}a\\ c\end{bmatrix}\ (\text{1st column}),\qquad A\mathbf{j}=\begin{bmatrix}b\\ d\end{bmatrix}\ (\text{2nd column}).$$

Every vector is $\langle x, y\rangle = x\,\mathbf{i}+y\,\mathbf{j}$, so $T(\langle x,y\rangle)=x\,T(\mathbf{i})+y\,T(\mathbf{j})$. Knowing where $\mathbf{i}$ and $\mathbf{j}$ land tells you where everything lands.

The unit square and its image under a linear transformation: the unit vectors i and j land on the columns of the matrix i j T(i) = ⟨2, 1⟩ T(j) = ⟨−1, 2⟩ The unit square and its image under a linear transformation: the unit vectors i and j land on the columns of the matrix

The blue unit square becomes the orange parallelogram. Its two sides from the origin are the columns of the matrix.

Unsure about the theory?Ask about anything you don't understand in this section and the AI will explain it using these notes.
Practice★☆☆Not started
Let $R=\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}$. Compute $R\begin{bmatrix}3\\ 2\end{bmatrix}$ and describe the transformation geometrically.

Let $R=\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}$. Compute $R\begin{bmatrix}3\\ 2\end{bmatrix}$ and describe the transformation geometrically.

Solve

Rotations, reflections, and dilations

Now use the columns idea to build the transformations you know from geometry.

Reflection across the $x$-axis. $\mathbf{i}$ stays put, and $\mathbf{j}=\langle 0,1\rangle$ flips to $\langle 0,-1\rangle$. The columns are $\langle 1,0\rangle$ and $\langle 0,-1\rangle$.

Rotation by $\theta$ counterclockwise. $\mathbf{i}$ lands at $\langle\cos\theta,\sin\theta\rangle$ on the unit circle. $\mathbf{j}$ is $90^\circ$ ahead of $\mathbf{i}$, so it lands $90^\circ$ ahead of that, at $\langle-\sin\theta,\cos\theta\rangle$.

You do not need to memorize them. Each is a quick "where do $\mathbf{i}$ and $\mathbf{j}$ go?" question.

Dilations and area

A dilation by $k$ multiplies every length by $k$. The unit square (side 1, area 1) becomes a square with side $k$ and area $k^2$. So a dilation by $k$ multiplies area by $k^2$, not by $k$.

Unsure about the theory?Ask about anything you don't understand in this section and the AI will explain it using these notes.
Practice★☆☆Not started
Write the $2\times 2$ matrix of the reflection across the $y$-axis, and use it to find the image of the point $(4, -3)$.

Write the $2\times 2$ matrix of the reflection across the $y$-axis, and use it to find the image of the point $(4, -3)$.

Solve
Practice★☆☆Not started
The transformation $T$ is given by $T(\mathbf{v})=\begin{bmatrix}3 & 0\\ 0 & 3\end{bmatrix}\mathbf{v}$. By what factor does $T$ multiply the area of any region? A square…

The transformation $T$ is given by $T(\mathbf{v})=\begin{bmatrix}3 & 0\\ 0 & 3\end{bmatrix}\mathbf{v}$. By what factor does $T$ multiply the area of any region? A square has area 4. What is the area of its image?

Solve

The determinant: area and orientation

Look at the unit square again. Under $A=\begin{bmatrix}2 & 1\\ 0 & 3\end{bmatrix}$ it becomes a parallelogram with sides $\langle 2,0\rangle$ and $\langle 1,3\rangle$ (the columns).

The unit square (area 1) becomes a parallelogram with base 2 and height 3 under A, with columns (2, 0) and (1, 3). Its area is 6 = det A: the determinant tells by what factor areas are multiplied. 1 area 6 det A = 6 (areas ×6) The unit square (area 1) becomes a parallelogram with base 2 and height 3 under A, with columns (2, 0) and (1, 3). Its area is 6 = det A: the determinant tells by what factor areas are multiplied.

The base is 2 and the height is 3, so the area is $2\cdot 3=6$. For a general matrix the parallelogram has area $|ad-bc|$.

Why does the sign matter? A rotation turns the plane without flipping it, so $\det>0$. A reflection flips it like a mirror, so $\det<0$. The unit square sends $\mathbf{i}$ to the first column and $\mathbf{j}$ to the second; if their order around the origin gets swapped, the orientation is reversed.

Some checks: rotation matrices have $\det=\cos^2\theta+\sin^2\theta=1$ (turning does not change area). Reflections have $\det=-1$. A dilation by $k$ has $\det=k^2$, matching the area rule from the last section.

Unsure about the theory?Ask about anything you don't understand in this section and the AI will explain it using these notes.
Practice★★☆Not started
Let $M=\begin{bmatrix}2 & 1\\ 1 & 3\end{bmatrix}$. A triangle has vertices $(0, 0)$, $(2, 0)$, and $(0, 3)$. (a) Find the area of the triangle and the area of its image…

Let $M=\begin{bmatrix}2 & 1\\ 1 & 3\end{bmatrix}$. A triangle has vertices $(0, 0)$, $(2, 0)$, and $(0, 3)$.

(a) Find the area of the triangle and the area of its image under $M$.

(b) Does $M$ preserve or reverse the orientation of the triangle? Explain using the determinant.

Solve
Practice★★☆Not started
Let $B=\begin{bmatrix}k & 3\\ 2 & 6\end{bmatrix}$. (a) Find the value of $k$ for which $B$ has no inverse. (b) For that value of $k$, describe what the transformation…

Let $B=\begin{bmatrix}k & 3\\ 2 & 6\end{bmatrix}$.

(a) Find the value of $k$ for which $B$ has no inverse.

(b) For that value of $k$, describe what the transformation $\mathbf{v}\mapsto B\mathbf{v}$ does to the area of the unit square.

Solve
Practice★★☆Not started
The matrix $R=\begin{bmatrix}\frac12 & -\frac{\sqrt3}{2}\\ \frac{\sqrt3}{2} & \frac12\end{bmatrix}$ represents a rotation about the origin. (a) Through what angle and in…

The matrix $R=\begin{bmatrix}\frac12 & -\frac{\sqrt3}{2}\\ \frac{\sqrt3}{2} & \frac12\end{bmatrix}$ represents a rotation about the origin.

(a) Through what angle and in what direction does it rotate?

(b) Find the image of the point $(4, 0)$.

(c) Find $\det R$ and explain what it says about area.

Solve

Inverse matrices: undoing a transformation

To undo a rotation you rotate back. To undo a transformation $T(\mathbf{v})=A\mathbf{v}$ you apply the inverse matrix $A^{-1}$, defined by $A^{-1}A=AA^{-1}=I$, where $I=\begin{bmatrix}1 & 0\\ 0 & 1\end{bmatrix}$ leaves every vector alone.

Why $\det A\neq0$? If $\det A=0$, the plane is flattened onto a line, and many different points land on the same spot. You cannot tell which one to go back to. Dividing by $ad-bc$ in the formula is exactly where the zero would break it.

Inverses also solve equations: if $A\mathbf{v}=\mathbf{w}$, then $\mathbf{v}=A^{-1}\mathbf{w}$.

Unsure about the theory?Ask about anything you don't understand in this section and the AI will explain it using these notes.
Practice★☆☆Not started
Let $A=\begin{bmatrix}3 & 2\\ 5 & 4\end{bmatrix}$. Find $\det A$ and $A^{-1}$.

Let $A=\begin{bmatrix}3 & 2\\ 5 & 4\end{bmatrix}$. Find $\det A$ and $A^{-1}$.

Solve
Practice★★★Not started
Let $A=\begin{bmatrix}2 & 1\\ 5 & 3\end{bmatrix}$ and let $T(\mathbf{v})=A\mathbf{v}$. (a) Find $\det A$ and $A^{-1}$. (b) Use $A^{-1}$ to find the vector $\mathbf{v}$…

Let $A=\begin{bmatrix}2 & 1\\ 5 & 3\end{bmatrix}$ and let $T(\mathbf{v})=A\mathbf{v}$.

(a) Find $\det A$ and $A^{-1}$.

(b) Use $A^{-1}$ to find the vector $\mathbf{v}$ with $T(\mathbf{v})=\begin{bmatrix}7\\ 18\end{bmatrix}$, and check your answer.

(c) A region of area 12 is transformed by $T$. Find the area of the image and state whether orientation is preserved. Justify.

Solve
Practice★★★Not started
A linear transformation $T$ sends $\langle 1, 0\rangle$ to $\langle 2, 3\rangle$ and $\langle 0, 1\rangle$ to $\langle -1, 4\rangle$. (a) Write the matrix of $T$ and…

A linear transformation $T$ sends $\langle 1, 0\rangle$ to $\langle 2, 3\rangle$ and $\langle 0, 1\rangle$ to $\langle -1, 4\rangle$.

(a) Write the matrix of $T$ and find its determinant.

(b) The triangle with vertices $(0,0)$, $(1,0)$, $(0,1)$ has area $\frac12$. Find the area of its image.

(c) Use the inverse matrix to find the vector that $T$ sends to $\langle 0, 11\rangle$.

Solve

Composing transformations

What happens if you reflect a point and then rotate it? You apply two matrices in a row. If $B$ is applied first and then $A$, then

$$A(B\mathbf{v})=(AB)\mathbf{v}.$$

So the matrix of "first $B$, then $A$" is the product $AB$, written right to left, just like function composition $f(g(x))$. To multiply, each entry is a row of the left matrix times a column of the right matrix:

$$\begin{bmatrix}a & b\\ c & d\end{bmatrix}\begin{bmatrix}e & f\\ g & h\end{bmatrix}=\begin{bmatrix}ae+bg & af+bh\\ ce+dg & cf+dh\end{bmatrix}.$$

Rotations compose by adding angles

Rotating by $\alpha$ and then by $\beta$ gives a rotation by $\alpha+\beta$, so $R_\beta R_\alpha=R_{\alpha+\beta}$. For example, rotating by $90^\circ$ twice:

$$\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}=\begin{bmatrix}-1 & 0\\ 0 & -1\end{bmatrix},$$

which is the $180^\circ$ rotation (every point goes to its opposite). Multiplying the matrices reproduces the angle-addition formulas for sine and cosine.

Unsure about the theory?Ask about anything you don't understand in this section and the AI will explain it using these notes.
Practice★★☆Not started
Let $A=\begin{bmatrix}1 & 0\\ 0 & -1\end{bmatrix}$ (reflection across the $x$-axis) and $B=\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}$ (rotation $90^\circ$…

Let $A=\begin{bmatrix}1 & 0\\ 0 & -1\end{bmatrix}$ (reflection across the $x$-axis) and $B=\begin{bmatrix}0 & -1\\ 1 & 0\end{bmatrix}$ (rotation $90^\circ$ counterclockwise).

(a) Find the matrix for "reflect first, then rotate."

(b) Find the matrix for "rotate first, then reflect."

(c) Are the two results equal? Describe each as a single reflection if possible.

Solve
Practice★★★Not started
Let $S=\begin{bmatrix}2 & 0\\ 0 & \frac12\end{bmatrix}$ and let $F=\begin{bmatrix}-1 & 0\\ 0 & 1\end{bmatrix}$. (a) Find the image of the unit square with vertices…

Let $S=\begin{bmatrix}2 & 0\\ 0 & \frac12\end{bmatrix}$ and let $F=\begin{bmatrix}-1 & 0\\ 0 & 1\end{bmatrix}$.

(a) Find the image of the unit square with vertices $(0,0)$, $(1,0)$, $(1,1)$, $(0,1)$ under $S$ and show that area is preserved.

(b) Show that $S$ does not preserve lengths by comparing the length of $\langle 1, 1\rangle$ with the length of its image.

(c) Find the matrix of the composition "apply $S$, then $F$," its determinant, and what the determinant tells you about area and orientation.

Solve
Practice★★★Not started
Let $R_{30}=\begin{bmatrix}\frac{\sqrt3}{2} & -\frac12\\ \frac12 & \frac{\sqrt3}{2}\end{bmatrix}$ be the rotation $30^\circ$ counterclockwise and…

Let $R_{30}=\begin{bmatrix}\frac{\sqrt3}{2} & -\frac12\\ \frac12 & \frac{\sqrt3}{2}\end{bmatrix}$ be the rotation $30^\circ$ counterclockwise and $R_{60}=\begin{bmatrix}\frac12 & -\frac{\sqrt3}{2}\\ \frac{\sqrt3}{2} & \frac12\end{bmatrix}$ the rotation $60^\circ$ counterclockwise.

(a) Compute the product $R_{60}R_{30}$.

(b) Explain, geometrically and using your answer, which single transformation the composition represents.

(c) Find $\det(R_{60}R_{30})$ and verify that it equals $\det R_{60}\cdot\det R_{30}$.

Solve

Back to the opening question: flipping a photo is a reflection matrix, zooming is a dilation, and rotating is a rotation matrix. An app chains them by multiplying matrices, and "undo" applies the inverse matrix.

Summary

  • $A\langle x,y\rangle$ uses row-times-column. The columns of $A$ are the images of $\mathbf{i}=\langle1,0\rangle$ and $\mathbf{j}=\langle0,1\rangle$.

  • Rotation by $\theta$: $\begin{bmatrix}\cos\theta & -\sin\theta\\ \sin\theta & \cos\theta\end{bmatrix}$. Reflections and dilations have simple diagonal or swapped matrices.

  • $\det A=ad-bc$. Area is multiplied by $|\det A|$; $\det>0$ preserves orientation, $\det<0$ reverses it, $\det=0$ collapses the plane.

  • $A^{-1}=\dfrac{1}{ad-bc}\begin{bmatrix}d & -b\\ -c & a\end{bmatrix}$ exists only when $\det A\neq0$. Solve $A\mathbf{v}=\mathbf{w}$ with $\mathbf{v}=A^{-1}\mathbf{w}$.

  • "$B$ first, then $A$" is $AB$. Order matters, and $\det(AB)=\det A\det B$.

Can't find your problem here?

The AI checks one of your exercises: paste the problem with your answer or take a photo of it.

See all the exercises in this section