Skip to main content

Null Space of a Matrix — How to Find It Using RREF

📖 6 min read · Updated May 2026 · Free guide

The null space (kernel) is the set of all vectors x satisfying Ax = 0. This guide shows exactly how to find it using reduced row echelon form, with worked examples and a proof of the rank-nullity theorem.Updated May 2026 · Reviewed by our math editorial team

What Is the Null Space?

The null space (also called the kernel) of an m×n matrix A is the set of all n-dimensional vectors x satisfying Ax = 0:

Null(A) = ker(A) = {x ∈ ℝⁿ : Ax = 0}

The null space is always a subspace of ℝⁿ: it contains the zero vector, is closed under addition, and is closed under scalar multiplication. Its dimension — the number of linearly independent vectors needed to span it — is called the nullity of A.

Geometrically, the null space is the set of vectors that A maps to zero. If A represents a linear transformation T: ℝⁿ → ℝᵐ, the null space is the set of inputs that T collapses to the origin. A linear transformation is injective (one-to-one) if and only if its null space contains only the zero vector.

The Rank-Nullity Theorem

For any m×n matrix A, the fundamental identity is:

rank(A) + nullity(A) = n

Here rank(A) is the number of pivots in RREF(A) (equal to the dimension of the column space), and nullity(A) is the number of free variable columns in RREF(A) (equal to the dimension of the null space). The theorem says: pivots + free variables = total columns.

This identity constrains what is possible: a 4×6 matrix has at most rank 4 (since rank ≤ min(m,n)), so nullity ≥ 2. A 4×6 matrix with rank 3 has nullity 3. A 4×6 matrix with rank 4 has nullity 2.

The theorem also implies: a square n×n matrix is invertible (full rank n) if and only if its null space is trivial (nullity 0). Use the matrix inverse calculator for invertibility checks, or the RREF calculator to count pivots and free variables directly.

How to Find the Null Space Using RREF: Step-by-Step

  1. Set up Ax = 0. Form the augmented matrix [A | 0]. Since the right-hand side is all zeros, the last column never changes — you can omit it and just compute RREF(A).
  2. Compute RREF(A). Use RREF calculator or apply Gauss-Jordan elimination by hand.
  3. Identify pivot and free columns. Pivot columns correspond to pivot variables; non-pivot columns correspond to free variables. If RREF has pivots in columns 1 and 3, then columns 2, 4, … are free.
  4. Express pivot variables in terms of free variables. Each pivot row gives one equation of the form: pivot variable = (linear combination of free variables).
  5. Create a basis vector for each free variable. Set that free variable to 1, all others to 0, and solve for the pivot variables. The resulting vector is one basis vector for the null space.
  6. Collect all basis vectors. The complete set is a basis for Null(A). Their span is the null space.

Worked Example: 3×4 Matrix with One Free Variable

Find the null space of:

A = [ 1 2 3 4 ]

[ 2 5 8 11 ]

[ 3 7 11 15 ]

Step 1: Compute RREF(A).

R₂ → R₂ − 2R₁: [ 0 1 2 3 ]

R₃ → R₃ − 3R₁: [ 0 1 2 3 ]

R₃ → R₃ − R₂: [ 0 0 0 0 ]

RREF(A) = [ 1 0 −1 −2 ]

[ 0 1 2 3 ]

[ 0 0 0 0 ]

Step 2: Pivot columns are 1 and 2. Free columns are 3 (x₃) and 4 (x₄).

Step 3: From RREF, the equations are: x₁ − x₃ − 2x₄ = 0 → x₁ = x₃ + 2x₄; and x₂ + 2x₃ + 3x₄ = 0 → x₂ = −2x₃ − 3x₄.

Step 4: Set x₃ = 1, x₄ = 0: x₁ = 1, x₂ = −2. Basis vector v₁ = (1, −2, 1, 0).

Set x₃ = 0, x₄ = 1: x₁ = 2, x₂ = −3. Basis vector v₂ = (2, −3, 0, 1).

Null(A) = span{v₁, v₂} = {s(1,−2,1,0) + t(2,−3,0,1) : s,t ∈ ℝ}.

Verify: A·v₁ = (1+2·(−2)+3·1+4·0, ...) Let us check row 1: 1(1) + 2(−2) + 3(1) + 4(0) = 1 − 4 + 3 + 0 = 0 ✓. Enter A into the RREF calculator to see every elimination step.

When the Null Space Is Trivial

A matrix has a trivial null space (only the zero vector) when RREF(A) has a pivot in every column. This means rank(A) = n (full column rank). In this case, the only solution to Ax = 0 is x = 0.

For square matrices: full column rank ⟺ full row rank ⟺ invertible ⟺ det(A) ≠ 0 ⟺ trivial null space. All of these conditions are equivalent for square matrices.

For rectangular m×n matrices with m < n: full column rank is impossible (we cannot have more pivots than rows), so the null space is always non-trivial. Any matrix with more columns than rows must have a non-trivial null space.

The Null Space vs. the Solution Set of Ax = b

The null space Null(A) is the solution set of the homogeneous system Ax = 0. The solution set of the non-homogeneous system Ax = b (for a specific b) is:

Solution set of Ax = b = x_particular + Null(A)

That is, take any one particular solution x_p (satisfying Ax_p = b), then add all vectors in the null space. This is why the null space matters: it characterizes how many solutions Ax = b has. If Null(A) is trivial, the solution is unique (if it exists). If Null(A) is non-trivial, there are infinitely many solutions.

For detailed coverage of all three solution types, see our solving linear systems guide.

Applications of the Null Space

Testing linear independence. The columns of A are linearly independent if and only if Null(A) = {0}. Apply RREF: if every column is a pivot column, the vectors are independent.

Finding a basis for a solution family. When Ax = b has infinitely many solutions, the null space basis vectors parametrize the entire solution family. Each free variable gives one degree of freedom in the solution.

Kernel of a linear transformation. If T: ℝⁿ → ℝᵐ is linear with matrix A, then ker(T) = Null(A). The first isomorphism theorem says ℝⁿ/ker(T) ≅ image(T), connecting dimension with rank.

Computer graphics. Texture coordinates, barycentric coordinates, and lighting computations involve null space reasoning — determining which combinations of basis vectors produce a given output.

Error-correcting codes. Linear codes over finite fields use null space (parity check matrix) to detect and correct transmission errors. The null space of the parity matrix is the code.

For foundational concepts connecting null space to the four fundamental subspaces, see our linear algebra basics guide.

Frequently Asked Questions

What is the null space of a matrix?

The null space (or kernel) of A is the set of all x satisfying Ax = 0. It is always a subspace of ℝⁿ. Every matrix has a null space containing at least the zero vector.

How do you find the null space using RREF?

Compute RREF(A). Identify free columns (no pivot). For each free variable, set it to 1 and others to 0, then solve for the pivot variables from the RREF rows. Each free variable yields one null space basis vector.

What is the rank-nullity theorem?

rank(A) + nullity(A) = n (number of columns). Pivots + free variables = total columns. This identity always holds for any m×n matrix.

What does a trivial null space mean?

Null(A) = {0} means the only solution to Ax = 0 is x = 0. Equivalently, rank(A) = n (full column rank) and the columns of A are linearly independent. For square matrices, this is equivalent to invertibility.