In precalculus you saw matrices move shapes. With the standard matrix rule ("columns are where $\mathbf{e}_1$ and $\mathbf{e}_2$ go"), you can build the matrix of any linear map of the plane yourself instead of memorizing a table.
Rotation by θ
Rotating $\mathbf{e}_1 = (1, 0)$ counterclockwise by $\theta$ lands on $(\cos\theta, \sin\theta)$, the point on the unit circle. Rotating $\mathbf{e}_2 = (0, 1)$, which starts a quarter-turn ahead, lands on $(\cos(\theta + 90^\circ), \sin(\theta + 90^\circ))$ $= (-\sin\theta, \cos\theta)$. So $$R_\theta = \begin{bmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{bmatrix}.$$
| Map of the plane | Matrix | Where e₁, e₂ go |
|---|---|---|
| Reflect across the $x$-axis | $\begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix}$ | $(1, 0)$, $(0, -1)$ |
| Reflect across $y = x$ | $\begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$ | $(0, 1)$, $(1, 0)$ |
| Reflect across $y = -x$ | $\begin{bmatrix} 0 & -1 \\ -1 & 0 \end{bmatrix}$ | $(0, -1)$, $(-1, 0)$ |
| Horizontal shear by $k$ | $\begin{bmatrix} 1 & k \\ 0 & 1 \end{bmatrix}$ | $(1, 0)$, $(k, 1)$ |
| Project onto the $x$-axis | $\begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}$ | $(1, 0)$, $(0, 0)$ |
| Stretch by $a$ and $b$ | $\begin{bmatrix} a & 0 \\ 0 & b \end{bmatrix}$ | $(a, 0)$, $(0, b)$ |
Worked example: A 30° rotation
- $\cos 30^\circ = \frac{\sqrt{3}}{2}$ and $\sin 30^\circ = \frac{1}{2}$, so $R = \begin{bmatrix} \frac{\sqrt{3}}{2} & -\frac{1}{2} \\ \frac{1}{2} & \frac{\sqrt{3}}{2} \end{bmatrix}$.
- $R\begin{bmatrix} 2 \\ 0 \end{bmatrix}$ $= 2\cdot(\text{column 1})$ $= \begin{bmatrix} \sqrt{3} \\ 1 \end{bmatrix}$.
- Check: the length is $\sqrt{3 + 1} = 2$, as a rotation must keep it.
Answer: $(\sqrt{3}, 1)$
Worked example: Projection onto a line
- The line has direction $\mathbf{u} = (1, 2)$, and projection onto it is $\mathbf{x} \mapsto \dfrac{\mathbf{x}\cdot\mathbf{u}}{\mathbf{u}\cdot\mathbf{u}}\mathbf{u}$ (from vector projections).
- $\mathbf{e}_1 \mapsto \frac{1}{5}(1, 2)$ and $\mathbf{e}_2 \mapsto \frac{2}{5}(1, 2)$.
- So $P$ $= \frac{1}{5}\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}$ $= \begin{bmatrix} \frac{1}{5} & \frac{2}{5} \\ \frac{2}{5} & \frac{4}{5} \end{bmatrix}$.
- Check: $P\begin{bmatrix} 1 \\ 2 \end{bmatrix} = \begin{bmatrix} 1 \\ 2 \end{bmatrix}$ (points on the line stay put) and $P\begin{bmatrix} -2 \\ 1 \end{bmatrix} = \mathbf{0}$ (perpendicular vectors vanish).
Answer: $\frac{1}{5}\begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}$
Why it works
Each family has a fingerprint you can check. Rotations and reflections keep lengths and angles: their columns are perpendicular unit vectors. Rotations keep the F reading the same way; reflections flip it. A projection does nothing new the second time ($P^{2} = P$), and a shear keeps one direction fixed while sliding the other.
Worked example: Reading a matrix
- $\mathbf{e}_1 \mapsto (0, -1)$ and $\mathbf{e}_2 \mapsto (-1, 0)$.
- The vector $(1, -1)$ stays put and $(1, 1)$ goes to $(-1, -1)$: the line $y = -x$ is fixed and the perpendicular direction flips.
Answer: Reflection across the line $y = -x$.
Key idea