1.1.10Linear Algebra Essentials

Rank, column space, null space

1,653 words8 min readdifficulty · medium6 backlinks

WHAT are these objects?

WHY this equals a span: Ax=x1a1+x2a2++xnanAx = x_1a_1 + x_2a_2 + \dots + x_na_n. So any output is just a linear combination of the columns. Choosing xx = choosing weights. Hence the reachable outputs are exactly the span of the columns.


HOW to compute them (derivation via elimination)

Procedure:

  1. Row-reduce AA to RREF RR. Pivot columns = positions of leading 1's.
  2. rank=\text{rank} = number of pivots.
  3. Col(A)=\text{Col}(A) = span of the pivot columns of the original AA (not of RR!).
  4. Null(A)\text{Null}(A): assign each free variable a parameter, back-substitute to get special solutions; they form a basis.

The Rank–Nullity Theorem (derived, not memorized)

Derivation from scratch. Row-reduce AA (with nn columns). Every column is either a pivot column or a free column.

  • Number of pivot columns =rank(A)= \text{rank}(A).
  • Each free column gives exactly one free variable, and each free variable produces exactly one special solution — a basis vector of Null(A)\text{Null}(A). These special solutions are independent (each has a lone 11 in its own free slot).
  • So dim(Null(A))=\dim(\text{Null}(A)) = number of free columns.

Since every column is pivot or free, exactly once: (#pivots)rank+(#free)dimNull=ntotal columns.\underbrace{(\#\text{pivots})}_{\text{rank}} + \underbrace{(\#\text{free})}_{\dim\text{Null}} = \underbrace{n}_{\text{total columns}}. \qquad\blacksquare

Figure — Rank, column space, null space

Worked examples


Forecast-then-Verify


Flashcards

What is the column space of AA?
The span of AA's columns; equivalently all bb for which Ax=bAx=b is solvable. Lives in Rm\mathbb{R}^m.
What is the null space of AA?
All xx with Ax=0Ax=0; the inputs mapped to zero. Lives in Rn\mathbb{R}^n.
Define rank three equivalent ways.
(1) dimCol(A)\dim\text{Col}(A), (2) number of independent columns, (3) number of pivots (= number of independent rows).
State the rank–nullity theorem.
rank(A)+dimNull(A)=n\text{rank}(A) + \dim\text{Null}(A) = n (number of columns).
Why does rank–nullity hold?
Each column is either a pivot (→rank) or free (→one null-space basis vector); they partition all nn columns.
To find a basis for Col(A), which columns do you take?
The pivot columns of the ORIGINAL AA, not of the RREF.
Why doesn't Col(R) equal Col(A)?
Row operations change columns entrywise; they preserve dependence relations but not the column space itself.
A matrix is m×nm\times n with n>mn>m. What can you say about its null space?
rank m<n\le m < n, so nullity nm>0\ge n-m>0: it always has a nonzero null space.
Do row operations change the null space?
No: EAx=0    Ax=0EAx=0 \iff Ax=0 for invertible EE.
When is Ax=bAx=b solvable?
Exactly when bCol(A)b\in\text{Col}(A).
When is a square n×nn\times n matrix invertible in terms of rank/null space?
Full rank nn and Null(A)={0}\text{Null}(A)=\{0\}.
ML: what does a nontrivial null space of the design matrix XX imply?
Multicollinearity → non-unique least-squares weights (directions ww with Xw=0Xw=0).

Recall Feynman: explain to a 12-year-old

Imagine a photocopier that can only make copies using two ink colors mixed together. The column space is every color it can possibly print — its whole palette. The rank is how many truly different inks it has (if red and pink are basically the same, that's really one ink, not two). The null space is the secret recipe of ink amounts that prints a totally blank page — you mixed positive of one and negative of another so they cancel. If the machine has fewer real inks than knobs, there are always blank-page recipes: many different knob settings give the same picture.


Connections

  • Linear independence and span — rank is the size of a maximal independent set.
  • Solving linear systems (Ax=b) — solvability ⇔ bCol(A)b\in\text{Col}(A); uniqueness ⇔ Null(A)={0}\text{Null}(A)=\{0\}.
  • Gaussian elimination and RREF — the engine that reveals pivots.
  • Four fundamental subspaces — Col, Null, Row space, Left null space and their dimensions.
  • Least squares and normal equations — full column rank makes XTXX^TX invertible.
  • Invertible matrices and determinants — full rank ⇔ invertible ⇔ nonzero determinant.
  • SVD and low-rank approximation — rank counts nonzero singular values.

Concept Map

maps x to Ax

columns span

reachable set

solvability of Ax=b

inputs crushed to zero

blind spot directions

dimension is

equals pivots

row reduce to

reveals

free variables give

basis of

rank + nullity = n

dim contributes to

Matrix A as transform

Outputs Ax

Column space

Ax=b has solution

Null space

Forgotten inputs

Rank

Pivot columns

RREF R

Special solutions

Rank-Nullity

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Socho ek matrix AA ek machine hai jo input vector xx ko AxAx me convert karti hai. Do sabse important sawaal: machine kya-kya output bana sakti hai (yeh hai column space — saare columns ka span), aur kaunse input ko zero bana deti hai (yeh hai null space). Rank batata hai ki machine ke paas asli me kitni alag-alag independent directions hain — agar do columns basically same hain (ek doosre ke multiple), to woh rank me count nahi hote.

Nikalna simple hai: matrix ko RREF tak row-reduce karo. Jitne pivots milenge, utna hi rank. Column space ke liye — pivot wale columns dekho, par original AA ke columns lena, RREF ke nahi (yeh sabse common galti hai). Null space ke liye — free variables ko parameter do aur back-substitute karke special solutions nikaalo.

Sabse pyaari cheez hai Rank–Nullity theorem: rank+nullity=n\text{rank} + \text{nullity} = n (number of columns). Reason bilkul seedha — har column ya to pivot hai ya free; pivots rank dete hain, free columns null space ke basis vectors dete hain, aur inn dono ka total nn hi hoga.

ML me yeh kyun matter karta hai? Agar tumhare data matrix XX ka null space non-zero hai, matlab multicollinearity hai — kuch feature doosre features ka combination hain. Tab least-squares weights unique nahi rehte, kyunki Xw=0Xw=0 wale directions prediction ko change hi nahi karte. Isliye rank samajhna model ke stability ke liye zaroori hai.

Test yourself — Linear Algebra Essentials

Connections