Matrices
$$\begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} e & f \\ g & h \end{pmatrix} = \begin{pmatrix} ae + bg & af + bh \\ ce + dg & cf + dh \end{pmatrix}$$
- Matrix multiplication is generally not commutative: $AB \ne BA$.
- Identity matrix $I = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$, and $AI = IA = A$.
Determinant and inverse of $A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$
$$\det A = ad - bc \qquad A^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}$$ If $\det A = 0$ the matrix is singular and has no inverse.
Solving simultaneous equations
$\begin{pmatrix} a & b \\ c & d \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} p \\ q \end{pmatrix}$ gives $\begin{pmatrix} x \\ y \end{pmatrix} = A^{-1}\begin{pmatrix} p \\ q \end{pmatrix}$.
Transformation matrices (about the origin)
| Transformation | Matrix |
|---|---|
| Reflection in the $x$-axis ($y=0$) | $\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$ |
| Reflection in the $y$-axis ($x=0$) | $\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}$ |
| Reflection in $y = x$ | $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$ |
| Reflection in $y = -x$ | $\begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}$ |
| Rotation $90^\circ$ anticlockwise | $\begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}$ |
| Rotation $180^\circ$ | $\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}$ |
| Rotation $90^\circ$ clockwise ($270^\circ$ anticlockwise) | $\begin{pmatrix} 0 & 1 \\ -1 & 0 \end{pmatrix}$ |
| Enlargement, centre origin, scale factor $k$ | $\begin{pmatrix} k & 0 \\ 0 & k \end{pmatrix}$ |
| Rotation through $\theta$ anticlockwise | $\begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix}$ |
Areas and combined transformations
$$\text{Area of image} = |\det M| \times \text{area of object}$$ For the transformation $A$ followed by $B$, the single matrix is $BA$ (apply the first transformation on the right). To find the image of $(x, y)$: $\ \begin{pmatrix} x' \\ y' \end{pmatrix} = M\begin{pmatrix} x \\ y \end{pmatrix}$.
Translation
Translation by vector $\begin{pmatrix} a \\ b \end{pmatrix}$: $(x, y) \to (x + a, y + b)$.