Linear Algebra, Live
Strang §3.5 · Dimensions of the four subspaces

The four fundamental subspaces and their sizes

Slide 5 gave every subspace a size, its dimension. Now we collect all the subspaces one matrix carries. Think of a matrix as having two rooms: an input room where the x vectors live, and an output room where the results Ax land. Each room holds two subspaces. Take A = 1236. In the input room: the row space, all combinations of the rows, is the line through 12, and the nullspace is the line through −21. In the output room: the column space is the line through 13, and the left nullspace, all y with Aᵀy = 0, is the line through −31. The rank r sets the size of all four.

Lesson 4 · slide 6Four subspaces
inputs (ℝⁿ):  row space r + nullspace n − r   |   outputs (ℝᵐ):  column space r + left nullspace m − r
Key ideas
  1. Inputs (ℝⁿ, all vectors with n components): the row space C(Aᵀ) (all combinations of the rows), dimension r, and the nullspace N(A), dimension n − r.
  2. Outputs (ℝᵐ): the column space C(A), dimension r, and the left nullspace N(Aᵀ) (all y with Aᵀy = 0), dimension m − r.
  3. The row space and the column space always have the same dimension, r.
  4. The row space is perpendicular to the nullspace.

The two new subspaces

You know the column space C(A) and the nullspace N(A). Two more come from the transpose Aᵀ (lesson 3), which turns rows into columns:

  • The row space is all combinations of the rows of A. The rows of A are the columns of Aᵀ, so we write it C(Aᵀ).
  • The left nullspace N(Aᵀ) is all y with Aᵀy = 0: the nullspace of Aᵀ.

Why "left"? Transpose both sides of Aᵀy = 0 (lesson 3). Transposing twice gives A back, (Aᵀ)ᵀ = A, so (Aᵀy)ᵀ = yᵀ(Aᵀ)ᵀ = yᵀA. So Aᵀy = 0 is the same as yᵀA = 0: y multiplies A from the left, and mixes the rows of A into zero.

All four for a 2×2 matrix

A = 1236 has rank 1.
row space: the line through 12; both rows, 12 and 36, lie on it   nullspace: the line through −21
column space: the line through 13   left nullspace: the line through −31
Finding the nullspace: Ax = 0 says x₁ + 2x₂ = 0 (row 2 says the same, times 3). Set x₂ = 1, then x₁ = −2, so x = −21.
Finding the left nullspace: Aᵀ = 1326, and Aᵀy = 0 says y₁ + 3y₂ = 0 (the second row, 2y₁ + 6y₂ = 0, says the same). The free variable is y₂. Set y₂ = 1, then y₁ = −3, so y = −31.
The 2 by 4 matrix from slide 3 has r = 2: row space 2, nullspace 2 (its two special solutions), column space 2 (all of ℝ²), left nullspace 0.

The row space is perpendicular to the nullspace

Look at the pairs in that example: 12·−21 = −2 + 2 = 0, and 13·−31 = −3 + 3 = 0. Lesson 1 said a dot product of 0 means a right angle. This is no accident. Ax = 0 says each row of A, dotted with x, gives 0. So x is perpendicular to every row, and to every combination of rows: the whole row space.

v is the row 12. As w turns, v · w hits 0 exactly when w points along −21 or 2−1: the nullspace line, at a right angle to the row.

The same argument on Aᵀ shows the left nullspace is perpendicular to the column space: Aᵀy = 0 says each column of A, dotted with y, gives 0. Lesson 5 builds on this.

An aside: a shadow

If you like pictures, here is one (lesson 5 studies shadows like this). The sun is straight overhead, and A = 100010 takes a point xyz to its shadow xy: A215 = 21.

  • Nullspace: lifting a point straight up doesn't move its shadow. A00z = 00, so N(A) is all multiples of 001.
  • Row space: combinations of 100 and 010: a flat floor inside the 3D input space (vectors with 3 numbers). It is perpendicular to 001.
  • Column space: every xy: all of ℝ², a separate 2D picture of the outputs.
  • Left nullspace: Aᵀy = y₁y₂0 is 0 only for y = 0. So it holds only 0.
The input space of the shadow matrix. The two arrows are the rows of A. They span the floor: the row space. The point above the origin is in the nullspace, and it sticks straight out of the floor.

Keep reading with the full course

Finish lesson 4 and you will be able to: write down every solution of Ax = b, not just one.

Still locked here:

  • The rest of this explanation
  • 4 more examples with step-by-step solutions
  • Five extra members-only problems with worked solutions

$20 once, lifetime access. Lessons 1 to 3 stay free.

Examples

Example 1 · All four lines

A = 1111, rank 1.

Show solutionHide solution
Row space: multiples of 11. Nullspace: multiples of 1−1
Column space: multiples of 11. Left nullspace: multiples of 1−1
Exercise Build a rank-1 matrix whose column space is the line through (1, −1). Edit the code and press Run.
slide_6.py Loading Python…
1
Output · Ctrl+Enter runs
Press Run to execute this slide's code. Ctrl+Enter works too.

Questions and comments

Stuck on something, or found a mistake? Ask here and I'll answer. You sign in with GitHub.

The full course

From Ax = b to PCA, by running it

Lessons 1 to 3 are free. Finish all eight and you will be able to:

You get: all 8 lessons with Python labs · every worked example and solution · 5 extra problems per lesson · your progress tracked · answers to your questions · every future update.

$20 once · lifetime access
Continue to checkout →

Already a member? Log in to the course