Math July 19, 2026 · 10 min

Understanding the Null Space: A Complete Guide to Kernel and Solution Spaces

Learn what the null space (kernel) of a matrix is, how to find it using Gaussian elimination, the rank-nullity theorem, and why it matters for solving linear systems.

Key Takeaway

The null space of a matrix A is the set of all vectors x such that Ax = 0. It measures how far a matrix is from being invertible: a matrix with a trivial null space (only the zero vector) is invertible, while a non-trivial null space indicates that the matrix maps multiple inputs to the same output. The dimension of the null space (nullity) is connected to the rank through the rank-nullity theorem: rank(A) + nullity(A) = n.

The null space of a matrix — also called the kernel — is one of the most important concepts in linear algebra. It captures exactly which inputs a linear transformation maps to zero, revealing the fundamental structure of solutions to homogeneous systems of equations. When you solve Ax = 0, the set of all solutions is precisely the null space of A. Understanding the null space tells you whether a system has unique solutions, whether a matrix is invertible, and how to construct basis vectors for solution spaces. In this guide, we will define the null space precisely, walk through the Gaussian elimination method for computing it step by step, explore the rank-nullity theorem that connects it to the matrix rank, and examine its applications across mathematics, engineering, and data science.

What Is the Null Space?

The null space of an m × n matrix A is the set of all n-dimensional column vectors x that satisfy the equation:

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

This set is called the kernel of the linear transformation defined by A, denoted ker(A). The null space is a subspace of ℝⁿ — it is closed under addition and scalar multiplication, and it always contains the zero vector. The dimension of the null space is called the nullity of A, written nullity(A) or dim(N(A)).

Trivial vs. Non-Trivial Null Space

The null space always contains at least the zero vector (since A·0 = 0). If the null space contains only the zero vector, it is called the trivial null space, and the matrix is said to have full column rank. In this case, the matrix is left-invertible and the equation Ax = 0 has only the trivial solution x = 0. If the null space contains non-zero vectors, it is called a non-trivial null space. This means there exist multiple vectors that A maps to zero, the matrix is not injective (one-to-one), and the system Ax = 0 has infinitely many solutions. The existence of a non-trivial null space is equivalent to the matrix being rank-deficient (having rank less than n).

Connection to Linear Independence

The null space is intimately connected to linear independence of the columns of A. If the columns of A are linearly independent, then the only solution to Ax = 0 is x = 0, meaning the null space is trivial. If the columns are linearly dependent, then there exists a non-trivial linear combination of the columns that equals zero — this combination is precisely a non-zero vector in the null space. Thus, nullity(A) = 0 if and only if the columns of A are linearly independent.

How to Find the Null Space

The standard algorithm for finding the null space uses Gaussian elimination to reduce the matrix to reduced row echelon form (RREF), then identifies free variables and constructs basis vectors.

Step-by-step process:

  1. Form the augmented matrix [A | 0] (though the zero column is not strictly needed).
  2. Row reduce A to reduced row echelon form (RREF) using Gaussian elimination.
  3. Identify pivot columns (columns with leading 1s) and free columns (columns without pivots).
  4. Assign each free variable a parameter (e.g., s, t, u).
  5. Express the pivot variables in terms of the free variables using back-substitution.
  6. Write the general solution as a linear combination of basis vectors, one for each free variable.
  7. The coefficient vectors in the linear combination form a basis for the null space.

Worked Example (3 × 4 matrix):

A = | 1   2   0   1 |
      | 0   0   1   2 |
      | 1   2   1   3 |

Step 1: Row reduce to RREF. Subtract row 1 from row 3:

RREF(A) = | 1   2   0   1 |
               | 0   0   1   2 |
               | 0   0   0   0 |

Step 2: Identify pivots and free variables. Pivots are in columns 1 and 3 (corresponding to x₁ and x₃). Free variables are x₂ and x₄.

Step 3: Express pivot variables in terms of free variables. From row 1: x₁ + 2x₂ + x₄ = 0, so x₁ = −2x₂ − x₄. From row 2: x₃ + 2x₄ = 0, so x₃ = −2x₄.

Step 4: Write the general solution. Let x₂ = s and x₄ = t. Then:

x = | −2s − t |    = s | −2 |    + t | −1 |
     |     s    |       |  1   |       |  0   |
     | −2t    |       |  0   |       | −2   |
     |     t    |       |  0   |       |  1   |

A basis for the null space is { [−2, 1, 0, 0]T, [−1, 0, −2, 1]T }. The nullity is 2, which equals the number of free variables. This matches the rank-nullity theorem: rank(A) = 2 (two pivots) and nullity(A) = 2, so 2 + 2 = 4 = n.

Properties of the Null Space

Subspace Property

The null space is always a subspace of ℝⁿ. If x and y are in N(A), then A(x + y) = Ax + Ay = 0 + 0 = 0, so x + y is in N(A). If x is in N(A) and c is a scalar, then A(cx) = c(Ax) = c·0 = 0, so cx is in N(A). The zero vector is always in N(A) since A·0 = 0. This subspace property means we can talk about its dimension, basis, and complement.

Nullity and Free Variables

The nullity equals the number of free variables in the RREF of A, which equals the number of columns without pivots. For an m × n matrix, the nullity ranges from 0 (full column rank) to n − r where r = rank(A). The nullity provides a measure of redundancy: each dimension in the null space represents one "degree of freedom" in choosing solutions to Ax = 0.

The Rank-Nullity Theorem

rank(A) + nullity(A) = n    (where n is the number of columns)

This theorem, also called the dimension theorem, is one of the most fundamental results in linear algebra. It connects the column space (image) and null space (kernel) of a matrix through their dimensions. The rank counts the number of linearly independent columns (the "useful" dimensions), while the nullity counts the number of redundant columns (the "wasted" dimensions). Together, they account for all n columns. The rank-nullity theorem also applies to the transpose: rank(A) = rank(AT), so rank(A) + nullity(AT) = m.

Applications

Solving Homogeneous Systems

The most direct application of the null space is solving the homogeneous system Ax = 0. Every solution to this system is a vector in the null space, and the general solution is a linear combination of the null space basis vectors. This is essential in differential equations (solving linear ODE systems), control theory (finding steady-state solutions), and structural engineering (determining modes of vibration). The null space basis gives a complete and minimal description of all possible solutions.

Checking Invertibility

A square matrix is invertible if and only if its null space is trivial (contains only the zero vector). Equivalently, A is invertible if and only if nullity(A) = 0, which by the rank-nullity theorem is equivalent to rank(A) = n. If the null space is non-trivial, the matrix is singular (not invertible) and the columns are linearly dependent. This provides a computational test for invertibility that is often more efficient than computing the determinant.

Connection to Singular Value Decomposition (SVD)

The singular value decomposition (SVD) of A = UΣVT reveals the null space directly: the columns of V corresponding to zero singular values form an orthonormal basis for N(A). This is one of the most numerically stable ways to compute the null space, especially for ill-conditioned matrices. The SVD also shows that the null space is orthogonal to the row space: N(A) ⊥ row(A), and ℝⁿ = row(A) ⊕ N(A). This orthogonal decomposition is the foundation for pseudoinverse computation and least squares approximation.

Differential Equations and Dynamical Systems

In the study of linear dynamical systems ẋ = Ax, the null space of A contains the equilibrium points (where ẋ = 0). For discrete-time systems xk+1 = Axk, the null space of (A − λI) is the eigenspace corresponding to eigenvalue λ. In partial differential equations, the null space of a differential operator (its kernel) represents the space of solutions to the homogeneous equation, which forms the foundation for Green's functions and fundamental solutions.

Common Mistakes to Avoid

  • Confusing the null space with the column space. The null space N(A) is a subspace of ℝⁿ (the domain), while the column space C(A) is a subspace of ℝᵐ (the codomain). They live in different spaces and measure different things.
  • Forgetting to row reduce completely. Partial row reduction may leave you with a system that is not in RREF, making it difficult to identify all free variables and express pivot variables correctly. Always reduce to full RREF.
  • Assuming the null space is always non-trivial. For a square invertible matrix, the null space is trivial. Only rank-deficient matrices have non-trivial null spaces. Do not assume every matrix has an interesting null space.
  • Miscounting the nullity. The nullity is the number of free variables, not the number of zero rows in the RREF. Zero rows indicate that the matrix is rank-deficient, but the nullity equals the number of non-pivot columns.
  • Confusing the null space of A with the null space of AT. The null space of A (left null space of AT) and the null space of AT (left null space of A) are different subspaces of ℝⁿ and ℝᵐ respectively. They are orthogonal complements of the column space and row space.
  • Ignoring numerical stability. For floating-point computations, Gaussian elimination may produce inaccurate results due to round-off errors. For numerical applications, the SVD-based approach is preferred for computing null spaces.

Frequently Asked Questions

What is the null space of the identity matrix?

The identity matrix In has a trivial null space containing only the zero vector. Since Ix = x, the equation Ix = 0 has only the solution x = 0. This is expected because the identity matrix has full rank (rank = n) and is invertible.

Can the null space contain a single non-zero vector?

Yes. If the nullity is 1, the null space is a one-dimensional subspace (a line through the origin) spanned by a single non-zero vector. This occurs when the matrix has exactly one free variable, meaning rank(A) = n − 1.

How does the null space relate to eigenvalues?

The null space of (A − λI) is the eigenspace corresponding to eigenvalue λ. If λ = 0 is an eigenvalue of A, then the null space of A is the eigenspace for λ = 0, and its dimension is the geometric multiplicity of the eigenvalue 0. A matrix is invertible if and only if 0 is not an eigenvalue.

What is the difference between the null space and the left null space?

The null space of A is {x : Ax = 0} (a subspace of the domain ℝⁿ). The left null space of A is {y : yTA = 0} = null space of AT (a subspace of the codomain ℝᵐ). The left null space is the orthogonal complement of the column space: N(AT) = C(A).

Is the null space unique?

The null space itself (as a set) is unique for a given matrix. However, its basis is not unique — any set of linearly independent vectors that spans the same subspace is a valid basis. The standard algorithm using RREF produces one particular basis, but other bases (e.g., from SVD) are equally valid.

Conclusion

The null space is a window into the structure of a matrix. It tells you how many solutions a homogeneous system has, whether a matrix is invertible, and how the domain is partitioned by a linear transformation. The rank-nullity theorem provides the essential link between the null space and the column space, giving a complete picture of a matrix's algebraic behavior. Whether you are solving systems of equations, analyzing dynamical systems, or computing pseudoinverses with the SVD, understanding the null space is indispensable. Compute null spaces instantly with our Null Space Calculator. For related operations, explore our Row Echelon Form Calculator, Matrix Rank Calculator, and Matrix Inverse Calculator.