Matrices: Functions That Move Space
A matrix isn't a grid of numbers — it's a verb that grabs the whole plane and moves it.
On this page
A matrix is a verb, not a spreadsheet#
Most people meet matrices as grids of numbers with an arbitrary-looking rule for multiplying them — a rule you memorize, apply on an exam, and never quite believe. That framing is the single biggest obstacle to understanding linear algebra, because it hides the one idea that makes everything click.
A matrix is not a table. A matrix is a function that moves space. Feed it a vector and it hands you back another vector — rotated, stretched, sheared, or reflected. The grid of numbers is just the compact instruction sheet for that motion. Once you see the motion, the "arbitrary" multiplication rule turns out to be the only rule it could possibly be.
The functions matrices represent are special: they are linear. Two properties define that word. Grid lines stay straight and evenly spaced, and the origin stays fixed. Concretely, and . No bending, no shifting the whole plane sideways — just a clean, uniform reshaping of space.
The columns are where the basis vectors land#
Here is the fact that dissolves the mystery. In two dimensions, every vector is built from two building blocks: pointing right and pointing up. The vector is literally .
Because the transformation is linear, if you know where and go, you know where everything goes:
The transformed vector is rebuilt from the transformed building blocks, using the same recipe. So a linear transformation is completely pinned down by just two pieces of data: where lands and where lands. Stack those two landing spots as columns and you have the matrix:
The first column is where ends up; the second column is where ends up. That is the entire meaning of the matrix.
Drag the sliders or hit a preset and watch the whole grid deform. Notice the gold arrow always settles onto the first column and the blue arrow onto the second — the numbers in the readout are just their coordinates.
Why the multiplication rule looks like that#
Now the payoff. To apply to a vector , you rebuild from the transformed basis:
That "weird" formula isn't a convention someone invented. It is exactly the statement scale the first column by , the second by , and add. Matrix-times-vector is nothing more than reassembling a vector from where the basis vectors went.
Multiplication is composition#
The deepest reason the multiplication rule is shaped the way it is: the product of two matrices is the composition of their transformations. If you apply first and then , the combined motion is the single matrix . Reading right-to-left mirrors function notation, where also does first.
To find the columns of , ask the usual question — where do the basis vectors go? Send through , then through ; that composite landing spot is the first column of . Grind that through and you get precisely the row-times-column rule everyone memorizes. The rule is engineered so that matrix multiplication and function composition are the same operation. That is why it mixes rows and columns the way it does, and why it is the natural rule rather than an arbitrary one.
Order matters: AB ≠ BA#
If multiplication is composition, an immediate consequence follows: order matters, because the order you apply transformations matters. Rotating a shape and then shearing it does not land in the same place as shearing and then rotating. Regular numbers commute; transformations of space generally do not.
Take = rotate 90° and = a horizontal shear. Applying then gives , while applying then gives . Different matrices, different final shapes, same two ingredients. So whenever you see written down, don't read it as an algebraic quirk — read it as "do-this-then-that isn't the same as do-that-then-this," which is obviously true in the physical world.
The determinant measures area#
Every one of these transformations does something to area. The unit square spanned by and gets carried to a parallelogram spanned by the two columns. The determinant is the factor by which area is scaled, and it carries a sign:
Read the sign geometrically. A determinant of means areas double; means they halve. A negative determinant means the transformation flipped the plane over — orientation reversed, as a reflection does — with the magnitude still giving the area factor. And a determinant of zero is the interesting collapse: the transformation squashes all of space onto a line (or a point), destroying a dimension. When that happens the columns are parallel, there is no way to undo the flattening, and the matrix is non-invertible. In three dimensions the same number measures volume scaling instead of area.
You can watch the number appear in the first widget above: the shaded parallelogram is the image of the unit square, and its area is exactly , turning pink the instant the determinant goes negative and orientation flips.
Identity and inverse: do nothing, and undo#
Two special matrices round out the picture. The identity leaves and exactly where they started — it is the "do nothing" transformation, the number of the matrix world. The inverse is the transformation that undoes : apply then and you are back where you began, so . An inverse exists precisely when — you cannot undo a transformation that already threw away a dimension, which is exactly why a zero determinant means non-invertible.
Where this leads#
Seeing matrices as motions rather than tables pays dividends everywhere. Some transformations have special directions they only stretch and never turn — those are the eigenvectors and eigenvalues that reveal what a matrix is "really" doing. A 90° rotation matrix has no such real direction, and the algebra signals this by handing you complex numbers, which are themselves just rotation-and-scaling of the plane. And the whole machinery of training neural networks by gradient descent runs on matrices moving high-dimensional space, layer after layer. In every case, the grid of numbers is the least interesting thing about a matrix. The motion is the point.
- A matrix is a linear transformation of space — a function that rotates, scales, shears, or reflects — not merely a grid of numbers.
- The columns of a matrix are exactly where the basis vectors and land; multiplying a matrix by a vector just rebuilds that vector from the transformed basis.
- The multiplication rule looks the way it does because the product of two matrices is the composition of their transformations — "do one, then the other."
- Order matters: in general, because rotate-then-shear genuinely differs from shear-then-rotate.
- The determinant is the area (or volume) scaling factor: negative means orientation flipped, zero means space collapsed to a lower dimension and the matrix has no inverse.
Share this article