Skip to main content

The Four Fundamental Subspaces


The Problem of Solving Linear Equations

We want to solve a system of mm linear equations in nn unknowns, written as Ax=bAx=b. In the "row picture," each of these mm equations defines a hyperplane in nn-dimensional space. The goal is to find a solution xx, which is a single point of intersection that lies on all mm of these hyperplanes.

This geometric view presents three possibilities:

  1. One Solution: The hyperplanes intersect at a single point.
  2. No Solution: The hyperplanes have no common intersection point (e.g., two planes are parallel).
  3. Infinite Solutions: The hyperplanes intersect on a larger set, such as a line or a plane (e.g., three planes intersect on a common line).

The homogeneous case Ax=0Ax=0 is a related problem where b=0b=0. Since all hyperplanes must pass through the origin, x=0x=0 (the "trivial solution") is always one answer. The fundamental question becomes: Do the hyperplanes intersect only at the origin, or do they also intersect along a larger set (like a line or plane) that passes through the origin?


Basis, Dimension, and Rank

Basis

You can represent every vector in R2R^2 with combinations of the two vectors {[10],[01]}\left\{ \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix} \right\} (orthonormal basis). It's also possible with {[11],[11]}\left\{ \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ -1 \end{bmatrix} \right\} (orthogonal basis) or even {[10],[11]}\left\{ \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 1 \\ 1 \end{bmatrix} \right\} (non-orthogonal basis).

Three Types of Bases for R²

Figure: Three types of bases for R2\mathbb{R}^2. Left: Orthonormal basis. Middle: Orthogonal basis. Right: Non-orthogonal basis (not perpendicular, but still linearly independent and spans all of R2\mathbb{R}^2).

The same vector v\mathbf{v} (shown in green) has different coordinate representations in each basis.

  • In the orthonormal basis (perpendicular and unit length), v=1.4e1+0.9e2\mathbf{v} = 1.4\mathbf{e}_1 + 0.9\mathbf{e}_2.
  • In the orthogonal basis (perpendicular but not unit length), v=1.15v1+0.25v2\mathbf{v} = 1.15\mathbf{v}_1 + 0.25\mathbf{v}_2.
  • In the non-orthogonal basis, v=0.5u1+0.9u2\mathbf{v} = 0.5\mathbf{u}_1 + 0.9\mathbf{u}_2.

The dashed lines show how v\mathbf{v} is decomposed along each basis. Despite the different coefficients, all three representations describe the exact same point (1.4,0.9)(1.4, 0.9) in R2\mathbb{R}^2.

However, you cannot represent every vector in R2\mathbb{R}^2 with combinations of two linearly dependent vectors like {[11],[22]}\left\{ \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 2 \\ 2 \end{bmatrix} \right\}. Since the second vector is just 22 times the first, they point in the same direction and only span a one-dimensional line (the blue shaded region in the diagram below), not the entire two-dimensional plane.

Linearly Dependent Vectors

Figure: Linearly dependent vectors cannot span all of R2\mathbb{R}^2. Vectors on the line y=xy = x (green ✓) can be represented, but vectors off the line (red ✗) cannot.

From these examples, we observe a fundamental pattern: any set of linearly independent vectors can span a vector space and serve as a coordinate system to represent every vector in that space. In contrast, linearly dependent vectors (or a single vector alone) cannot span the entire space. This observation leads us to the formal definition of a basis—the minimal set of "building blocks" or "coordinate axes" for a vector space. A basis has just enough vectors: not too few (or it couldn't span the whole space) and not too many (or the vectors would be dependent, making some redundant).

Definition: Basis

A basis for a vector space VV is a set of vectors {v1,,vk}\{v_1, \dots, v_k\} that satisfies both of the following properties:

  1. Linearly Independent: The only solution to c1v1++ckvk=0c_1v_1 + \dots + c_kv_k = 0 is when all coefficients ci=0c_i = 0. This means there is no redundancy—no vector in the set can be written as a combination of the others.

  2. Spans the Space: Every vector vVv \in V can be expressed as a linear combination v=c1v1++ckvkv = c_1v_1 + \dots + c_kv_k for some scalars c1,,ckc_1, \dots, c_k.

Dimension

From the examples above, we see that any vector in R2\mathbb{R}^2 can be represented by a linear combination of exactly two basis vectors, while any vector in R3\mathbb{R}^3 requires exactly three basis vectors. This number of vectors in a basis is the dimension of the space—it measures the "degrees of freedom" or the number of independent directions in that space. All bases for the same vector space contain the same number of vectors.

Theorem: The Basis Theorem

Let VV be a vector space with a finite basis. Then every basis for VV contains exactly the same number of vectors.

Definition: Dimension

The dimension of a vector space VV, denoted dim(V)\dim(V), is the number of vectors in any basis for VV.

Examples:

  • A line has dimension 1.
  • A plane has dimension 2.
  • Rn\mathbb{R}^n has dimension nn.
  • If the nullspace of A=[1122]A = \begin{bmatrix} 1 & 1 \\ 2 & 2 \end{bmatrix} is the line spanned by [11]\begin{bmatrix} 1 \\ -1 \end{bmatrix}, then dim(N(A))=1\dim(N(A)) = 1.

Rank

Consider the matrix A=[1224]A = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}. The second column is twice the first column, making them linearly dependent. Both columns lie on the same line in R2\mathbb{R}^2. All vectors that can be created by combining these columns span only a one-dimensional line, not the full two-dimensional plane. The number of linearly independent columns (or equivalently, the dimension of the space they span) is 1. This number is called the rank of the matrix.

The rank measures how many independent columns a matrix has. This always equals the number of independent rows.

Definition: Rank

The rank of a matrix AA, denoted rank(A)\text{rank}(A) or rr, is the dimension of its column space: rank(A)=dim(C(A))\text{rank}(A) = \dim(C(A)).

Theorem: The Rank Theorem

The dimension of the column space equals the dimension of the row space. dim(C(A))=dim(C(AT))=r\dim(C(A)) = \dim(C(A^T)) = r Consequently, the number of pivot positions in AA is equal to the rank of AA.

How to Find Rank: The rank rr equals the number of pivots found by Gaussian elimination in the echelon form UU or reduced row echelon form RR.

Example: A=[123246]eliminationU=[123000]A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \end{bmatrix} \xrightarrow{\text{elimination}} U = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 0 \end{bmatrix}

This matrix has only one pivot (the 1 in position (1,1)), so rank(A)=1\text{rank}(A) = 1.

Dimension vs Rank

Dimension and rank are related but describe different objects:

FeatureDimensionRank
What it describesA vector space or subspaceA matrix
What it measuresThe number of vectors in any basis for the spaceThe number of independent columns (or rows) in the matrix
How to find itFind a basis for the space and count the vectorsCount the pivots in the echelon form
ExampleR3\mathbb{R}^3 has dimension 3
A plane in R3\mathbb{R}^3 has dimension 2
A line has dimension 1
A 3×53 \times 5 matrix with 2 pivots has rank 2
A 100×100100 \times 100 matrix where all columns are multiples of one vector has rank 1

The Four Fundamental Subspaces

To answer the questions we stated at first, let's consider the m×nm \times n matrix AA below. For our examples, we will use this 3×33 \times 3 matrix AA with rank r=2r=2:

A=[112235347]EliminationU=[112011000]Reduced FormR=[101011000]A = \begin{bmatrix} 1 & 1 & 2 \\ 2 & 3 & 5 \\ 3 & 4 & 7 \end{bmatrix} \xrightarrow{\text{Elimination}} U = \begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} \xrightarrow{\text{Reduced Form}} R = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}

The Column Space C(A)C(A)

Consider the columns of our matrix AA: c1=[123]c_1 = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, c2=[134]c_2 = \begin{bmatrix} 1 \\ 3 \\ 4 \end{bmatrix}, and c3=[257]c_3 = \begin{bmatrix} 2 \\ 5 \\ 7 \end{bmatrix}. Notice that c1+c2=c3c_1 + c_2 = c_3, so the third column is linearly dependent on the first two. All linear combinations of these three columns produce the same set of vectors as combinations of just c1c_1 and c2c_2. This set forms a 2-dimensional plane in R3\mathbb{R}^3, not the full 3-dimensional space.

This set of all linear combinations of the columns is called the column space C(A)C(A). It answers a fundamental question: which vectors bb can we reach by solving Ax=bAx = b? When we write Ax=bAx = b with x=[x1x2x3]x = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix}, we are asking whether we can find coefficients x1,x2,x3x_1, x_2, x_3 such that x1c1+x2c2+x3c3=bx_1 c_1 + x_2 c_2 + x_3 c_3 = b. This is precisely asking whether bb can be written as a linear combination of the columns. Therefore, Ax=bAx = b has a solution if and only if bC(A)b \in C(A).

Definition: Column Space

The column space C(A)C(A) of an m×nm \times n matrix AA is the set of all linear combinations of the columns of AA. Equivalently, C(A)={Ax:xRn}C(A) = \{Ax : x \in \mathbb{R}^n\}.

It is a subspace of Rm\mathbb{R}^m.

Key Properties:

PropertyDescriptionOur Example
SolvabilitybC(A)    Ax=bb \in C(A) \iff Ax = b has a solutionbb must be in the plane spanned by columns 1 and 2
Dimensiondim(C(A))=rank(A)=r\dim(C(A)) = \text{rank}(A) = rdim(C(A))=2\dim(C(A)) = 2
BasisThe rr pivot columns from AA{[123],[134]}\left\{ \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, \begin{bmatrix} 1 \\ 3 \\ 4 \end{bmatrix} \right\}

Finding the Basis: Identifying Pivot Columns

To find a basis for C(A)C(A), perform Gaussian elimination to identify the pivot columns:

A=[112235347]eliminationU=[112011000]A = \begin{bmatrix} 1 & 1 & 2 \\ 2 & 3 & 5 \\ 3 & 4 & 7 \end{bmatrix} \xrightarrow{\text{elimination}} U = \begin{bmatrix} \boxed{1} & 1 & 2 \\ 0 & \boxed{1} & 1 \\ 0 & 0 & 0 \end{bmatrix}

The pivots (boxed) are in columns 1 and 2. The basis for C(A)C(A) consists of the corresponding columns from the original matrix AA (not from UU):

C(A)=span{[123],[134]}C(A) = \text{span}\left\{ \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, \begin{bmatrix} 1 \\ 3 \\ 4 \end{bmatrix} \right\}

Important: Always use the original columns, not the columns from the echelon form. Elimination changes the column space but preserves which columns are independent.

The Nullspace N(A)N(A)

Recall that our matrix AA has the dependency c1+c2=c3c_1 + c_2 = c_3. We can rewrite this as c1+c2c3=0c_1 + c_2 - c_3 = 0, or equivalently: A[111]=1c1+1c2+(1)c3=[000]A \begin{bmatrix} 1 \\ 1 \\ -1 \end{bmatrix} = 1 \cdot c_1 + 1 \cdot c_2 + (-1) \cdot c_3 = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}

The vector [111]\begin{bmatrix} 1 \\ 1 \\ -1 \end{bmatrix} is a "recipe" that combines the columns to produce zero. This recipe encodes the dependency relationship among the columns. The set of all such recipes is called the nullspace N(A)N(A).

In contrast, consider the identity matrix B=[1001]B = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} with linearly independent columns. To find vectors xx such that Bx=0Bx = 0: x1[10]+x2[01]=[00]x_1 \begin{bmatrix} 1 \\ 0 \end{bmatrix} + x_2 \begin{bmatrix} 0 \\ 1 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} The only solution is x1=0x_1 = 0 and x2=0x_2 = 0, giving x=[00]x = \begin{bmatrix} 0 \\ 0 \end{bmatrix}. The nullspace contains only the zero vector, N(B)={0}N(B) = \{0\}, confirming the columns are independent.

The nullspace reveals the redundancy in a matrix. If N(A)={0}N(A) = \{0\} (only the zero vector), the columns are independent. If N(A)N(A) contains non-zero vectors, the columns are dependent. The nullspace also determines solution uniqueness: if xpx_p solves Ax=bAx = b, then the complete solution set is xp+xnx_p + x_n for all xnN(A)x_n \in N(A).

Definition: Nullspace

The nullspace N(A)N(A) of an m×nm \times n matrix AA is the set of all solutions to the homogeneous equation Ax=0Ax = 0. That is, N(A)={xRn:Ax=0}N(A) = \{x \in \mathbb{R}^n : Ax = 0\}.

It is a subspace of Rn\mathbb{R}^n.

Theorem: Rank-Nullity Theorem

The rank of a matrix AA plus the dimension of its nullspace equals the number of columns of AA: rank(A)+dim(N(A))=n\text{rank}(A) + \dim(N(A)) = n

Key Properties:

PropertyDescriptionOur Example
Dimensiondim(N(A))=nr\dim(N(A)) = n - r (number of free variables)dim(N(A))=32=1\dim(N(A)) = 3 - 2 = 1
BasisSpecial solutions (set each free variable to 1){[111]}\left\{\begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix}\right\} (a line in R3\mathbb{R}^3)
How to findFrom R=[101011000]R = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}: set x3=1    x1=1,x2=1x_3 = 1 \implies x_1 = -1, x_2 = -1x1+x3=0x_1 + x_3 = 0 and x2+x3=0x_2 + x_3 = 0

Finding the Basis: Solving Ax=0Ax = 0 from Reduced Form

To find a basis for N(A)N(A), reduce the matrix to reduced row echelon form (RREF) and solve Rx=0Rx = 0:

R=[101011000]R = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}

Identify pivot and free variables:

  • Pivot columns: 1, 2 (containing pivots)
  • Free column: 3 (no pivot)
  • Therefore: x1,x2x_1, x_2 are pivot variables, x3x_3 is a free variable

From the RREF, read off the system:

{x1+x3=0x2+x3=0    {x1=x3x2=x3\begin{cases} x_1 + x_3 = 0 \\ x_2 + x_3 = 0 \end{cases} \implies \begin{cases} x_1 = -x_3 \\ x_2 = -x_3 \end{cases}

Find special solutions: Set each free variable to 1 (one at a time if there are multiple):

For x3=1x_3 = 1: we get x1=1,x2=1x_1 = -1, x_2 = -1

x=[111]x = \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix}

Therefore: N(A)=span{[111]}N(A) = \text{span}\left\{ \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \right\}

Additional Examples:

For the identity matrix A=[1001]A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, the only solution to Ax=0Ax = 0 is x=0x = 0. Therefore N(A)={0}N(A) = \{0\} and the columns are independent.

For A=[1236]A = \begin{bmatrix} 1 & 2 \\ 3 & 6 \end{bmatrix}, the second column is twice the first. The vector x=[21]x = \begin{bmatrix} -2 \\ 1 \end{bmatrix} satisfies Ax=0Ax = 0 because 2[13]+1[26]=[00]-2 \begin{bmatrix} 1 \\ 3 \end{bmatrix} + 1 \begin{bmatrix} 2 \\ 6 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix}. This recipe [21]\begin{bmatrix} -2 \\ 1 \end{bmatrix} explicitly shows the dependency: Column 2 = 2 × Column 1.

The Row Space C(AT)C(A^T)

The rows of our matrix AA are r1=[112]r_1 = \begin{bmatrix} 1 & 1 & 2 \end{bmatrix}, r2=[235]r_2 = \begin{bmatrix} 2 & 3 & 5 \end{bmatrix}, and r3=[347]r_3 = \begin{bmatrix} 3 & 4 & 7 \end{bmatrix}. Notice that r3=r1+r2r_3 = r_1 + r_2, making the third row dependent. All linear combinations of these three rows form the same set as combinations of just the first two. After Gaussian elimination, R=[101011000]R = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} has two non-zero rows that span this same space. The row space is a 2-dimensional plane in R3\mathbb{R}^3.

The set of all linear combinations of the rows is called the row space, denoted C(AT)C(A^T) (since rows of AA are columns of ATA^T).

Definition: Row Space

The row space C(AT)C(A^T) of an m×nm \times n matrix AA is the set of all linear combinations of the rows of AA. Equivalently, it is the column space of ATA^T.

It is a subspace of Rn\mathbb{R}^n.

Key Properties:

PropertyDescriptionOur Example
Dimensiondim(C(AT))=rank(A)=r\dim(C(A^T)) = \text{rank}(A) = r (row rank = column rank)dim(C(AT))=2\dim(C(A^T)) = 2
BasisThe rr non-zero rows from echelon form RR (or UU){[101],[011]}\left\{ \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} \right\}
ImportantGaussian elimination preserves the row spaceC(AT)=C(RT)=C(UT)C(A^T) = C(R^T) = C(U^T)

Finding the Basis: Non-zero Rows from Echelon Form

To find a basis for C(AT)C(A^T), perform Gaussian elimination and take the non-zero rows from the echelon form:

A=[112235347]eliminationR=[101011000]A = \begin{bmatrix} 1 & 1 & 2 \\ 2 & 3 & 5 \\ 3 & 4 & 7 \end{bmatrix} \xrightarrow{\text{elimination}} R = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}

The non-zero rows of RR form a basis for C(AT)C(A^T):

C(AT)=span{[101],[011]}C(A^T) = \text{span}\left\{ \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} \right\}

Why this works: Row operations create linear combinations of the original rows. The non-zero rows of RR are still combinations of the original rows, and they span the same space as the original rows. Moreover, they're linearly independent (by construction of RREF), giving us a basis.

Key difference from column space: For row space, we use rows from the echelon form. For column space, we use columns from the original matrix. This is because elimination preserves row space but changes column space.

Orthogonal Complement with Nullspace:

The row space C(AT)C(A^T) and the nullspace N(A)N(A) are orthogonal complements in Rn\mathbb{R}^n. Consider any row rr of AA and any nullspace vector xnx_n. Since Axn=0Ax_n = 0, each row dotted with xnx_n gives zero: rxn=0r \cdot x_n = 0. Since row space vectors are linear combinations of rows, every vector in C(AT)C(A^T) is perpendicular to every vector in N(A)N(A).

This means:

  • Together they span all of Rn\mathbb{R}^n: any xRnx \in \mathbb{R}^n uniquely decomposes as x=xr+xnx = x_r + x_n where xrC(AT)x_r \in C(A^T) and xnN(A)x_n \in N(A)
  • Their dimensions add up to nn: dim(C(AT))+dim(N(A))=r+(nr)=n\dim(C(A^T)) + \dim(N(A)) = r + (n-r) = n

For our matrix:

  • Row space basis: {[101],[011]}\left\{ \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} \right\}
  • Nullspace basis: {[111]}\left\{ \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \right\}

Verification: [101][111]=1+0+1=0,[011][111]=01+1=0\begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} = -1 + 0 + 1 = 0, \quad \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} = 0 - 1 + 1 = 0

Application: Row Space Component of Solutions

When solving Ax=bAx = b, the complete solution is x=xp+xnx = x_p + x_n where xpx_p is a particular solution and xnN(A)x_n \in N(A).

Among all particular solutions, there is a unique one lying in the row space C(AT)C(A^T), perpendicular to N(A)N(A). The matrix AA only "sees" this row space part: A(xr+xn)=Axr+0=AxrA(x_r + x_n) = Ax_r + 0 = Ax_r.

Example: For b=[123]b = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, one particular solution is xp=[100]x_p = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}. To find the row space component, solve:

([100]+t[111])[111]=0    t=13\left(\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} + t\begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix}\right) \cdot \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} = 0 \implies t = \frac{1}{3}

Therefore: xr=[2/31/31/3]x_r = \begin{bmatrix} 2/3 \\ -1/3 \\ 1/3 \end{bmatrix} is the unique row space solution.

💡 Question: Among infinitely many particular solutions to Ax=bAx = b, why is there exactly one in the row space?

Answer: This follows from the orthogonal complement structure. Since C(AT)C(A^T) and N(A)N(A) are orthogonal complements in Rn\mathbb{R}^n, any vector xRnx \in \mathbb{R}^n has a unique decomposition as x=xr+xnx = x_r + x_n where xrC(AT)x_r \in C(A^T) and xnN(A)x_n \in N(A).

For any particular solution xpx_p, we can write it as xp=xr+xnx_p = x_r + x_n. The row space component xrx_r is the same for all particular solutions (since they differ only by nullspace vectors). Therefore, there is exactly one particular solution that lies entirely in the row space: the one with zero nullspace component.

The solution set forms a line (or higher-dimensional affine space) parallel to N(A)N(A). This line intersects the row space C(AT)C(A^T) at exactly one point, since C(AT)N(A)C(A^T) \perp N(A).

The Left Nullspace N(AT)N(A^T)

During Gaussian elimination on our matrix AA, we discovered that row 3 equals row 1 plus row 2. This means: (1)r1+(1)r2+(1)r3=[000](-1) \cdot r_1 + (-1) \cdot r_2 + (1) \cdot r_3 = \begin{bmatrix} 0 & 0 & 0 \end{bmatrix}

The coefficient vector y=[111]y = \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} gives a combination of rows that produces the zero row. We can write this as yTA=0Ty^T A = 0^T, or equivalently ATy=0A^T y = 0. The set of all such vectors yy is called the left nullspace, denoted N(AT)N(A^T). It is called "left" because yy multiplies AA from the left: yTA=0Ty^T A = 0^T.

Definition: Left Nullspace

The left nullspace N(AT)N(A^T) of an m×nm \times n matrix AA is the set of all solutions to the equation ATy=0A^T y = 0. Equivalently, it is the set of all vectors yy such that yTA=0Ty^T A = 0^T. It is a subspace of Rm\mathbb{R}^m.

Key Properties:

PropertyDescriptionOur Example
Dimensiondim(N(AT))=mr\dim(N(A^T)) = m - r (number of zero rows in echelon form)dim(N(AT))=32=1\dim(N(A^T)) = 3 - 2 = 1
BasisFound from row dependencies during elimination{[111]}\left\{ \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \right\} (a line in R3\mathbb{R}^3)
InterpretationCoefficients that make rows combine to zeror1r2+r3=0-r_1 - r_2 + r_3 = 0

Finding the Basis: Backtracking Through Elimination

For our matrix, the elimination process is:

[112235347]R22R1[112011347]R33R1[112011011]R3R2[112011000]\begin{bmatrix} 1 & 1 & 2 \\ 2 & 3 & 5 \\ 3 & 4 & 7 \end{bmatrix} \xrightarrow{R_2 - 2R_1} \begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & 1 \\ 3 & 4 & 7 \end{bmatrix} \xrightarrow{R_3 - 3R_1} \begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & 1 \\ 0 & 1 & 1 \end{bmatrix} \xrightarrow{R_3 - R_2} \begin{bmatrix} 1 & 1 & 2 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}

The final zero row tells us that row 3 of UU equals zero. But how does this give us the left nullspace? We need to trace back through the elimination operations to express this in terms of the original rows of AA.

Step-by-step backtracking:

Starting from the final form: Row 3 of UU = [0  0  0][0 \; 0 \; 0]

Working backwards:

  1. Last operation (R3R2R_3 - R_2):

    • Before this step, row 3 was [0  1  1][0 \; 1 \; 1] (same as row 2)
    • So: [0  0  0]=[0  1  1][0  1  1][0 \; 0 \; 0] = [0 \; 1 \; 1] - [0 \; 1 \; 1]
    • This means: Row 3 (final) = Row 3 (after step 2) - Row 2 (after step 1)
  2. Second operation (R33R1R_3 - 3R_1):

    • Row 3 after this step was [0  1  1][0 \; 1 \; 1]
    • Row 3 before was [3  4  7][3 \; 4 \; 7] (original row 3)
    • Row 1 after first step was [1  1  2][1 \; 1 \; 2] (original row 1, unchanged)
    • So: Row 3 (after step 2) = Original r33r_3 - 3 \cdot Original r1r_1
  3. First operation (R22R1R_2 - 2R_1):

    • Row 2 after this step was [0  1  1][0 \; 1 \; 1]
    • So: Row 2 (after step 1) = Original r22r_2 - 2 \cdot Original r1r_1

Combining everything:

Row 3 (final) = Row 3 (after step 2) - Row 2 (after step 1)

Substituting:

0=(r33r1)(r22r1)0 = (r_3 - 3r_1) - (r_2 - 2r_1)

=r33r1r2+2r1= r_3 - 3r_1 - r_2 + 2r_1

=r1r2+r3= -r_1 - r_2 + r_3

=(1)r1+(1)r2+(1)r3= (-1) \cdot r_1 + (-1) \cdot r_2 + (1) \cdot r_3

This gives us the coefficients [111]\begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} that make the original rows combine to zero. Therefore {[111]}\left\{ \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \right\} is a basis for N(AT)N(A^T), making it a line in R3\mathbb{R}^3.

📌 Example: Matrix with multiple left nullspace basis vectors

Consider a 4×34 \times 3 matrix with rank 2:

B=[101011112213]B = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 1 & 2 \\ 2 & 1 & 3 \end{bmatrix}

Since mr=42=2m - r = 4 - 2 = 2, the left nullspace has dimension 2. Elimination gives:

Belimination[101011000000]B \xrightarrow{\text{elimination}} \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{bmatrix}

We have two zero rows, so we need to find two dependency relationships.

For the 3rd zero row:

  • Final: Row 3 = 0
  • Operations: (r3r1)r2=0(r_3 - r_1) - r_2 = 0
  • Therefore: r1r2+r3+0r4=0-r_1 - r_2 + r_3 + 0 \cdot r_4 = 0
  • First basis vector: [1110]\begin{bmatrix} -1 \\ -1 \\ 1 \\ 0 \end{bmatrix}

For the 4th zero row:

  • Final: Row 4 = 0
  • Operations: (r42r1)r2=0(r_4 - 2r_1) - r_2 = 0
  • Therefore: 2r1r2+0r3+r4=0-2r_1 - r_2 + 0 \cdot r_3 + r_4 = 0
  • Second basis vector: [2101]\begin{bmatrix} -2 \\ -1 \\ 0 \\ 1 \end{bmatrix}

The left nullspace is N(BT)=span{[1110],[2101]}N(B^T) = \text{span}\left\{ \begin{bmatrix} -1 \\ -1 \\ 1 \\ 0 \end{bmatrix}, \begin{bmatrix} -2 \\ -1 \\ 0 \\ 1 \end{bmatrix} \right\}, a 2-dimensional plane in R4\mathbb{R}^4.

Orthogonal Complement with Column Space:

The left nullspace N(AT)N(A^T) and the column space C(A)C(A) are orthogonal complements in Rm\mathbb{R}^m. If yN(AT)y \in N(A^T), then yTA=0Ty^T A = 0^T, which means yy is perpendicular to every column of AA. Since column space vectors are linear combinations of columns, every vector in N(AT)N(A^T) is perpendicular to every vector in C(A)C(A).

For our matrix:

  • Column space basis: {[123],[134]}\left\{ \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, \begin{bmatrix} 1 \\ 3 \\ 4 \end{bmatrix} \right\}
  • Left nullspace basis: {[111]}\left\{ \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \right\}

Verification: [111][123]=12+3=0,[111][134]=13+4=0\begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} = -1 - 2 + 3 = 0, \quad \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \cdot \begin{bmatrix} 1 \\ 3 \\ 4 \end{bmatrix} = -1 - 3 + 4 = 0

Their dimensions add up to mm: dim(C(A))+dim(N(AT))=r+(mr)=2+1=3=m\dim(C(A)) + \dim(N(A^T)) = r + (m-r) = 2 + 1 = 3 = m.

Integrating Concepts: The Complete Solution

The four subspaces provide a complete answer to the two fundamental questions about Ax=bAx = b.

Theorem: Fredholm Alternative (Solvability Condition)

The system of linear equations Ax=bAx = b has a solution if and only if bb is orthogonal to the left nullspace N(AT)N(A^T). bC(A)    bN(AT)b \in C(A) \iff b \perp N(A^T)

Consider our matrix A=[112235347]A = \begin{bmatrix} 1 & 1 & 2 \\ 2 & 3 & 5 \\ 3 & 4 & 7 \end{bmatrix} with left nullspace basis [111]\begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix}.

Example 1: Does Ax=b=[123]Ax = b = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} have a solution?

Check: [111][123]=12+3=0\begin{bmatrix} -1 & -1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} = -1 - 2 + 3 = 0

Yes, it has a solution.

Example 2: Does Ax=b=[124]Ax = b = \begin{bmatrix} 1 \\ 2 \\ 4 \end{bmatrix} have a solution?

Check: [111][124]=12+4=10\begin{bmatrix} -1 & -1 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ 2 \\ 4 \end{bmatrix} = -1 - 2 + 4 = 1 \neq 0

No, it has no solution.

Why this works: The left nullspace basis [111]\begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} encodes the row dependency: row1row2+row3=0-\text{row}_1 - \text{row}_2 + \text{row}_3 = 0, meaning row3=row1+row2\text{row}_3 = \text{row}_1 + \text{row}_2. If Ax=bAx = b has a solution, this same dependency must hold for bb: we need b3=b1+b2b_3 = b_1 + b_2.

Corollary: Full Row Rank and Universal Solvability

Let AA be an m×nm \times n matrix. The following are equivalent:

  1. N(AT)={0}N(A^T) = \{0\}
  2. rank(A)=m\text{rank}(A) = m (full row rank)
  3. C(A)=RmC(A) = \mathbb{R}^m
  4. Ax=bAx = b has a solution for every bRmb \in \mathbb{R}^m

Example: A=[1001]A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} has full row rank. For any b=[b1b2]b = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}, the system Ax=bAx = b always has a solution.

When N(AT)={0}N(A^T) = \{0\}, the solvability condition is vacuously satisfied for all bb.

💡 Question: Why are these four conditions equivalent?

Why does N(AT)={0}N(A^T) = \{0\} imply full row rank, full column space, and universal solvability?

Brief Proof Sketch:

(1) ⟺ (2): From the Fundamental Theorem, dim(N(AT))=mr\dim(N(A^T)) = m - r. Therefore: N(AT)={0}    dim(N(AT))=0    mr=0    r=mN(A^T) = \{0\} \iff \dim(N(A^T)) = 0 \iff m - r = 0 \iff r = m

(2) ⟺ (3): Since dim(C(A))=r\dim(C(A)) = r, we have: r=m    dim(C(A))=m    C(A)=Rmr = m \iff \dim(C(A)) = m \iff C(A) = \mathbb{R}^m (A subspace of Rm\mathbb{R}^m with dimension mm must be the whole space.)

(3) ⟺ (4): By definition: C(A)={Ax:xRn}C(A) = \{Ax : x \in \mathbb{R}^n\} Therefore, C(A)=RmC(A) = \mathbb{R}^m means every bRmb \in \mathbb{R}^m can be written as b=Axb = Ax for some xx.

Key Insight: When there are no row dependencies (N(AT)={0}N(A^T) = \{0\}), all rows are independent, giving full row rank. This means the rows span all of Rn\mathbb{R}^n, so the columns can reach any bRmb \in \mathbb{R}^m.

How many solutions are there?

Theorem: Structure of the General Solution

If xpx_p is a particular solution to the non-homogeneous equation Ax=bAx = b, then the general solution is given by: x=xp+xnx = x_p + x_n where xnx_n represents an arbitrary vector in the nullspace N(A)N(A).

For our matrix AA (with nr=1n - r = 1) and b=[123]b = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix}, one particular solution is xp=[100]x_p = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}. The complete solution is:

x=[100]+c[111],cRx = \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix} + c \begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix}, \quad c \in \mathbb{R}

This is a line parallel to the nullspace, shifted from the origin by xpx_p.

Structure of Solutions

The full solution set is x=xp+xnx = x_p + x_n.

Cases:

ConditionSolution StructureGeometric Picture
dim(N(A))=nr=0\dim(N(A)) = n - r = 0x=xpx = x_p (unique)Single point
dim(N(A))=nr=1\dim(N(A)) = n - r = 1x=xp+cxnx = x_p + c x_nLine through xpx_p
dim(N(A))=nr=2\dim(N(A)) = n - r = 2x=xp+c1xn1+c2xn2x = x_p + c_1 x_{n1} + c_2 x_{n2}Plane through xpx_p

Summary: The Fundamental Theorem of Linear Algebra

The four fundamental subspaces capture different aspects of a matrix AA:

SubspaceLives inDimensionInterpretation
Column Space C(A)C(A)Rm\mathbb{R}^mrrWhere bb must be for solvability
Nullspace N(A)N(A)Rn\mathbb{R}^nnrn - rCoefficients that make columns vanish
Row Space C(AT)C(A^T)Rn\mathbb{R}^nrrWhere xx actually contributes
Left Nullspace N(AT)N(A^T)Rm\mathbb{R}^mmrm - rCoefficients that make rows vanish

The Fundamental Theorem

Theorem: The Fundamental Theorem of Linear Algebra

For an m×nm \times n matrix AA with rank rr:

Part 1: Dimensions

dim(C(A))=dim(C(AT))=r\dim(C(A)) = \dim(C(A^T)) = r

dim(N(A))=nr,dim(N(AT))=mr\dim(N(A)) = n - r, \quad \dim(N(A^T)) = m - r

Part 2: Orthogonality

C(AT)N(A)(in Rn)C(A^T) \perp N(A) \quad \text{(in } \mathbb{R}^n\text{)}

C(A)N(AT)(in Rm)C(A) \perp N(A^T) \quad \text{(in } \mathbb{R}^m\text{)}

These orthogonal complement relationships mean:

  • C(AT)C(A^T) and N(A)N(A) span all of Rn\mathbb{R}^n: any xRnx \in \mathbb{R}^n uniquely decomposes as x=xr+xnx = x_r + x_n
  • C(A)C(A) and N(AT)N(A^T) span all of Rm\mathbb{R}^m: any bC(A)b \in C(A) is perpendicular to N(AT)N(A^T)
  • Dimensions add up: r+(nr)=nr + (n-r) = n and r+(mr)=mr + (m-r) = m

The Four Fundamental Subspaces

Figure: Visual representation of the four fundamental subspaces and their relationships. [1]

Guided Problems

These problems test your conceptual understanding of the Four Fundamental Subspaces, Rank, and Solvability. They minimize calculation and focus on the relationships defined by the Fundamental Theorem of Linear Algebra.

Problem 1: Rank-One Matrices and the Four Fundamental Subspaces

Let uu be a column vector in Rm\mathbb{R}^m and vv be a column vector in Rn\mathbb{R}^n. Neither vector is the zero vector.

We form the m×nm \times n matrix AA by the outer product:

A=uvTA = uv^T

  1. Find the rank of AA.

  2. Find a basis and dimension for each of the four fundamental subspaces:

    • Column Space C(A)C(A)
    • Row Space C(AT)C(A^T)
    • Nullspace N(A)N(A)
    • Left Nullspace N(AT)N(A^T)
  3. Describe the geometric condition for a vector xx to be in the nullspace.

💡 Solution

Hints:

  • Rank: Write out the matrix multiplication A=u[v1vn]A = u [v_1 \dots v_n]. Notice that every column of AA is a scalar multiple of the vector uu. How many linearly independent columns does AA have?
  • Column Space: Since every column is a multiple of uu, what single vector spans the entire column space?
  • Row Space: Recall that rank(AT)=rank(A)\text{rank}(A^T) = \text{rank}(A). Alternatively, observe that every row is a multiple of vTv^T.
  • Nullspace: Use the Rank-Nullity Theorem: dim(N(A))=nr\dim(N(A)) = n - r. To find the condition, write out Ax=(uvT)xAx = (uv^T)x and use associativity to group (vTx)(v^T x). For AxAx to be zero, what must be the value of the scalar (vTx)(v^T x)?
  • Left Nullspace: Use the Fundamental Theorem: dim(N(AT))=mr\dim(N(A^T)) = m - r.

Solution:

  1. Rank: rank(A)=1\text{rank}(A) = 1

    • Since uu and vv are non-zero, AA has at least one non-zero entry. All columns are multiples of uu, so there is only 1 independent column.
  2. Four Fundamental Subspaces:

    Column Space C(A)C(A):

    • Dimension: 11
    • Basis: {u}\{ u \}

    Row Space C(AT)C(A^T):

    • Dimension: 11
    • Basis: {v}\{ v \}

    Nullspace N(A)N(A):

    • Dimension: n1n - 1
    • Basis: Any n1n-1 linearly independent vectors orthogonal to vv
    • The nullspace is an (n1)(n-1)-dimensional hyperplane

    Left Nullspace N(AT)N(A^T):

    • Dimension: m1m - 1
    • Basis: Any m1m-1 linearly independent vectors orthogonal to uu
    • The left nullspace is an (m1)(m-1)-dimensional hyperplane
  3. Geometric Condition:

    • A vector xRnx \in \mathbb{R}^n is in the nullspace if and only if xx is orthogonal to vv.
    • Proof: Ax=u(vTx)Ax = u(v^T x). Since u0u \neq 0, we have Ax=0Ax = 0 if and only if vTx=0v^T x = 0.
    • This means N(A)={xRn:vTx=0}N(A) = \{ x \in \mathbb{R}^n : v^T x = 0 \}, which is a hyperplane perpendicular to vv.

Problem 2: Nullspace Preservation and the Gram Matrix

Let AA be a real m×nm \times n matrix. We construct the square, symmetric matrix G=ATAG = A^T A.

  1. Nullspace Equality: Show that the nullspace of AA is exactly the same as the nullspace of ATAA^T A. (i.e., prove N(A)=N(ATA)N(A) = N(A^T A))

  2. Rank Relationship: Using the result from Part 1 and the Rank-Nullity Theorem, determine the relationship between rank(A)\text{rank}(A) and rank(ATA)\text{rank}(A^T A).

  3. Invertibility Condition: Based on Part 2, if AA is a tall matrix (m>nm > n) with linearly independent columns, is ATAA^T A invertible? Explain your reasoning.

💡 Solution

Hints:

  • Part 1: To show two sets are equal, prove both directions: (1) N(A)N(ATA)N(A) \subseteq N(A^T A) and (2) N(ATA)N(A)N(A^T A) \subseteq N(A). For the second direction, if (ATA)x=0(A^T A)x = 0, multiply both sides by xTx^T and use the fact that Ax2=(Ax)T(Ax)\|Ax\|^2 = (Ax)^T(Ax).
  • Part 2: Use the Rank-Nullity Theorem: rank(M)+dim(N(M))=number of columns\text{rank}(M) + \dim(N(M)) = \text{number of columns}. Since AA and ATAA^T A have the same nullspace dimension and the same number of columns, what can you conclude?
  • Part 3: For invertibility, check if rank(ATA)=n\text{rank}(A^T A) = n (full rank for a square n×nn \times n matrix). What does "linearly independent columns" tell you about rank(A)\text{rank}(A)?

Solution:

Part 1: N(A)=N(ATA)N(A) = N(A^T A)

We need to show both directions:

(1) N(A)N(ATA)N(A) \subseteq N(A^T A):

  • Let xN(A)x \in N(A), so Ax=0Ax = 0.
  • Then (ATA)x=AT(Ax)=AT(0)=0(A^T A)x = A^T(Ax) = A^T(0) = 0.
  • Therefore xN(ATA)x \in N(A^T A).

(2) N(ATA)N(A)N(A^T A) \subseteq N(A):

  • Let xN(ATA)x \in N(A^T A), so (ATA)x=0(A^T A)x = 0.
  • Multiply both sides by xTx^T: xT(ATA)x=0x^T(A^T A)x = 0 (Ax)T(Ax)=0(Ax)^T(Ax) = 0 Ax2=0\|Ax\|^2 = 0
  • Therefore Ax=0Ax = 0, which means xN(A)x \in N(A).

Since both inclusions hold, N(A)=N(ATA)N(A) = N(A^T A).

Part 2: Rank Relationship

From Part 1, we know N(A)=N(ATA)N(A) = N(A^T A), so: dim(N(A))=dim(N(ATA))\dim(N(A)) = \dim(N(A^T A))

Both AA and ATAA^T A have nn columns. By the Rank-Nullity Theorem:

  • For AA: rank(A)+dim(N(A))=n\text{rank}(A) + \dim(N(A)) = n
  • For ATAA^T A: rank(ATA)+dim(N(ATA))=n\text{rank}(A^T A) + \dim(N(A^T A)) = n

Since the nullspace dimensions are equal: rank(ATA)=rank(A)\boxed{\text{rank}(A^T A) = \text{rank}(A)}

Part 3: Invertibility of ATAA^T A

If AA is an m×nm \times n tall matrix (m>nm > n) with linearly independent columns:

  • "Linearly independent columns" means rank(A)=n\text{rank}(A) = n (full column rank)
  • From Part 2: rank(ATA)=rank(A)=n\text{rank}(A^T A) = \text{rank}(A) = n
  • ATAA^T A is an n×nn \times n square matrix with rank nn

Therefore, ATAA^T A is invertible.

Key Insight: This is why the normal equations (ATA)β=ATb(A^T A)\beta = A^T b in linear regression have a unique solution when the columns of the design matrix AA are linearly independent (no perfect multicollinearity).


References

  1. MIT OpenCourseWare - 18.06SC Linear Algebra - The Four Fundamental Subspaces
  2. Strang, Gilbert - Introduction to Linear Algebra (Chapter 2)