4.5.44Linear Algebra (Full)

Subspaces — four fundamental subspaces of a matrix

1,835 words8 min readdifficulty · medium1 backlinks

1. What is a subspace? (foundation first)

WHY these rules? A subspace must be a "flat thing through the origin" (a line, plane, hyperplane...). If you can scale and add and never leave, you have a complete vector world with no edges. A line not through the origin fails rule 1, so it is not a subspace.


2. Building the four subspaces from scratch

Let AA be m×nm \times n. Write its columns and rows: A=[a1an],ARm×n.A = \begin{bmatrix} | & & | \\ a_1 & \cdots & a_n \\ | & & | \end{bmatrix}, \qquad A \in \mathbb{R}^{m\times n}.

(a) Column space C(A)C(A) — reachable outputs

WHY: Ax=x1a1++xnanAx = x_1 a_1 + \dots + x_n a_n is literally a combination of the columns. So the set of all possible outputs b=Axb=Ax is exactly the span of the columns. HOW to use: Ax=bAx=b is solvable     bC(A)\iff b \in C(A).

(b) Null space N(A)N(A) — inputs crushed to zero

WHY it's a subspace: if Ax=0Ax=0 and Ay=0Ay=0 then A(cx+dy)=cAx+dAy=0A(cx+dy)=cAx+dAy=0. Closed. WHAT it means: these are the inputs the machine completely destroys.

(c) Row space C(AT)C(A^T) — and (d) Left null space N(AT)N(A^T)

The other two are just the column space and null space of the transpose: C(AT)Rn(span of the rows),N(AT)Rm({y:ATy=0}).C(A^T) \subseteq \mathbb{R}^n \quad(\text{span of the rows}),\qquad N(A^T)\subseteq \mathbb{R}^m \quad(\{y: A^Ty=0\}).

Figure — Subspaces — four fundamental subspaces of a matrix

3. Dimensions: the rank theorem (derive it)

Let r=rank(A)=r = \text{rank}(A) = number of pivots after row reduction.

Derivation. Row reduce AA to RREF.

  • Pivot columns are linearly independent and span C(A)C(A) dimC(A)=r\Rightarrow \dim C(A) = r.
  • Row operations don't change the row space, and the rr nonzero rows of RREF are independent dimC(AT)=r\Rightarrow \dim C(A^T) = r. So row rank = column rank. This is why "rank" is one number.
  • Free variables = nrn - r. Each free variable gives one independent special solution to Ax=0Ax=0 dimN(A)=nr\Rightarrow \dim N(A) = n - r.
  • By the same argument on ATA^T (size n×mn\times m, also rank rr): dimN(AT)=mr\dim N(A^T) = m - r.

4. Orthogonality: the deep pairing

Derivation of N(A)C(AT)N(A)\perp C(A^T). If xN(A)x\in N(A) then Ax=0Ax=0. Row ii of AA is rir_i, and (Ax)i=rix=0(Ax)_i = r_i\cdot x = 0. So xx is orthogonal to every row, hence to their whole span C(AT)C(A^T). Since dimN(A)+dimC(AT)=n\dim N(A)+\dim C(A^T)=n and they only share 0\mathbf 0, together they fill Rn\mathbb{R}^n. ∎


5. Worked examples


6. Forecast-then-Verify drill

Before reducing, predict the four dimensions, then check. AA is 4×64\times 6 with rank 33. Forecast: dimC(A)=3\dim C(A)=3, dimC(AT)=3\dim C(A^T)=3, dimN(A)=63=3\dim N(A)=6-3=3, dimN(AT)=43=1\dim N(A^T)=4-3=1. Sums: 3+3=6=n3+3=6=n ✓, 3+1=4=m3+1=4=m ✓. If your forecast doesn't sum correctly, your rank guess is wrong.


Recall Feynman: explain to a 12-year-old

Imagine a fancy juice mixer (the matrix). You pour in fruits (input vectors).

  • Some fruit combos give nothing — the mixer cancels them out. That collection of "wasted" recipes is the null space.
  • All the different juices you can possibly make is the column space.
  • The mixer can only make so many distinct juices — that count is the rank.
  • And there are some juices you can never make no matter what — that "impossible juice" zone is the left null space. Two of these talk about your recipes (inputs), two about your juices (outputs), and recipe-leftovers are always at perfect right angles to the recipes that matter.

Connections

  • Rank of a Matrix — the single number rr controlling all four dimensions.
  • Rank–Nullity TheoremdimC(AT)+dimN(A)=n\dim C(A^T)+\dim N(A)=n.
  • Orthogonal Complements — why the pairs are perpendicular.
  • Solving Ax=b — solvability (bC(A)b\in C(A)) and general solution (particular +N(A)+ N(A)).
  • RREF and Pivots — the computational engine.
  • Least Squares & Projections — uses C(A)C(A) and N(AT)N(A^T) directly.

Flashcards

What are the four fundamental subspaces of an m×nm\times n matrix AA?
Column space C(A)C(A), Row space C(AT)C(A^T), Null space N(A)N(A), Left null space N(AT)N(A^T).
Which subspaces live in the input space Rn\mathbb{R}^n?
Row space C(AT)C(A^T) and Null space N(A)N(A).
Which subspaces live in the output space Rm\mathbb{R}^m?
Column space C(A)C(A) and Left null space N(AT)N(A^T).
dimC(A)=?\dim C(A)=?
rr (the rank).
dimN(A)=?\dim N(A)=?
nrn-r.
dimN(AT)=?\dim N(A^T)=?
mrm-r.
Why is row rank = column rank?
RREF leaves rr independent nonzero rows and rr pivot columns; both equal the pivot count rr.
Ax=bAx=b is solvable iff?
bC(A)b\in C(A) (the column space).
Which two subspaces are orthogonal in Rn\mathbb{R}^n?
N(A)C(AT)N(A)\perp C(A^T), and they sum to Rn\mathbb{R}^n.
Why is N(A)C(AT)N(A)\perp C(A^T)?
Ax=0Ax=0 means each row dotted with xx is 0, so xx\perp every row, hence \perp row space.
A matrix has trivial null space iff?
Its columns are linearly independent (r=nr=n).
A 4×64\times 6 matrix of rank 3: dim of left null space?
mr=43=1m-r=4-3=1.

Concept Map

maps

maps to

columns span

solutions of Ax=0

rows span

transpose null

lives in

lives in

lives in

lives in

orthogonal to

orthogonal to

dim = rank r

dim = rank r

Matrix A m x n

Input space Rn

Output space Rm

Column space C of A

Null space N of A

Row space C of A transpose

Left null space N of A transpose

Rank r

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Socho ek matrix AA ek machine hai jo Rn\mathbb{R}^n se vector leke Rm\mathbb{R}^m mein vector deti hai. Is machine ke andar chhupe hue char khaas "subspaces" hote hain. Do input wali duniya Rn\mathbb{R}^n mein rehte hain — Row space C(AT)C(A^T) aur Null space N(A)N(A). Do output wali duniya Rm\mathbb{R}^m mein rehte hain — Column space C(A)C(A) aur Left null space N(AT)N(A^T).

Null space matlab woh saare input xx jinko machine bilkul zero bana deti hai (Ax=0Ax=0). Column space matlab woh saare output jo banana possible hai (saare columns ka span). Isliye Ax=bAx=b tabhi solve hoga jab bb column space mein ho. Rank rr ek hi number hai jo sab kuch control karta hai: dimC(A)=r\dim C(A)=r, dimC(AT)=r\dim C(A^T)=r, dimN(A)=nr\dim N(A)=n-r, dimN(AT)=mr\dim N(A^T)=m-r. Yaad rakho — null space input space mein hota hai, isliye nn se count karo, mm se nahi.

Sabse khoobsurat baat: input space mein Row space aur Null space ek dusre ke perpendicular (\perp) hote hain, aur milke poora Rn\mathbb{R}^n ban jaate hain. Iska reason simple hai — agar Ax=0Ax=0 hai to har row ka xx ke saath dot product zero hai, matlab xx har row ke perpendicular hai. Yahi cheez least squares, projections aur solvability sab mein kaam aati hai. Exam tip: pehle rank guess karo, phir char dimensions predict karo, aur check karo ki r+(nr)=nr+(n-r)=n aur r+(mr)=mr+(m-r)=m sahi aa rahe hain.

Go deeper — visual, from zero

Test yourself — Linear Algebra (Full)

Connections