Matrices & Transformations
A matrix looks like a grid of numbers — but it is really a function in disguise. Every matrix, when applied to a vector, transforms it: rotating it, stretching it, reflecting it, or collapsing it. Understanding this geometric picture is what separates people who can use linear algebra from people who can only compute with it.
Matrix Multiplication
A matrix $A$ transforms a vector $\mathbf{x}$ by computing the product $A\mathbf{x}$. To multiply a $2\times2$ matrix by a column vector, you take the dot product of each row of $A$ with the column vector:
Multiplying two matrices $AB$ composes their transformations. The $(i,j)$ entry of $AB$ is the dot product of row $i$ of $A$ with column $j$ of $B$:
The key fact: $AB$ means "apply $B$ first, then $A$." This is because $(AB)\mathbf{x} = A(B\mathbf{x})$ — $B$ acts on $\mathbf{x}$ first, then $A$ acts on the result. Order matters: matrix multiplication is not commutative. $AB \neq BA$ in general. Rotating then scaling produces a different result than scaling then rotating. But it is associative: $(AB)C = A(BC)$.
If $T(\mathbf{x}) = A\mathbf{x}$ and $S(\mathbf{x}) = B\mathbf{x}$, then $T(S(\mathbf{x})) = A(B\mathbf{x}) = (AB)\mathbf{x}$. Matrix multiplication is function composition. This is not a coincidence or a convenience — it is the correct way to think about what matrices fundamentally are.
Transformations
Every $2\times2$ matrix defines a linear transformation of the plane. "Linear" means two things: it maps the origin to itself, and it maps straight lines to straight lines. The entire transformation is determined by where the two basis vectors $\mathbf{e}_1 = (1,0)^T$ and $\mathbf{e}_2 = (0,1)^T$ land, and those destinations are precisely the columns of the matrix:
This column interpretation is powerful: to understand any matrix transformation, just look at its columns. They tell you exactly where the coordinate axes get sent. Everything else follows by linearity.
Some classic transformations and their matrices:
- Rotation by $\theta$: $\begin{pmatrix}\cos\theta & -\sin\theta\\\sin\theta & \cos\theta\end{pmatrix}$ — spins every vector by angle $\theta$ around the origin.
- Scaling by $k$: $\begin{pmatrix}k & 0\\0 & k\end{pmatrix}$ — stretches everything by the same factor $k$. Area scales by $k^2$.
- Reflection across the $x$-axis: $\begin{pmatrix}1 & 0\\0 & -1\end{pmatrix}$ — flips the $y$-component, leaves $x$ unchanged.
- Horizontal shear: $\begin{pmatrix}1 & k\\0 & 1\end{pmatrix}$ — slides horizontal layers sideways, like a stack of cards being pushed.
The clearest way to visualize a transformation is to imagine a grid drawn on the plane and watch what happens to it. Linear transformations always keep grid lines straight and evenly spaced — and the origin stays fixed. If you see those three properties violated, it is not a linear transformation.
Inverse & Rank
The determinant of a $2\times2$ matrix measures how much the transformation scales area. If a unit square gets sent to a parallelogram of area $|\det A|$, then $\det A$ is that scale factor (with sign indicating whether orientation is preserved or flipped):
The inverse $A^{-1}$ is the transformation that undoes $A$: $A^{-1}A = AA^{-1} = I$ (the identity). It exists if and only if $\det(A) \neq 0$. For a $2\times2$ matrix, there is a simple formula:
The rank of a matrix is the dimension of its output space — the number of truly independent directions in the columns. A $2\times2$ matrix with rank $2$ maps the plane to the full plane. A matrix with rank $1$ collapses the plane to a line. Rank $0$ collapses everything to a point.
A matrix is invertible exactly when it has full rank, which is exactly when $\det(A) \neq 0$. These three conditions — invertible, full rank, nonzero determinant — are all equivalent.
A matrix with $\det(A) = 0$ is called singular. It collapses space into a lower dimension — squishing a plane to a line, or a line to a point. Information is permanently destroyed: two different input vectors can map to the same output, making it impossible to trace back. There is no inverse because the transformation cannot be undone.