Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.The shadow machine
Hold a toy aeroplane under a lamp and look at its shadow on the floor. The shadow keeps the left–right and front–back information, but the height is gone. A plane high up and a plane low down make the same shadow.
- The directions that vanish (here, “straight up”) are what mathematicians call the kernel.
- Everything the shadow can look like (any spot on the floor) is called the image.
A fair trade
The air has 3 directions. The floor keeps 2 and the lamp destroys 1, and 2 + 1 = 3. Whatever a linear machine does, what it keeps plus what it destroys always adds up to what you started with. That’s the rank–nullity theorem, one of the most useful facts in all of linear algebra.
Try the “Project onto x” and “Rank 1” presets: the grid collapses onto a line, and the demo shows which direction gets squashed to zero.
det A = 1.00 (area scale) · rank = 2
- 1. A flagpole points straight up. How long is its shadow from a lamp directly above?
- 2. A 3D world is flattened onto a 2D floor. How many directions are lost?
- 3. Can two different planes cast the same shadow?
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.The two key sets
For a matrix (a linear map ):
- Kernel (null space): , the inputs that get destroyed.
- Image (column space): , everything the map can output. It’s the span of the columns.
A worked example
- Image. Both columns are multiples of , so the image is the line .
- Kernel. means , so . The kernel is the line .
- Rank (dimension of the image) = 1, nullity (dimension of the kernel) = 1, and = the number of columns.
- 1. Projection onto the x-axis sends (3, 7) to…
- 2. The kernel of the x-axis projection is…
- 3. Rank of [[1, 2], [2, 4]]?
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 35 minUndergraduate students and practising engineers.Rank, nullity and the theorem
(the number of independent columns), and .
For : , the number of columns (inputs).
Computing them: row reduction
Reduce to reduced row echelon form (RREF). The columns with a leading 1 (pivots) count the rank. Every other column is a free variable, and each free variable gives one basis vector of the kernel. For example, has RREF . That’s 2 pivots (rank 2) and 1 free variable (nullity 1), with kernel spanned by .
What the kernel and image tell you
| Property | Test |
|---|---|
| is injective (one-to-one) | , i.e. rank = |
| is surjective (onto ) | rank = |
| has a solution | |
| The solution is unique | |
| All solutions | with |
The last row is important: if one solution exists, adding anything from the kernel gives another one.
In data science and ML: identifiability
In linear regression , if a feature is a combination of others (for example, total = a + b), then has a non-trivial kernel. Adding any kernel vector to the weights gives identical predictions, so the “true” weights can’t be identified. Feature importances become meaningless. Remedies: remove redundant features, or use ridge regression, which picks one solution (Practice Code 5).
In robotics: singularities and redundancy
The Jacobian maps joint speeds to hand velocity. Its image is the set of hand velocities that are possible right now. At a singular pose, the rank drops and some directions become impossible. Its kernel is the set of joint motions that don’t move the hand, the “self-motion” of redundant arms (A2.1-3).
- 1. A is 3 × 5 with rank 3. Nullity?
- 2. A 4 × 4 matrix has rank 4. Is it injective?
- 3. A 5 × 3 matrix can be surjective onto ℝ⁵?
Level 3: Advanced
★★★★☆ Advanced⏱ 45 minGraduate level, with full derivations and proofs.Kernel and image are subspaces
is a subspace of , and is a subspace of .
Proof. If , then . And is in the image. ∎
Proof of rank–nullity
.
Proof. Let be a basis of , and extend it to a basis of (A2.1-4), so . We claim is a basis of the image.
- Spanning: any has .
- Independent: if , then , so it equals some . Independence of the whole basis forces all .
So . ∎
Consequences
- Square matrices: for , injective ⟺ surjective ⟺ invertible ⟺ rank . One condition gives all of them for free.
- Row rank = column rank. The number of independent rows equals the number of independent columns. So .
- Wide matrices always have kernels: if , then nullity ≥ . More unknowns than equations means infinitely many solutions (if any).
The four fundamental subspaces
Strang (1993) organised everything into four subspaces of with rank :
| Subspace | Lives in | Dimension |
|---|---|---|
| Column space | ||
| Left null space | ||
| Row space | ||
| Null space |
Each pair is orthogonal: the null space is perpendicular to the row space, because says is perpendicular to every row. Likewise the left null space is perpendicular to the column space. This picture is the geometric heart of least squares (A2.4) and the SVD (A2.3).
Exercise 3.1: Prove that A is injective if and only if ker A = 0
(⇒) If , injectivity gives . (⇐) If , then , so . ∎
- 1. A is 6 × 4 with rank 3. Dimension of the left null space ker Aᵀ?
- 2. A 4 × 7 matrix has nullity at least…
- 3. ker A is orthogonal to…
Level 4: Expert
★★★★★ Expert⏱ 35 minResearchers: original papers and open problems.Null-space control: two jobs at once
A redundant robot can follow a hand trajectory and pursue a secondary goal, such as avoiding a joint limit or an obstacle. The secondary motion is projected into the Jacobian’s kernel, so it can’t disturb the hand:
Here is the pseudo-inverse (A2.4), and projects any vector onto . This structure, from Liégeois (1977) and generalized in Khatib’s operational-space framework (1987), is how humanoids balance while reaching, and how space station arms avoid collisions while holding a payload (S5).
Huge kernels and sparse solutions: compressed sensing
If with (few measurements, many unknowns), the kernel has dimension at least , so infinitely many signals explain the data. Candès, Romberg and Tao (2006) and Donoho (2006) showed that if the true signal is sparse, and ’s kernel contains no sparse vectors (a condition random matrices satisfy with high probability), then the sparsest solution is unique and can be found by L1 minimization. This changed MRI (faster scans) and single-pixel cameras, and it’s used in spacecraft imaging with limited bandwidth.
Kernels in deep learning
Over-parameterized networks have far more weights than data constraints. Locally, the map from weights to predictions on the training set has a large kernel: many weight changes don’t change any prediction. Which solution gradient descent picks out of this huge set (“implicit bias”, B4) is a central question in deep-learning theory. For linear models trained from zero, gradient descent finds exactly the minimum-norm solution, the one orthogonal to the kernel.
References
- A. Liégeois (1977). “Automatic supervisory control of the configuration and behavior of multibody mechanisms.” IEEE Transactions on Systems, Man, and Cybernetics, 7(12).
- O. Khatib (1987). “A unified approach for motion and force control of robot manipulators: The operational space formulation.” IEEE Journal on Robotics and Automation, 3(1).
- G. Strang (1993). “The fundamental theorem of linear algebra.” American Mathematical Monthly, 100(9).
- E. Candès, J. Romberg, T. Tao (2006). “Robust uncertainty principles: exact signal reconstruction from highly incomplete frequency information.” IEEE Transactions on Information Theory, 52(2).
- D. Donoho (2006). “Compressed sensing.” IEEE Transactions on Information Theory, 52(4).
- G. Strang (2016). Introduction to Linear Algebra, 5th ed. Chapter 3.