Guides8 min
How to Find a Basis for the Null Space and Column Space (RREF Example)
The null space and the column space are two of the most important spaces attached to a matrix. For both, one RREF is enough to read off a basis. Let's find a basis and the dimension of each space for a single matrix.
Definitions
- Null space N(A): the set of all vectors x with Ax = 0. It always contains the zero vector.
- Column space C(A): the set of all vectors that can be written as linear combinations of the columns of A. Equivalently, it is the set of all b for which Ax = b has a solution.
Example matrix
This is a 3×4 matrix. First we compute its RREF.
- 01Start from the given matrix.120−124113610
- 02Make every other entry of column 1 zero.
R₂ ← R₂ − 2R₁R₃ ← R₃ − 3R₁120−100130013 - 03Make every other entry of column 3 zero.
R₃ ← R₃ − R₂120−100130000
The pivots are in columns 1 and 3, so rank(A) = 2. Columns 2 and 4 have no pivot, so there are two free variables.
Finding a basis for the null space
Read the equations from the RREF: x₁ + 2x₂ − x₄ = 0 and x₃ + 3x₄ = 0. Setting the free variables x₂ = s and x₄ = t gives the following.
Collecting the s terms and the t terms into vectors, every solution is a linear combination of two vectors.
So these two vectors form a basis for the null space. Multiply each by A to check that the result is the zero vector.
Finding a basis for the column space
The pivot columns of the RREF are columns 1 and 3. A basis for the column space is columns 1 and 3 of the original matrix A, not the columns of the RREF. This matters because row operations change the column space.
The remaining columns 2 and 4 are linear combinations of these two. For example, column 2 is twice column 1.
The relationship between the dimensions
There are 4 columns and the rank is 2, so the dimension of the null space (the nullity) is 4 − 2 = 2, which matches the number of basis vectors we just found. This relationship is the rank-nullity theorem.
Common mistakes
- Using the columns of the RREF as a basis for the column space. You must use the columns of the original A.
- Choosing a non-free variable as a parameter for the null space. The free variables are the ones in columns without a pivot.
- Missing the case where the null space basis is empty. With no free variables, the null space is just the zero vector.
- Mixing up the row space and the column space. A basis for the row space is the set of nonzero rows of the RREF.
FAQ
Do the null space and the column space live in the same space?
No. For an m×n matrix, the column space is a subspace of ℝᵐ and the null space is a subspace of ℝⁿ.
How do I find a basis for the row space?
The nonzero rows of the RREF form a basis for the row space. Row operations do not change the row space, so the rows of the RREF can be used directly.
What does it mean if the null space has dimension 0?
It means the only solution of Ax = 0 is the zero vector. Equivalently, every column has a pivot, and the columns are linearly independent.
Related guides