Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.A stretchy rubber sheet
Draw a grid of squares on a rubber sheet. Now stretch it, turn it, or slant it, but keep three rules:
- the centre pin stays where it is;
- straight lines stay straight;
- evenly spaced lines stay evenly spaced.
Any change that follows these rules is a linear map. A photocopier zooming to 200%, a picture rotated on your phone, and a shadow cast on the floor are all examples.
The secret: just watch two arrows
Here’s the magic. To know what happens to every point, you only need to know where two arrows go: “one step right” and “one step up”. Everything else follows. Try the presets, then drag the sliders:
det A = 1.00 (area scale) · rank = 2
Every layer of a neural network starts with a linear map: it stretches, turns and squashes the data’s grid, before a simple bend (the activation function) is applied.
- 1. A photocopier at 200% turns a 3 cm line into…
- 2. Which is NOT linear?
- 3. To know what a linear map does in the plane, you need to know where how many arrows go?
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.Matrix times vector
A matrix acts on a vector like this:
Each output entry is a dot product of a row with the vector. Example. .
The columns tell you everything
Multiply by : you get the first column . Multiply by : you get the second column . So the columns of a matrix are where the basis vectors land. That’s the “two arrows” secret from Level 0.
| Map | Matrix | Where (1,0) goes | Where (0,1) goes |
|---|---|---|---|
| Stretch | (2, 0) | (0, 3) | |
| Rotate 90° | (0, 1) | (−1, 0) | |
| Reflect in y-axis | (−1, 0) | (0, 1) | |
| Shear | (1, 0) | (1, 1) | |
| Project onto x-axis | (1, 0) | (0, 0) |
- 1. [[2, 0], [0, 3]] · (1, 1) = ?
- 2. [[0, −1], [1, 0]] · (2, 1) = ?
- 3. A map sends (1, 0) to (4, 5) and (0, 1) to (1, 2). Its first column is…
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.The definition
is linear if for all vectors and scalars .
Consequences: , lines map to lines (or points), and parallel lines stay parallel.
Every linear map ℝⁿ → ℝᵐ is a matrix
Write . Linearity gives . So
has rows (the output dimension) and columns (the input dimension).
Composition is matrix multiplication
“Do first, then ” is the map . The product is defined by (A1-3) precisely so that this works. Two warnings:
- The order reads right to left: in , acts first.
- Order matters: in general. Rotating then stretching differs from stretching then rotating.
Not everything is linear
Translation isn’t linear, because it moves the origin. Maps of the form are called affine. Two common ways to handle them:
- Neural networks: a dense layer computes , which is affine. The bias lets the layer shift its decision boundary away from the origin.
- Robotics and graphics: homogeneous coordinates turn affine maps into linear ones in one more dimension: . Robot poses are then matrices that compose by multiplication (R2).
Linear maps everywhere
| Where | Linear map |
|---|---|
| Neural networks | Dense layers , attention projections , convolutions |
| Data science | Linear regression predictions , PCA projections, feature standardization (affine) |
| Robotics | Rotations . The Jacobian maps joint speeds to hand velocity, |
| Vision | The camera projection matrix in homogeneous coordinates |
- 1. Is T(x, y) = (x + 1, y) linear?
- 2. A maps ℝ⁵ → ℝ³. Its shape is…
- 3. A dense layer from 128 inputs to 64 outputs, with bias, has how many parameters?
Level 3: Advanced
★★★★☆ Advanced⏱ 40 minGraduate level, with full derivations and proofs.A linear map is decided by a basis
Let be a basis of , and any vectors in . There is exactly one linear map with for all .
Proof. Every is uniquely , so define . Uniqueness of coordinates makes this well defined, and it’s linear because coordinates are linear in . Any linear with the same values on the basis agrees with on every combination of the basis vectors, which is everything. ∎
Why matrix multiplication is composition
If and , then with .
Proof. . Associativity of matrix multiplication, , is then just associativity of composing functions. ∎
The space of linear maps
The linear maps form a vector space . With bases chosen, it’s the same as the space of matrices, so .
Change of basis
If has matrix in the standard basis, then in the basis given by the columns of its matrix is . The same map can look complicated in one basis and simple (diagonal!) in another. That’s the motivation for eigenvectors (A2.3).
Exercise 3.1: T(1,0) = (3,1) and T(0,1) = (−1,2). Find T(2,3).
By linearity, .
Exercise 3.2: Show that the shear S = [[1, k], [0, 1]] satisfies Sⁿ = [[1, nk], [0, 1]]
By induction: .
- 1. dim 𝓛(ℝ³, ℝ²) = ?
- 2. In ABx, which matrix acts first?
- 3. A linear map is completely determined by…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Deep linear networks: one matrix, but not simple learning
Stacking linear layers without activations, , can only ever compute one linear map, so depth adds no expressive power. Yet Saxe, McClelland and Ganguli (2014) showed that gradient descent on deep linear networks has rich, nonlinear dynamics: plateaus, sudden drops, and learning of the strongest data directions first. Deep linear networks remain a key “solvable model” for understanding how real networks learn (B4). It’s also why a nonlinearity between layers is essential: without it, a 100-layer network collapses to a single matrix.
Convolution is a structured linear map
A 1-D convolution layer multiplies the input by a banded Toeplitz matrix. Each row holds the same kernel, shifted. Weight sharing makes it shift-equivariant: shifting the input shifts the output. Translation symmetry built into a linear map is the core idea of CNNs (E7). Equivariant networks extend it to rotations and other symmetries (E18).
Linear maps for nonlinear dynamics: the Koopman operator
Koopman (1931) observed that even a nonlinear system acts linearly on functions of the state (“observables”): . The catch is that this space of functions is infinite-dimensional. Modern data-driven methods such as dynamic mode decomposition and deep Koopman networks look for a finite set of observables where the dynamics are approximately linear. That enables linear prediction and control of fluids, robots and power grids (J5).
The Jacobian: a robot’s local linear map
For a robot arm, the map from joint angles to hand position is nonlinear. But near any pose, the small changes are related linearly: . Whitney’s resolved-motion rate control (1969) inverts this linear map to command joint speeds that produce a desired hand velocity, which is the basis of most arm teleoperation and servoing today (R3, S5). At a singular pose (for example, a fully stretched arm), loses rank and some hand directions become impossible (A2.1-6).
References
- A. Cayley (1858). “A memoir on the theory of matrices.” Philosophical Transactions of the Royal Society, 148.
- B. O. Koopman (1931). “Hamiltonian systems and transformation in Hilbert space.” PNAS, 17(5).
- D. Whitney (1969). “Resolved motion rate control of manipulators and human prostheses.” IEEE Transactions on Man-Machine Systems, 10(2).
- A. Saxe, J. McClelland, S. Ganguli (2014). “Exact solutions to the nonlinear dynamics of learning in deep linear neural networks.” ICLR.
- M. Bronstein, J. Bruna, T. Cohen, P. Veličković (2021). “Geometric deep learning: Grids, groups, graphs, geodesics, and gauges.” arXiv:2104.13478.
- S. Axler (2024). Linear Algebra Done Right, 4th ed. Chapter 3.