← MATH 231 MathScape 0 MATH231

Null Space, Column Space, and Basis

11 min read

Before A basis is an independent spanning set of a subspace, read from the free variables and the pivot columns after row reduction. Builds on: Vector Spaces and Subspaces · Solution Sets of Linear Systems and Free Variables · Linear Independence

Next Bases lead to dimension and rank, and to the orthogonal projections of chapter 6. Leads to: Dimension, Rank, and Coordinate Systems · Orthogonal Projections and the Gram-Schmidt Process

Jump to a section
Reference: Lay, Linear Algebra and Its Applications, Section 4.2: Null Spaces, Column Spaces, and Linear Transformations; Section 4.3: Linearly Independent Sets; Bases

Video: Dr Lynch’s MATH 231 lectures (YouTube playlists)

Before You Start: Prerequisite Check

Can you do these? (Click to reveal self-test)

Test yourself on these prerequisite skills:

  1. Null space: For $A = \begin{pmatrix}2&4\\1&2\end{pmatrix}$, solve $A\mathbf{x} = \mathbf{0}$ and write all solutions in parametric vector form.

    Check

    $R_2 - \frac{1}{2}R_1$: row 2 becomes $[0,0]$. Free variable $x_2 = t$; then $x_1 = -2t$. $\text{Nul}(A) = \text{Span}\left\{\begin{pmatrix}-2\\1\end{pmatrix}\right\}$.

  2. Column space: What is the column space of $A$?

    Check

    $\text{Col}(A)$ is the span of the columns of $A$, i.e., all vectors of the form $A\mathbf{x}$. For $A = \begin{pmatrix}2&4\\1&2\end{pmatrix}$, both columns are multiples of $\begin{pmatrix}2\\1\end{pmatrix}$, so $\text{Col}(A) = \text{Span}\left\{\begin{pmatrix}2\\1\end{pmatrix}\right\}$.

  3. Basis intuition: What two properties must a basis for a subspace $H$ satisfy?

    Check

    A basis must be (1) linearly independent and (2) span $H$. Equivalently: it is a spanning set with no redundancy.

If you struggled: Review Vector Spaces and Subspaces and Solution Sets and Free Variables.


Try This First

For $A = \begin{pmatrix}1&2&4\\-1&-2&-4\\2&4&8\end{pmatrix}$, solve $A\mathbf{x} = \mathbf{0}$.

Is the solution set a single vector, or a collection of vectors? Before row-reducing, predict how many free variables you expect based on the structure of $A$.

Show Solution

Prediction: Every row is a multiple of $[1, 2, 4]$, so after row reduction at most one row is nonzero. With only 1 pivot in 3 columns, there will be 2 free variables.

Row reduce:

$R_2 + R_1$: $[0,0,0]$; $R_3 - 2R_1$: $[0,0,0]$.

RREF: $\begin{pmatrix}1&2&4\\0&0&0\\0&0&0\end{pmatrix}$

Free variables: $x_2 = s$ and $x_3 = t$. From row 1: $x_1 = -2s - 4t$.

\[ \text{Nul}(A) = \text{Span}\left\{\begin{pmatrix}-2\\1\\0\end{pmatrix}, \begin{pmatrix}-4\\0\\1\end{pmatrix}\right\} \]

The null space is not a single vector; it is an entire plane through the origin in $\mathbb{R}^3$. The two vectors that span it are the basis vectors for $\text{Nul}(A)$.


Two Fundamental Subspaces

Every $m \times n$ matrix $A$ comes with two canonical subspaces:

These two subspaces answer complementary questions:

Finding a basis for each: a smallest set of vectors that spans the space with no redundancy.


Prerequisite Map


Quick Reference

Property Value
Course MATH 231
Difficulty Advanced
Time ~30 minutes
Source Lay, Linear Algebra and Its Applications, Sections 4.2 and 4.3

Basis Algorithms at a Glance

Space How to Find a Basis
$\text{Nul}(A)$ Solve $A\mathbf{x}=\mathbf{0}$; take the direction vectors from the parametric form
$\text{Col}(A)$ Row-reduce $A$; the basis consists of the original columns of $A$ at the pivot positions

Critical warning: for $\text{Col}(A)$, use the original columns of $A$, not the pivot columns of the RREF.


Key Concepts

What Is a Basis?

A basis for a subspace $H$ is a set $\mathcal{B} = \{\mathbf{b}_1, \ldots, \mathbf{b}_p\}$ satisfying two conditions:

  1. $\mathcal{B}$ is linearly independent.
  2. $\mathcal{B}$ spans $H$: $H = \text{Span}\{\mathbf{b}_1, \ldots, \mathbf{b}_p\}$.

The Uniqueness of Size Theorem: any two bases for the same subspace $H$ contain the same number of vectors. That number is the dimension of $H$.

A basis is the most efficient description of a subspace: no vector is redundant (independence), and every vector in $H$ is reachable (spanning).

Standard examples:

Source: Lay, Linear Algebra and Its Applications, Section 4.3: Linearly Independent Sets; Bases.

Basis for the Null Space

Algorithm:

  1. Row-reduce $[A \mid \mathbf{0}]$ to RREF.
  2. Identify free variables (non-pivot columns).
  3. Write the parametric solution: one direction vector per free variable.
  4. These direction vectors form a basis for $\text{Nul}(A)$.

The number of direction vectors equals the number of free variables equals $n - \text{rank}(A)$ (this is the nullity of $A$).

Worked example (3x4 matrix):

Let $A = \begin{pmatrix}1&2&0&4\\-1&-2&1&-3\\2&4&1&5\end{pmatrix}$.

Row reduce: $R_2 + R_1$, $R_3 - 2R_1$: \[ \begin{pmatrix}1&2&0&4\\0&0&1&1\\0&0&1&-3\end{pmatrix} \] $R_3 - R_2$: \[ \begin{pmatrix}1&2&0&4\\0&0&1&1\\0&0&0&-4\end{pmatrix} \] $R_3 \to -\frac{1}{4}R_3$, then $R_2 - R_3$, $R_1 - 4R_3$: \[ \text{RREF}: \begin{pmatrix}1&2&0&0\\0&0&1&0\\0&0&0&1\end{pmatrix} \]

Pivot columns: 1, 3, 4. Free column: 2. Let $x_2 = t$.

\[ \text{Basis for Nul}(A) = \left\{\begin{pmatrix}-2\\1\\0\\0\end{pmatrix}\right\} \]

Source: Lay, Linear Algebra and Its Applications, Section 4.2: Null Spaces, Column Spaces, and Linear Transformations.

Basis for the Column Space

Algorithm:

  1. Row-reduce $A$ to any echelon form.
  2. Identify the pivot columns of the echelon form.
  3. The corresponding columns of the original matrix $A$ form a basis for $\text{Col}(A)$.

Why original columns, not RREF columns? Row operations change the column space of the matrix. The columns of RREF are not in the same span as the columns of $A$ in general. But row operations DO preserve which columns are pivot columns: the pivot columns of RREF indicate which original columns are independent.

Worked example (same matrix):

From the RREF above, pivot columns are 1, 3, 4.

Basis for $\text{Col}(A)$ = columns 1, 3, 4 of the ORIGINAL matrix $A$:

\[ \left\{\begin{pmatrix}1\\-1\\2\end{pmatrix}, \begin{pmatrix}0\\1\\1\end{pmatrix}, \begin{pmatrix}4\\-3\\5\end{pmatrix}\right\} \]

These three vectors span the same column space as all four columns of $A$.

The Spanning Set Theorem

Theorem (Lay, Section 4.3): Let $S = \{\mathbf{v}_1, \ldots, \mathbf{v}_p\}$ be a set in a vector space $V$ and let $H = \text{Span}\{S\}$.

(a) If one of the vectors in $S$, say $\mathbf{v}_k$, is a linear combination of the remaining vectors, then the set formed by removing $\mathbf{v}_k$ still spans $H$.

(b) If $H \neq \{\mathbf{0}\}$, some subset of $S$ is a basis for $H$.

The theorem tells you how to reduce an inefficient spanning set to a basis: remove any vector that is already a linear combination of the others.


Common Pitfalls

Mistake Why It Is Wrong Correct Approach
Using RREF pivot columns as the Col$(A)$ basis Row operations change the column space; RREF columns span a different space than the original columns Use the pivot column positions to identify which ORIGINAL columns form the basis
Treating any spanning set as a basis A spanning set may contain redundant vectors (dependent); a basis requires independence Check independence, or use the pivot column algorithm which automatically gives an independent set
Assuming Nul$(A)$ and Col$(A)$ are in the same space Nul$(A) \subseteq \mathbb{R}^n$ (domain); Col$(A) \subseteq \mathbb{R}^m$ (codomain) Keep track of which space each subspace is in
Assuming dim(Nul$(A)$) = dim(Col$(A)$) The Rank-Nullity Theorem says rank + nullity $= n$ (number of columns), not $m$ Compute each dimension separately from the RREF
The RREF Column Trap: A Concrete Example

Let $A = \begin{pmatrix}1&2\\2&4\end{pmatrix}$.

RREF of $A$ is $\begin{pmatrix}1&2\\0&0\end{pmatrix}$. Pivot column: column 1.

Pivot column of RREF: $\begin{pmatrix}1\\0\end{pmatrix}$.

Original column 1 of $A$: $\begin{pmatrix}1\\2\end{pmatrix}$.

Are these the same? No. $\begin{pmatrix}1\\0\end{pmatrix} \notin \text{Col}(A)$ because $\text{Col}(A)$ consists of multiples of $\begin{pmatrix}1\\2\end{pmatrix}$.

The correct basis for $\text{Col}(A)$ is $\left\{\begin{pmatrix}1\\2\end{pmatrix}\right\}$, not $\left\{\begin{pmatrix}1\\0\end{pmatrix}\right\}$.


Practice Problems

Level 1 Find a Basis for the Null Space

Find a basis for $\text{Nul}(A)$ where $A = \begin{pmatrix}1&2&3\\0&0&1\end{pmatrix}$.

State the dimension of $\text{Nul}(A)$.

Thought Process

Row-reduce (already in echelon form). Identify pivot columns and free columns. Write the parametric solution and collect direction vectors.

Show Answer

$A$ is already in row echelon form. Pivot columns: 1 and 3. Free column: 2. Let $x_2 = t$.

From row 2: $x_3 = 0$. From row 1: $x_1 + 2t + 0 = 0 \implies x_1 = -2t$.

\[ \mathbf{x} = t\begin{pmatrix}-2\\1\\0\end{pmatrix} \]

Basis for $\text{Nul}(A)$: $\left\{\begin{pmatrix}-2\\1\\0\end{pmatrix}\right\}$.

Dimension of $\text{Nul}(A) = 1$.

Level 2 Find a Basis for the Column Space

For the same matrix $A = \begin{pmatrix}1&2&3\\0&0&1\end{pmatrix}$, find a basis for $\text{Col}(A)$.

State the dimension. What is the geometric nature of $\text{Col}(A)$ as a subset of $\mathbb{R}^2$?

Thought Process

Identify the pivot positions. Extract the corresponding ORIGINAL columns of $A$.

Note: $A$ is $2 \times 3$, so $\text{Col}(A)$ is in $\mathbb{R}^2$.

Show Answer

From the row echelon form, pivot positions are in columns 1 and 3. The basis for $\text{Col}(A)$ consists of columns 1 and 3 of the ORIGINAL matrix:

\[ \text{Basis for Col}(A) = \left\{\begin{pmatrix}1\\0\end{pmatrix}, \begin{pmatrix}3\\1\end{pmatrix}\right\} \]

Dimension of $\text{Col}(A) = 2$.

Since $\text{Col}(A)$ is a 2-dimensional subspace of $\mathbb{R}^2$, it equals all of $\mathbb{R}^2$. (Two linearly independent vectors span $\mathbb{R}^2$.)

Level 3 Both Bases from One Row Reduction

The RREF of a $3 \times 5$ matrix $A$ is:

\[ \text{RREF}(A) = \left[\begin{array}{rrrrr} 1 & 2 & 0 & -1 & 0 \\ 0 & 0 & 1 & 3 & 0 \\ 0 & 0 & 0 & 0 & 1 \end{array}\right] \]

and the original matrix $A$ has columns:

\[ \mathbf{a}_1 = \begin{pmatrix}1\\0\\2\end{pmatrix}, \; \mathbf{a}_2 = \begin{pmatrix}2\\0\\4\end{pmatrix}, \; \mathbf{a}_3 = \begin{pmatrix}0\\1\\1\end{pmatrix}, \; \mathbf{a}_4 = \begin{pmatrix}-1\\3\\-5\end{pmatrix}, \; \mathbf{a}_5 = \begin{pmatrix}1\\2\\0\end{pmatrix} \]

Find a basis for both $\text{Nul}(A)$ and $\text{Col}(A)$. State the dimension of each.

Thought Process

Pivot columns: 1, 3, 5 (from RREF). Free columns: 2 and 4. Assign parameters $s$ and $t$.

For Nul: read the parametric solution from RREF; collect direction vectors.

For Col: use the pivot column numbers to extract the corresponding original columns.

Show Answer

Pivot columns: 1, 3, 5. Free columns: 2 ($x_2 = s$) and 4 ($x_4 = t$).

Nul$(A)$: From RREF:

  • $x_1 + 2s - t = 0 \implies x_1 = -2s + t$
  • $x_3 + 3t = 0 \implies x_3 = -3t$
  • $x_5 = 0$

\[ \mathbf{x} = s\begin{pmatrix}-2\\1\\0\\0\\0\end{pmatrix} + t\begin{pmatrix}1\\0\\-3\\1\\0\end{pmatrix} \]

Basis for $\text{Nul}(A)$: $\left\{\begin{pmatrix}-2\\1\\0\\0\\0\end{pmatrix}, \begin{pmatrix}1\\0\\-3\\1\\0\end{pmatrix}\right\}$. Dimension $= 2$.

Col$(A)$: Use the original columns at pivot positions 1, 3, 5:

Basis for $\text{Col}(A)$: $\left\{\mathbf{a}_1, \mathbf{a}_3, \mathbf{a}_5\right\} = \left\{\begin{pmatrix}1\\0\\2\end{pmatrix}, \begin{pmatrix}0\\1\\1\end{pmatrix}, \begin{pmatrix}1\\2\\0\end{pmatrix}\right\}$. Dimension $= 3$.

Note: dim(Nul) + dim(Col) = 2 + 3 = 5 = number of columns of $A$. This is the Rank-Nullity Theorem.

Level 4 Diagnose the RREF Column Error

A student row-reduces $A = \begin{pmatrix}1&2&2\\2&4&6\\3&6&8\end{pmatrix}$ to RREF and gets:

\[ \text{RREF}(A) = \begin{pmatrix}1&2&0\\0&0&1\\0&0&0\end{pmatrix} \]

The student claims: “The pivot columns are columns 1 and 3 of the RREF. So the basis for Col$(A)$ is $\left\{\begin{pmatrix}1\\0\\0\end{pmatrix}, \begin{pmatrix}0\\1\\0\end{pmatrix}\right\}$.”

(a) What error did the student make?

(b) Find the correct basis for Col$(A)$.

(c) Check that the student’s claimed basis vectors do not lie in Col$(A)$.

Thought Process

The pivot positions are identified correctly (columns 1 and 3). But the basis vectors must come from the original matrix, not the RREF.

For (c): check whether $\begin{pmatrix}1\\0\\0\end{pmatrix}$ is in the span of the columns of $A$. The columns of $A$ are all multiples of $[1,2,3]^T$ or combinations of $[1,2,3]^T$ and something else. Is $[1,0,0]^T$ reachable?

Show Answer

(a) The student used the pivot columns of the RREF as basis vectors. The RREF columns span a different space than the original columns of $A$. The correct rule: use the positions of the pivot columns to select the corresponding columns of the ORIGINAL matrix $A$.

(b) Pivot positions in RREF: columns 1 and 3. Original columns 1 and 3 of $A$:

\[ \text{Basis for Col}(A) = \left\{\begin{pmatrix}1\\2\\3\end{pmatrix}, \begin{pmatrix}2\\6\\8\end{pmatrix}\right\} \]

(c) Test $\begin{pmatrix}1\\0\\0\end{pmatrix}$: this must satisfy $A\mathbf{x} = \begin{pmatrix}1\\0\\0\end{pmatrix}$ for some $\mathbf{x}$.

Row-reduce $[A \mid \mathbf{b}]$ with $\mathbf{b} = \begin{pmatrix}1\\0\\0\end{pmatrix}$:

$R_2 - 2R_1$: $[0,0,2,-2]$; $R_3 - 3R_1$: $[0,0,2,-3]$. $R_3 - R_2$: $[0,0,0,-1]$.

Inconsistent: $0 = -1$. So $\begin{pmatrix}1\\0\\0\end{pmatrix} \notin \text{Col}(A)$. The student’s claimed basis is wrong.

Level 5 Determine If a Set Is a Basis

Determine whether $\mathcal{B} = \left\{\begin{pmatrix}1\\0\\0\end{pmatrix}, \begin{pmatrix}1\\1\\0\end{pmatrix}, \begin{pmatrix}1\\1\\1\end{pmatrix}\right\}$ is a basis for $\mathbb{R}^3$.

If yes, express $\mathbf{v} = \begin{pmatrix}5\\3\\2\end{pmatrix}$ as a linear combination of the vectors in $\mathcal{B}$.

Thought Process

Form the matrix $A = [\mathbf{b}_1 \; \mathbf{b}_2 \; \mathbf{b}_3]$ and check if it has 3 pivots (equivalently, the vectors are independent AND span $\mathbb{R}^3$).

To express $\mathbf{v}$ in the basis, solve $c_1\mathbf{b}_1 + c_2\mathbf{b}_2 + c_3\mathbf{b}_3 = \mathbf{v}$.

Show Answer

Form $A = \begin{pmatrix}1&1&1\\0&1&1\\0&0&1\end{pmatrix}$ (upper triangular). The diagonal entries are all nonzero: 3 pivots.

$\mathcal{B}$ is linearly independent AND spans $\mathbb{R}^3$. $\mathcal{B}$ is a basis for $\mathbb{R}^3$.

Express $\mathbf{v}$: solve $A\mathbf{c} = \mathbf{v}$ where $\mathbf{c} = \begin{pmatrix}c_1\\c_2\\c_3\end{pmatrix}$:

\[ [A \mid \mathbf{v}] = \left[\begin{array}{rrr|r}1&1&1&5\\0&1&1&3\\0&0&1&2\end{array}\right] \]

Already in REF. Back-substitute:

  • $c_3 = 2$
  • $c_2 = 3 - 2 = 1$
  • $c_1 = 5 - 1 - 2 = 2$

\[ \begin{pmatrix}5\\3\\2\end{pmatrix} = 2\begin{pmatrix}1\\0\\0\end{pmatrix} + 1\begin{pmatrix}1\\1\\0\end{pmatrix} + 2\begin{pmatrix}1\\1\\1\end{pmatrix} \]

Verify: $\begin{pmatrix}2\\0\\0\end{pmatrix}+\begin{pmatrix}1\\1\\0\end{pmatrix}+\begin{pmatrix}2\\2\\2\end{pmatrix} = \begin{pmatrix}5\\3\\2\end{pmatrix}$ (correct).


Common Misconceptions

Common misconception

the basis for Col$(A)$ uses the pivot columns of the RREF. Row operations change which vectors are in the column space. The RREF of $A$ has different columns from $A$; using them gives a set of vectors that is in the column space of the RREF, not the column space of $A$. Only the pivot column POSITIONS carry over: the positions identify which original columns of $A$ are independent. Use those original columns.

Common misconception

any spanning set for a subspace is a basis. A spanning set may contain redundant vectors that are linear combinations of the others. A basis requires linear independence as well as spanning. The pivot column algorithm automatically produces an independent set, which is one reason it is preferred over simply listing “some spanning vectors.”

Common misconception

the dimensions of Nul$(A)$ and Col$(A)$ are the same. The Rank-Nullity Theorem states: dim(Nul$(A)$) + dim(Col$(A)$) $= n$ (the number of columns of $A$). There is no reason for the two dimensions to be equal unless $n$ happens to be even and rank$= n/2$.


Mastery Checklist

Novice (Level 1-2):

Competent (Level 3-4):

Proficient (Level 5):


Mental Model

The Skeleton

A basis is the skeleton of a subspace. Just as a skeleton is the minimal structure that determines the shape of a body, a basis is the minimal set that determines the shape of a subspace.

Remove any bone (vector) from the skeleton and the body loses shape: the remaining vectors no longer span the space. Add any redundant bone and it adds nothing; the body’s shape was already determined. The skeleton is exactly the right size, no more and no less.

The null space basis and column space basis are two different skeletons that describe two different subspaces: what the matrix “ignores” and what the matrix “can produce.”


Connections

Looking ahead in MATH 231:

Real-world connections:

Source: Lay, Linear Algebra and Its Applications, Section 4.2: Null Spaces, Column Spaces, and Linear Transformations; Section 4.3: Linearly Independent Sets; Bases.



Last updated: 2026-06-16

Watch and Read