Null Space & Column Space of a Matrix
2148 words
11 min read
Visual companion
Python
Type and operator map
Python Week 1: the first filter for runtime behavior
View
Revision summary
What this note is really saying
Short form
# Null Space & Column Space of a Matrix ## ๐ฏ Learning Objectives After this topic you will be able to: - Find a basis for the null space of a matrix - Find a basis for the column space of a matrix - Relate nullity and rank to the geometry of $A\mathbf{x} = \mathbf{b}$ - Understand the relationship between the four...

Null Space & Column Space of a Matrix
๐ฏ Learning Objectives
After this topic you will be able to:
- Find a basis for the null space of a matrix
- Find a basis for the column space of a matrix
- Relate nullity and rank to the geometry of Ax=b
- Understand the relationship between the four fundamental subspaces
- Determine whether a given vector is in the null space or column space
๐ Prerequisites
- Rank & Dimension (Week 4) โ rank, nullity, rank-nullity theorem
- Gaussian Elimination (Week 2) โ solving homogeneous systems
- Subspaces (Week 3) โ definition of subspaces
1. The Four Fundamental Subspaces
Every mรn matrix A defines four subspaces:
| Subspace | Notation | Definition | Lives in |
|---|---|---|---|
| Null space | N(A) | {xโRnโฃAx=0} | Rn |
| Column space | C(A) | {AxโRmโฃxโRn} | Rm |
| Row space | R(A) | Span of rows of A | Rn |
| Left null space | N(AT) | {yโRmโฃATy=0} | Rm |
(Diagram)
2. Null Space (Kernel)
2.1 Definition and Geometry
>N(A)={xโRnโฃAx=0}>Definition (Null Space). The null space of an mรn matrix A is:
The null space contains all vectors that A annihilates (maps to zero). It is always a subspace of Rn.
Geometric intuition: If A projects R3 onto the xy-plane, the z-axis becomes the null space โ every vector (0,0,z) maps to (0,0,0).
2.2 Finding a Basis for the Null Space
Algorithm:
- Row reduce A to RREF
- Identify pivot columns (basic variables) and non-pivot columns (free variables)
- Express basic variables in terms of free variables
- Write the solution as a linear combination of basis vectors, one per free variable
>A=โ100โ200โ010โ120โโ110โโ>Example 1: Null space basis
>x1โ+2x2โ+x4โโx5โ=0โx1โ=โ2x2โโx4โ+x5โ>(already in RREF)Step 1: Identify pivots. Pivot columns: 1, 3. Free variables: x2โ,x4โ,x5โ.Step 2: Write equations:
>x3โ+2x4โ+x5โ=0โx3โ=โ2x4โโx5โ>
>โx1โx2โx3โx4โx5โโโ=x2โโโ21000โโ+x4โโโ10โ210โโ+x5โโ10โ101โโ>Step 3: Parametric form:
Basis for N(A): {(โ2,1,0,0,0),(โ1,0,โ2,1,0),(1,0,โ1,0,1)}.nullity(A)=3.
2.3 Checking Membership
To check if xโN(A): compute Ax. If Ax=0, then x is in the null space.
>Ax=โ1(2)+2(โ1)+0+0+00+0+0+0+00โโ=โ000โโ>Example 2: Membership testIs (2,โ1,0,0,0) in N(A) from Example 1?
โYes, it's in N(A). Indeed, it's โ21โ times the first basis vector.
3. Column Space (Range)
3.1 Definition
>C(A)={yโRmโฃy=Axย forย someย xโRn}>Definition (Column Space). The column space of A is:
Equivalently, C(A)=span{columnsย ofย A}. The column space captures all possible outputs of A.
3.2 Finding a Basis for the Column Space
Algorithm:
- Row reduce A to RREF
- Identify pivot columns
- The original columns of A at the pivot positions form a basis for C(A)
>A=โ121โ242โ01โ1โ130โโ>Example 3: Column space basis
>R2โโ2R1โ,R3โโR1โโโ100โ200โ01โ1โ11โ1โโR3โ+R2โโโ100โ200โ010โ110โโ>Row reduce:
>โฉโจโงโโ121โโ,โ01โ1โโโญโฌโซโ>Pivot columns: 1 and 3.Basis for C(A):
.rank(A)=2.
3.3 Checking Membership
To check if bโC(A): solve Ax=b. If a solution exists, b is in the column space.
>โ121โ242โ01โ1โ130โ351โโ>Example 4: Column space membershipIs b=(3,5,1) in C(A) from Example 3?Solve Ax=b:
After row reduction, check consistency. If consistent, bโC(A).
4. Column Space vs. Row Space
| Aspect | Column Space C(A) | Row Space R(A) |
|---|---|---|
| Subspace of | Rm | Rn |
| Basis from | Pivot columns of original A | Non-zero rows of RREF |
| Dimension | rank(A) | rank(A) |
| Related to | Outputs of A | Linear relations among columns |
>โ100โ200โ010โ110โโ>Example 5: Row space basisUsing A from Example 3, RREF is
.Basis for R(A): {(1,2,0,1),(0,0,1,1)}.
5. The Fundamental Theorem of Linear Algebra
Theorem (Fundamental Theorem of Linear Algebra, Part I). For an mรn matrix A:
- N(A) and R(A) are orthogonal complements in Rn
- N(AT) and C(A) are orthogonal complements in Rm
- dim(N(A))+dim(R(A))=n
- dim(N(AT))+dim(C(A))=m Orthogonal complements means every vector in one subspace is orthogonal to every vector in the other, and together they span the whole space.
6. Edge Cases & Gotchas
| Situation | What Happens |
|---|---|
| **Zero matrix 0mรnโ ** | N(A)=Rn (whole domain), C(A)={0} |
| **Identity Inโ ** | N(A)={0} , C(A)=Rn |
| Square invertible | N(A)={0} , C(A)=Rn |
| One row | N(A) is (nโ1) -dimensional; C(A) is a line |
7. Common Pitfalls
โ Pitfall 1: Thinking N(A) and C(A) live in the same space
N(A)โRn (domain), C(A)โRm (codomain). For m๎ =n, they are different spaces entirely.
โ Pitfall 2: Using RREF columns for column space basis
The column space basis must use original columns from A, not the RREF columns. The RREF columns are linear combinations of original columns and may live in a different coordinate system.
โ Pitfall 3: Forgetting to check 0 for null space membership
0 is always in N(A). The question is whether there are non-zero vectors as well.
8. Formula Summary Table
| Concept | Basis | Dimension |
|---|---|---|
| **Null space N(A) ** | Parametric solution vectors of Ax=0 | nullity(A)=nโr |
| **Column space C(A) ** | Original pivot columns of A | rank(A)=r |
| **Row space R(A) ** | Non-zero rows of RREF | rank(A)=r |
| **Left null space N(AT) ** | Solve ATy=0 | mโr |
9. ๐ Practice Questions
>A=[12โ24โ]>Q1: Null space of a 2ร2 matrixFind a basis for N(A) where
>A=[12โ24โ]>.Solution: Solve Ax=0: x+2y=0, 2x+4y=0 โ x=โ2y, y free. N(A)=span{(โ2,1)}. Dimension = 1. Q2: Column space of a 2ร2 matrixFind a basis for C(A) where
>A=โ121โ012โโ103โโ>.Solution: Columns are (1,2) and (2,4). Column 2 = 2(column 1), so they are dependent. C(A)=span{(1,2)}. Dimension = 1. Q3: Three independent columnsFind a basis for C(A) where
>โ121โ012โโ103โโR2โโ2R1โ,R3โโR1โโโ100โ012โโ124โโR3โโ2R2โโโ100โ010โโ120โโ>.Solution: Row reduce:
>A=[12โ24โ]>Pivot columns: 1 and 2. Basis for C(A): columns 1 and 2 of original A: {(1,2,1),(0,1,2)}. Q4: Complete solution to Ax = bFind the complete solution to Ax=b where
>b=[36โ]>,
>x=[30โ]+t[โ21โ]>.Solution: Particular solution: Solve x+2y=3. Set y=0, then x=3. xpโ=(3,0).Homogeneous solution: N(A)=span{(โ2,1)}.Complete solution:
>A=โ101โ011โโ>, tโR. Q5: Column space membership testIs b=(1,2,3) in C(A) for
>โฉโจโงโx=1y=2x+y=3โโ1+2=3ย โ>?Solution: Solve Ax=b:
>A=โ100โ110โ110โโ>Yes, bโC(A) with x=(1,2). Q6: Null space of a 3ร3 singular matrixFind N(A) for
>A=[12โ24โ]>.Solution: Solve Ax=0: x+y+z=0, y+z=0 โ y=โz, x=โyโz=zโz=0. So x=0, y=โz, z free.N(A)=span{(0,โ1,1)}. Nullity = 1. Q7: Finding left null spaceFind a basis for N(AT) where
>AT=[12โ24โ]>.Solution:
(same here). Solve ATy=0: y1โ+2y2โ=0, 2y1โ+4y2โ=0 โ y1โ=โ2y2โ, y2โ free.N(AT)=span{(โ2,1)}. Dimension = mโr=2โ1=1. Q8: Rank from nullityIf A is 7ร5 with nullity 3, what is the rank?Solution: rank(A)=5โ3=2. Q9: When does N(A) = {0}?For what type of matrix does N(A)={0}?Solution: When A has full column rank, i.e., rank(A)=n (number of columns). Then nullity = nโn=0. Q10: Four subspaces dimensionsFor A4ร6โ with rank 2, give dimensions of all four fundamental subspaces.Solution:
- dim(N(A))=6โ2=4
- dim(C(A))=2
- dim(R(A))=2
- dim(N(AT))=4โ2=2
๐ Cross-References
- Next topic: Rank-Nullity Theorem (review)
- Next: Linear Transformations Introduction
- Week 6 (Kernel & Image): Generalises null space and column space
- BSMA1001 (Maths 1): Solving systems of equations
- BSCS2004 (ML Foundations): Underdetermined and overdetermined systems Join Discord Previous4.2 Rank & DimensionNext5.2 Linear Transformations