Null Space (Kernel) Calculator

Find the null space of a matrix via RREF with basis vectors, dimension, solution verification, step-by-step reduction, and component visualization.

Matrix A (3×3)
Rank
0
0 pivot positions found
Nullity (dim Null Space)
3
3 columns − 0 pivots = 3
Null Space
3-dimensional
3 basis vector(s) found
Rank-Nullity
0 + 3 = 3
Rank + Nullity = number of columns
Free Variables
x1, x2, x3
Columns 1, 2, 3 are free
Verification
All ✓
A·v = 0 checked for 3 vector(s)

Column Classification

x1
Free
x2
Free
x3
Free

Null Space Basis Vectors

Vectorx1x2x3A·v = 0?
v11.00000.00000.0000✓ Yes
v20.00001.00000.0000✓ Yes
v30.00000.00001.0000✓ Yes

Basis Vector Components

v1
x1
1.000
x2
0.000
x3
0.000
v2
x1
0.000
x2
1.000
x3
0.000
v3
x1
0.000
x2
0.000
x3
1.000

RREF Reduction Steps

StepOperationResult
0Original matrix[[0.000, 0.000, 0.000], [0.000, 0.000, 0.000], [0.000, 0.000, 0.000]]

RREF Result

0.00000.00000.0000
0.00000.00000.0000
0.00000.00000.0000
Green = pivot positions. Yellow = free variable columns.

Null Space Summary

PropertyValue
Null space dimension (nullity)3
Number of basis vectors3
Pivot columns
Free columns1, 2, 3
Rank + Nullity = n0 + 3 = 3
Is Ax = 0 trivial?No — ∞ solutions (3 free param)
Planning notes, formulas, and examples

About the Null Space (Kernel) Calculator

The null space (or kernel) of a matrix A is the set of all vectors x such that Ax = 0. It is a subspace of Rⁿ and its dimension, called the nullity, measures the "degrees of freedom" in the homogeneous system. Together with the rank, the nullity satisfies the rank-nullity theorem: rank + nullity = n.

Finding the null space involves reducing the matrix to reduced row echelon form (RREF) and identifying the free variables — columns without pivots. Each free variable generates one basis vector for the null space. The basis vectors are constructed by setting each free variable to 1 (and others to 0) and solving for the pivot variables using back-substitution from the RREF.

The null space has profound implications. If it is trivial (only the zero vector), the system Ax = b has at most one solution for every b, and the columns of A are linearly independent. If the null space is non-trivial, there are infinitely many solutions to Ax = 0, and the general solution to Ax = b (when consistent) has the form x = x_particular + null(A).

This calculator computes the complete null space basis via RREF, verifies each basis vector by checking Ax = 0, and visualizes the results with component bars and column classification displays.

When This Page Helps

Finding the null space requires reducing the matrix to RREF, identifying free columns, and expressing each basis vector in terms of free parameters — a multi-step process where a single row-operation error yields the wrong dimension or wrong basis. This calculator handles matrices up to 4×4 with 7 presets covering singular, underdetermined, and rank-deficient cases. It shows every RREF step, highlights pivot vs. free columns, verifies each basis vector satisfies Ax = 0, and reports rank, nullity, and the full four fundamental subspaces. Essential for understanding solution sets.

How to Use the Inputs

  1. Set the matrix dimensions and enter elements
  2. Use preset buttons for common examples (singular, underdetermined, etc.)
  3. View the nullity and basis vectors in the output
  4. Check the column classification (pivot vs free) visualization
  5. Verify that each basis vector satisfies Ax = 0
  6. Toggle RREF steps to see the full reduction process
Formula used
Null(A) = {x ∈ Rⁿ: Ax = 0}. Dimension = nullity = n − rank(A). Basis found from free columns of RREF.

Example Calculation

Result: Nullity = 1, basis vector: [1, −2, 1]

RREF reveals rank 2 with column 3 free. Setting x₃ = 1 and solving gives the basis vector [1, −2, 1]. Verify: A·[1,−2,1]ᵀ = [0,0,0]ᵀ.

Tips & Best Practices

  • A square matrix has trivial null space if and only if it is invertible
  • The null space dimension equals the number of free variables in RREF
  • Every solution to Ax = b can be written as x = x_p + v where v is in the null space
  • The null space of Aᵀ is called the left null space of A
  • For wide matrices (more columns than rows), the null space is always non-trivial

How to Find the Null Space

The null space of A is the set of all solutions to Ax = 0. To find it, row-reduce A to RREF, then identify **pivot columns** (linearly independent) and **free columns** (dependent). For each free variable, set it to 1 and all other free variables to 0, then solve for the pivot variables by back-substitution. Each configuration yields one **basis vector** of the null space. The number of basis vectors equals the nullity = n − rank(A) for an m×n matrix.

The Rank-Nullity Theorem and the Four Fundamental Subspaces

The **rank-nullity theorem** states rank(A) + nullity(A) = n (number of columns). This partitions the domain ℝⁿ into the row space (dimension = rank) and the null space (dimension = nullity), which are orthogonal complements. The range (column space, dimension = rank) and the left null space (null(Aᵀ), dimension = m − rank) complete the four fundamental subspaces introduced by Gilbert Strang. Every vector in ℝⁿ splits uniquely into a row-space component and a null-space component.

Applications of the Null Space

In **linear systems**, the null space captures all the “freedom”: if x_p solves Ax = b, then every solution is x_p + v for v in null(A). In **control theory**, the null space of the observability matrix identifies unobservable states. In **computer graphics**, the null space of a homography matrix yields the epipole. In **machine learning**, null-space projection removes bias components or enforces constraints during training. A matrix with a trivial null space (nullity = 0) is injective — it maps distinct inputs to distinct outputs.

Sources & Methodology

Last updated:

Frequently Asked Questions

  • The null space (kernel) is the set of all vectors x such that Ax = 0. It always includes the zero vector and may contain infinitely many vectors if the matrix is rank-deficient.