Null Space Calculator

How many independent vectors does your matrix map to zero?

Find the null space of a matrix by entering the matrix elements. The calculator computes the basis vectors that span the kernel of your matrix.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Imagine the null space as a shadow cast by your matrix. When light shines through the matrix transformation, some vectors disappear completely into darkness — these form the null space. Unlike regular shadows that flatten 3D objects to 2D, matrix shadows can compress high-dimensional spaces into lower dimensions or eliminate them entirely.

The calculation uses Gaussian elimination to find which combinations of variables must equal zero. Picture solving a system where the right side is all zeros — you're looking for non-trivial ways to combine the columns that cancel out. Each basis vector represents an independent way to achieve this cancellation.

The process systematically identifies pivot columns (leaders) and free columns (followers). Free variables can take any value, while pivot variables are determined by the free ones. Each free variable generates one basis vector by setting that variable to 1 and solving for the pivot variables that make the total sum zero.

When To Use This
Right tool, right situation

Use null space calculation when analyzing homogeneous linear systems, especially in physics for finding equilibrium states or in engineering for determining degrees of freedom. Circuit analysis uses null spaces to find current loops that satisfy Kirchhoff's laws with no external voltage sources.

In data science, null space analysis reveals redundant features in datasets. If your feature matrix has a non-trivial null space, some features are linear combinations of others, indicating potential dimensionality reduction opportunities.

Avoid null space analysis for systems where you need particular solutions rather than solution structure. If you're solving Ax=b with non-zero b, focus on finding specific solutions rather than the homogeneous solution space. Also skip null space for matrices where computational precision matters more than theoretical structure.

Common Mistakes
Why results sometimes look wrong

The biggest mistake is confusing null space with column space. Null space vectors get mapped to zero by the matrix, while column space vectors are possible outputs. They're complementary concepts — one describes what disappears, the other what survives the transformation.

Many students incorrectly assume larger matrices have larger null spaces. A 10×10 identity matrix has null space dimension 0, while a 2×10 zero matrix has null space dimension 10. Size matters less than the relationships between rows and columns.

Another error is stopping at reduced row echelon form without constructing explicit basis vectors. The RREF shows you the structure, but you still need to build the actual vectors by setting free variables to standard unit values and solving for dependent variables.

The Math
Worked examples and deeper derivation

The null space dimension equals the number of columns minus the matrix rank, following the rank-nullity theorem. For an m×n matrix A, rank(A) + nullity(A) = n. This relationship guarantees that larger matrices don't automatically have larger null spaces.

Row reduction transforms the matrix to reduced row echelon form without changing the null space. The algorithm identifies pivot positions where leading 1s appear, determining which variables are dependent. Non-pivot columns correspond to free variables that generate the null space basis.

Each basis vector has 1 in exactly one free variable position and specific values in pivot positions to ensure Ax=0. The linear independence of basis vectors follows from their structure — no basis vector can be written as a combination of others since each has a unique free variable set to 1.

Finding null space of a 2×3 matrix with dependent rows
2×3 matrix with rows [1 2 1] and [2 4 2]
The second row is twice the first, so rank is 1. Null space dimension is 3-1=2, meaning there are 2 linearly independent vectors that satisfy Ax=0.
Identity matrix null space calculation
3×3 identity matrix with 1s on diagonal, 0s elsewhere
Identity matrix has full rank 3, so null space dimension is 0. Only the zero vector satisfies Ax=0, making this a trivial null space.
Underdetermined system with free variables
2×4 matrix representing system with more variables than equations
With 2 equations and 4 variables, expect null space dimension of at least 2. Free variables create infinite solution families to the homogeneous system.
Expert Unlock
The thing most explanations skip

Numerical stability becomes critical for near-singular matrices where small errors dramatically change null space dimension. Professional implementations use SVD decomposition rather than Gaussian elimination to identify null spaces reliably, especially when the matrix is nearly rank-deficient.

What does null space dimension tell me about my matrix?

What does it mean when null space dimension is zero?
Zero null space dimension means only the zero vector satisfies Ax=0. This indicates your matrix has full column rank and the columns are linearly independent. For square matrices, this means the matrix is invertible.
How does null space relate to solving Ax=b?
The null space gives you all solutions to the homogeneous system Ax=0. For the general system Ax=b, if you find one particular solution, you add any null space vector to get other solutions. Larger null space means more solution flexibility.
Why do I need basis vectors for the null space?
Basis vectors are the minimal set that spans the entire null space. Any vector in the null space can be written as a linear combination of these basis vectors. They provide the fundamental directions of the solution space.

Need something this doesn't cover?

Suggest a tool — we'll build it →