The idea: where A sends space, and what it loses
A 3×3 matrix A takes an input x in ℝ³ to an output Ax in ℝ³. The columns of A are where the unit vectors land: A·î = col 1, A·ĵ = col 2, A·k̂ = col 3. So for any x,
Ax = x1·col 1 + x2·col 2 + x3·col 3.
Two sets of vectors describe what A does. The column space C(A), in the output, is everything A can reach. The null space N(A), in the input, is everything A crushes to 0. The canvas shows the input space on the left and the output space on the right.
Column space: every Ax lands there
Ax is always a mix of the columns, so every output lies in the span of the columns. That span is C(A). For three columns in ℝ³ it is all of ℝ³, a plane through 0, a line through 0, or just {0}.
- Columns (1, 0, 1), (1, 1, 0), (0, 1, 1) are independent: C(A) = ℝ³ and the cube lands on a solid box. (Demo 1: rank 3, nothing collapses)
- Columns (1, 0, 1), (0, 1, 1), (1, 1, 2): col 3 = col 1 + col 2 adds nothing new, so C(A) is the plane spanned by the first two, z = x + y. The cube is squashed flat onto it. (Demo 2: rank 2, space flattens onto a plane)
- Columns (1, 1, 1), (−1, −1, −1), (1, 1, 1) all point along one line, so C(A) is that line. (Demo 6: rank 1, everything on a line)
Null space: what goes to 0
N(A) is the set of all x with Ax = 0. It always holds 0, and with two of its vectors it holds every mix of them, so it is a subspace of the input: {0}, a line, a plane or all of ℝ³. For the rank-2 matrix, col 1 + col 2 − col 3 = 0, so x = (1, 1, −1) and every multiple of it goes to 0: N(A) is the line t·(−1, −1, 1). On the canvas four purple inputs on that line are sent through A and all land on the origin. (Demo 3: the null space goes to 0)
A null vector is a dependence among the columns: x1·col 1 + x2·col 2 + x3·col 3 = 0. Independent columns leave only x = 0.
Rank and nullity: pivots and free columns
Row reduction finds both. Reduce A to its reduced row echelon form (RREF). Each pivot (a leading 1, orange in the matrix panel) marks a column that is not a mix of the ones before it; each free column gives one direction of N(A) (set that free variable to 1, the others to 0, and solve for the pivots).
- rank = number of pivots = dim C(A)
- nullity = number of free columns = dim N(A)
- rank + nullity = 3, the number of columns: every column is either a pivot or free.
| A on the page | RREF | rank | C(A) | N(A) | det |
|---|---|---|---|---|---|
| rank 3: invertible | I | 3 | ℝ³ | {0} | 2 |
| col 3 = col 1 + col 2 | [1 0 1; 0 1 1; 0 0 0] | 2 | plane z = x + y | line t·(−1, −1, 1) | 0 |
| columns ∥ (1, 1, 1) | [1 −1 1; 0 0 0; 0 0 0] | 1 | line t·(1, 1, 1) | plane x1 − x2 + x3 = 0 | 0 |
| zero matrix | 0 | 0 | {0} | ℝ³ | 0 |
The rank is the number of dimensions A keeps; the nullity is the number it loses. A loses exactly as many as it fails to keep.
Solving Ax = b
Ax = b asks for a mix of the columns that gives b, so it has a solution exactly when b is in C(A). Row reduce the augmented matrix [A | b]:
- If a row becomes 0 0 0 | c with c ≠ 0, it says 0 = c: no solution. For the rank-2 A and b = (1, 1, 1), z = 1 but x + y = 2, so b is off the plane. The closest output is the projection p = (2/3, 2/3, 4/3), and the gap |b − p| = 1/√3 ≈ 0.58. (Demo 5: b off the plane: no solution)
- Otherwise set the free variables to 0 to get one particular solution xp. Any null vector n can be added, since A(xp + n) = b + 0 = b, and every solution has this form. So all solutions = xp + N(A): a copy of the null space moved off the origin. For b = (1, 1, 2): xp = (1, 1, 0) and the solutions are the line (1, 1, 0) + t·(−1, −1, 1). (Demo 4: Ax = b, b on the plane: a line of solutions)
| rank | b in C(A) | b not in C(A) |
|---|---|---|
| 3 | exactly one solution x = A−1b (every b) | cannot happen |
| 2 | a line of solutions | none |
| 1 | a plane of solutions | none |
| 0 | only b = 0, then every x | none |
Invertible, rank 3, N(A) = {0}, det ≠ 0
For a square matrix these all say the same thing:
- A is invertible (some A−1 undoes it);
- rank 3: three pivots, C(A) = ℝ³, every Ax = b has a solution;
- N(A) = {0}: nothing but 0 is lost, so solutions are unique;
- det A ≠ 0: the cube keeps a nonzero volume.
When any one fails they all fail: the cube is flattened (det = 0), something nonzero goes to 0, and some b cannot be reached. Rank–nullity ties the two halves together: C(A) = ℝ³ exactly when N(A) = {0}.
See also Linear Transformations, Gaussian Elimination for the row reduction, Determinant, Inverse Matrix, 3D Projection Matrix (a rank-2 map onto a plane), Least Squares for the closest Ax when there is no solution, Eigenvectors (N(A) is the eigenspace of λ = 0), Plane Equation, Gram–Schmidt and SVD and PCA.
What the page leaves out
The other two of the four fundamental subspaces: the row space C(Aᵀ) and the left null space N(Aᵀ). In the input, the row space is perpendicular to N(A) (every row dotted with a null vector is 0); in the output, N(Aᵀ) is perpendicular to C(A). Non-square matrices (m × n, where rank + nullity = n and C(A) lives in ℝm), bases and dimension in general, numerical rank with rounding errors (the SVD), and matrices whose entries make the row reduction need row swaps.