Path
Linear algebra · Lesson 2
Matrices as linear maps
A matrix packages a linear transformation: multiply to stretch, rotate, shear, or project space in a uniform way.
Core ~28 minDeep study ~78 minWhat does matrix-vector multiplication do?What is linearity?
Before this: Vectors
How this idea was born
Tables of numbers show up everywhere: inventories, pixel grids, systems of coefficients. The human struggle is what those tables do. Stretch, rotate, shear, mix features, send one list of numbers to another in a disciplined way. A matrix is not a spreadsheet that happens to be square. It is a machine.
Arthur Cayley (1821-1895) developed matrix algebra as an object of study in its own right, not merely a bookkeeping grid. MacTutor sketches the prolific career. Steal the ethic: when a notation keeps appearing, promote it to a citizen of mathematics and learn its laws.
A modern campfire story sits in Strogatz's "Untangling the Web": Google's PageRank. A page's importance depends on the importance of pages that link to it. Ranking the web becomes finding structure in a giant link matrix, not reading every page by hand. Treat that as popular pedagogy about matrices-as-machines, not as a full corporate history.
For a modern rereader, this chapter rebuilds the machine view so later lessons on projections and bases feel inevitable rather than bolted on.
First principles
A map is linear if
It respects addition and scaling. No curving, no shifting by itself (a pure translation is affine, not linear).
A matrix represents a linear map via .
Columns of are where the basis vectors go. That one sentence unlocks most geometric matrix intuition. is a linear combination of 's columns with weights from .
Composition: doing then is the product (order matters). Neural nets stack such maps, then add nonlinearities between them.
Worked intuition
If you know where and go, you know the whole linear map on the plane - because every vector is a combo of those basis arrows. Matrix columns are those destinations. That sentence is worth a week of homework.
Watch a unit square under a matrix. Rotation turns it. Shear tilts it. Scaling stretches sides. Projection flattens it onto a lower-dimensional shadow. Ask of every matrix: what does it do to the square?
Algebrica's matrices and linear maps pages show arrays becoming transformations. Watch where basis vectors go - that habit unlocks most geometric matrix intuition.
In data language, a weight matrix learns which linear mixture of input features predicts well. The geometry and the spreadsheet are the same object wearing two outfits.
Common confusions
Order of multiplication. Doing shear then rotate is not rotate then shear. and usually differ. Write the maps in the order they act, carefully.
Linearity versus affine. is affine when . Neural layers are affine maps plus a nonlinearity. People say "linear layer" colloquially; the bias term already left pure linearity.
Matrices as only "numbers in a grid." Without the map story, multiplication rules feel arbitrary. With the map story, multiplication is composition, and the rules become inevitable.
Invertibility as default. Many matrices squash space (singular maps). Not every transformation undoes. Rank (coming in the bases chapter) measures how many independent output directions survive.
Assuming invertibility. Many maps lose information. Solving may have zero or infinitely many solutions.
Reading every array as a transform. Some matrices are mere data tables. The map story applies when multiplication means applying a linear action.
History & stories
Arthur Cayley developed matrix algebra as an object of study in its own right, not merely a bookkeeping grid. MacTutor's Cayley biography sketches the prolific career. Treating abstract structure as worthy of love is the ethic: promote recurring notation to citizenship.
A modern campfire story sits in Strogatz: PageRank. A page's importance depends on the importance of pages that link to it. Ranking the web becomes finding structure in a giant link matrix, not reading every page by hand.
Real world
Image transforms, robot joint kinematics (linearized near an operating point), and spreadsheet "multiply this grid by that grid" workflows are matrix moves. Computer graphics pipelines are long compositions of linear and affine maps.
Whenever a system mixes inputs into outputs with constant coefficients, a matrix is waiting to be named.
Open when you want the machine-learning connection. Skip freely.
Field notes, extra examples, and glossary live here when you want more than the core path.
Carry this forward
- Matrices package linear maps; columns show where basis vectors land.
- Multiplication is composition; order usually matters.
- Next: measuring alignment with dot products and projections.
Read more
Go deeper when curiosity hits - videos, essays, and primary trails.
- referenceMacTutor - Arthur Cayley
- video3Blue1Brown - Linear transformations and matrices
- videoKhan Academy - Matrices as transformations
- bookSteven Strogatz - The Joy of X'Untangling the Web' on PageRank as linear algebra in the wild.
- articleAlgebrica - Linear mapsMatrices as transformations; kernel and image nearby on the site.
Check your understanding
A short learning loop - try a few, learn from misses, mark complete when you have engaged. No timer, no scoreboard.
Try at least 3 core prompts, or choose I'll return later.