+15 XP

Matrices Warp Space

Here's the beautiful geometric truth: multiplying by a matrix transforms space itself. It takes the whole grid of the plane and stretches, rotates, flips, or shears it — while keeping the origin fixed and grid lines straight, parallel, and evenly spaced. That's what "linear transformation" means.

The mind-bending part: a matrix doesn't just move one vector — it moves every point in space at once, dragging the whole grid along. Multiply the matrix by any vector to see where that vector lands; do it to all of them and the entire plane shifts as one piece. Two rules never break: the origin stays put, and grid lines stay straight, parallel, and evenly spaced — that's what makes it linear (no crumpling space into a ball).

The key insight that makes matrices readable: a matrix's columns tell you where the basis vectors land. The first column is where î = (1,0) goes; the second column is where ĵ = (0,1) goes. Know those two arrows and you know the entire transformation.

Play with it. Pick a transformation and watch the grid (and the basis-vector arrows) move — the arrows always match the matrix's columns. (Try Shear: it slides the top sideways like italic text — every point shifts right in proportion to its height, while the bottom stays anchored.)

A = [[-1, 0], [0, 1]]  ·  det = -1
Before
After
î → column 1
ĵ → column 2

Flips space across the y-axis (x → −x). The two colored arrows are where the basis vectors î and ĵ land — and those are exactly the columns of the matrix. The green area is the unit square; the determinant is how much that area scales (det = 0 means it's crushed flat).

Watch the determinant. The green square is the unit area; the determinant is the factor that area scales by. A determinant of 2 doubles areas; a determinant of 0 crushes everything flat onto a line — which is the doomed matrix Q (try it). Hold that thought for the next lesson.

🤖 AI connection: every layer of a neural network warps its input space like this, and stacking layers stacks transformations. Understanding a network often means understanding what geometric transformation each layer applies to the data.