Linear transformations
Read a matrix as the images of basis vectors, then use rank and nullspace to explain lost information.
On this page
The question for today
What you’ll understand
- Check linearity without relying on the appearance of a graph.
- Construct a matrix from its action on basis vectors.
- Explain injectivity and reachability using nullspace and rank.
A matrix is a compact instruction for a linear transformation after input and output bases have been chosen. Thinking in terms of the transformation explains why matrix columns matter and why some systems cannot be inverted. Linear layers in a neural network, projections onto sensor channels, and operators in quantum mechanics all use this language, although their surrounding models introduce additional assumptions. Begin by asking what happens to a basis rather than multiplying entries without a purpose.
Linearity is a promise about combinations
A map is linear if applying it to any linear combination gives the same result as applying it separately and combining the outputs. Consequently a linear map sends zero to zero. Multiplication by a fixed matrix is linear, including rectangular matrices. The familiar formula is affine rather than linear in this sense: its offset means that zero does not remain zero.
Once you know the images of all basis vectors, you know the entire linear map. Write an input as a combination of basis vectors, distribute the map through that combination, and collect the outputs. This argument explains the column convention: in standard coordinates, column of a matrix is where the th input basis vector lands. Matrix multiplication is the bookkeeping of this geometric statement.
The nullspace records invisible changes
The nullspace consists of all inputs mapped to zero. If a nonzero vector lies there, two distinct inputs separated by that vector have exactly the same output. The transformation has discarded information. The column space, also called its image, contains every output that can be reached. Its dimension is the rank. A measurement system can lose distinctions in its input while still covering every possible output channel.
Rank and nullity account for the input dimension together. An independent input direction either contributes to an observable output or belongs to the invisible combinations described by the kernel. For a matrix with more columns than rows, a nontrivial nullspace is unavoidable. For a square matrix, zero nullity is equivalent to invertibility; a rectangular map needs more careful distinctions between left inverses and right inverses.
Composition remembers order and coordinates
If acts first and second, the composed matrix is . Dimensions must match, and reversing the order generally changes the transformation or makes the product undefined. Stretching a picture horizontally and then rotating it does not usually produce the same picture as rotating first. This is a concrete reason that multiplication of matrices differs from multiplication of ordinary numbers.
Changing bases changes a matrix representation but not the abstract map. For one endomorphism, if columns of an invertible matrix are the new basis vectors, the new representation is . This coordinate flexibility later helps expose eigenmodes and quantum operators. A learned neural-network layer with a bias instead has an affine component; calling the whole layer linear would conceal that distinction.
Work it through
Build a two-sensor map
A map takes to , to , and to . Find the output for and one invisible input direction.
Place the specified images in columns: . It maps three input coordinates to two output coordinates.
Use linearity: . Each contribution is weighted by the corresponding input coordinate.
Solve : the equations are and . Setting gives , an invisible direction.
The output is (5,2), rank is 2, and nullity is 1. Adding any multiple of (−1,−1,1) to the input leaves these two sensor outputs unchanged.
The living notebook
Explore the model
Interactive lab · vectors
Inspect projection as a linear measurement
Change the angle and magnitude of the single displayed vector and inspect its x/y projections. Projecting onto x is a linear map from the plane to one scalar: a vertical input component is invisible to that measurement. The lab illustrates this projection rather than simulating the worked example's rectangular matrix.
- x component
- 1.393
- y component
- 0.975
- Magnitude
- 1.7
Playback traces a fixed vector and its projections. Angle and magnitude set the geometry; the moving marker does not change them. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA projection retains one component while discarding an independent input direction.
Pause & reason
Check your understanding
Your turn
Try it yourself
Does retain both input coordinates? Find its rank and an invisible direction.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Compare the two output coordinates, then solve x+y=0.
Compare with the solution
Every output lies on the line , so rank is one. The nonzero vector maps to , giving a one-dimensional kernel. Only the sum survives; the individual contributions cannot be reconstructed without extra information.
Keep the idea
Take it with you
- Matrix columns are images of input basis vectors.
- Nullspace describes lost distinctions; column space describes reachable outputs.
- Composition order and the chosen input/output bases matter.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.