03 · Maps
Matrix
A matrix is a linear machine: it sends arrows to arrows, and the origin stays put. Scale, rotate, shear, flip — all 2×2 matrices.
In English
A matrix is a machine that takes arrows to arrows and leaves the origin alone. Stretch, spin, squash, flip — each is a 2×2 grid of numbers. Attention, gates, and neural layers are this machine, bigger.
- Try this
- Pick Rotate, then Scale. Watch the unit square. The square is every arrow at once.
- Keep this
- A matrix is a linear map. It moves the whole space.
Lab · a linear machine
[[2, 0], [0, 0.5]]
The shaded parallelogram is the image of the unit square. Drag v; Av is forced. Linear means A(u+w)=Au+Aw and the origin cannot leave the origin.
Every linear map on the plane is a 2×2 matrix. The image of the unit square tells you what the map does to area (the determinant) and to shape.
Unitary maps (quantum gates) keep area and angles in the complex sense — they keep length. Attention matrices do not have to.