Math
Null Space Calculator
Enter a matrix to solve Ax = 0 and get a basis for its null space, written as exact integer vectors.
The calculator row-reduces to RREF, identifies pivot and free variables, builds one basis vector per free variable, verifies A·v = 0, and also reports bases for the column space and row space so you can see the rank-nullity theorem in action.
One row per line. Separate entries with spaces or commas. Integers, decimals, and fractions like 1/3 all work. Up to 8 x 8.
Try an example
Result
Null space basis
—
- Nullity
- —
- Rank
- —
- Column space dimension
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the null space is
The null space (or kernel) of an m x n A rectangular grid of numbers arranged in rows and columns. A is the set of all A quantity with both a size and a direction, often drawn as an arrow. x in Rⁿ with Ax = 0. It is always a subspace: it contains 0, and sums and multiples of solutions are solutions. Its dimension is the nullity, and rank + nullity = n.
How to find a basis
- Row-reduce A to reduced row echelon form.
- Columns with a pivot are pivot variables; columns without one are free variables.
- For each free variable, set it to 1 and the other free variables to 0, then read the pivot variables from the RREF rows.
- The resulting vectors form a basis. Their count is the nullity.
Null space, column space, row space
| Subspace | Lives in | Basis | Dimension |
|---|---|---|---|
| Null space N(A) | Rⁿ | One vector per free variable | nullity = n - rank |
| Column space C(A) | Rᵐ | Pivot columns of the original A | rank |
| Row space | Rⁿ | Nonzero rows of the RREF | rank |
| Left null space N(Aᵀ) | Rᵐ | Null space of the transpose | m - rank |
How to read the answer
- Null space = {0} means the columns are linearly independent and Ax = b has at most one solution.
- A nullity of k means the solution set of any consistent system Ax = b is a k-dimensional flat: one particular solution plus the null space.
- Basis vectors are scaled to small integers; any nonzero multiple works equally well.
- For the column space, use the pivot columns of A itself, never the columns of the RREF (row operations change the column space).
Common mistakes
- Reading the column space from the RREF instead of from the original matrix.
- Forgetting a free variable that has no pivot because its column is entirely zero.
- Thinking the null space is empty. It always contains the zero vector; 'trivial' means it contains only 0.
- Writing a basis vector with the free variable's sign flipped in the pivot entries; the calculator's check A·v = 0 catches this.
How to type a matrix into this calculator
- Put each row on its own line. Separate the entries in a row with spaces or commas: 2 1 1 or 2, 1, 1.
- Fractions such as 1/3 and decimals such as 0.25 are accepted and kept exact, so 1/3 stays 1/3 instead of becoming 0.3333.
- Every row must have the same number of entries. A row with a missing entry produces a clear error instead of a wrong answer.
- The largest size supported is 8 x 8. Brackets and semicolons are ignored, so [1 2; 3 4] works too.
Worked examples
3 x 4 with two free variables
A = [1 2 3 4; 2 4 6 8; 1 1 1 1] → nullity 2
Null space basis
(1, -2, 1, 0), (2, -3, 0, 1)
Trivial null space
Invertible 2 x 2 has only the zero solution
Null space basis
{0} (only the zero vector)
Rank 1 matrix
A = [1 2; 2 4] → null space spanned by (-2, 1)
Null space basis
(-2, 1)
Zero column
A = [1 0 2; 0 0 1] → y is free, null space spanned by (0, 1, 0)
Null space basis
(0, 1, 0)
Fractions
A = [1/2 1; 1/4 1/2] → null space spanned by (-2, 1)
Null space basis
(-2, 1)
Zero matrix
Every vector is in the null space: basis is the standard basis
Null space basis
(1, 0), (0, 1)
Frequently asked questions
What is the null space of a matrix in simple terms?+
All the input vectors that the matrix sends to zero. If A represents a transformation, the null space is everything that gets squashed to the origin.
How do I find the nullity?+
Count the free variables after row reduction, or use nullity = number of columns - rank.
Is the null space ever empty?+
No. It always contains the zero vector. When that is the only element the null space is called trivial and the columns of A are linearly independent.
What is the difference between null space and column space?+
The null space is the set of inputs x with Ax = 0; it lives in Rⁿ. The column space is the set of all outputs Ax; it lives in Rᵐ and is spanned by the pivot columns of A.
Why are the basis vectors integers?+
Any nonzero multiple of a null space vector is still in the null space, so the calculator scales each basis vector to the smallest integer form for readability.
How does the null space relate to solving Ax = b?+
If x_p is one solution of Ax = b, every solution is x_p + (a null space vector). So the nullity tells you how many parameters the general solution has.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
RREF Calculator
Reduce any matrix up to 8 x 8 to reduced row echelon form with every row operation shown, or enter A and b to solve Ax = b with unique, infinite (parametric), and no-solution reporting. Exact fractions throughout.
Matrix Rank Calculator
Find the rank of any matrix up to 8 x 8 by row reduction with every step shown. Reports pivot columns, nullity from the rank-nullity theorem, full-rank status, and the determinant for square matrices.
Eigenvalues and Eigenvectors Calculator
Find the eigenvalues and eigenvectors of a square matrix up to 8 x 8. Shows the characteristic polynomial, exact eigenvalues (including fractions, square roots, and complex pairs), eigenvector bases, multiplicities, and whether the matrix is diagonalizable.
Matrix Determinant Calculator
Find the determinant of any square matrix up to 8 x 8 with exact fractions. Shows cofactor expansion along any row or column for 3 x 3 (with a rule-of-Sarrus check), row-reduction steps for larger matrices, and tells you whether the matrix is invertible.
System of Equations Calculator
Solve a 2x2 linear system with elimination/determinant steps for x and y.
Matrix Inverse Calculator
Invert any square matrix up to 8 x 8 with exact fractions. Gauss-Jordan elimination on [A | I] with every row operation shown, the adjugate route for small matrices, a singular-matrix explanation, and an A·A⁻¹ = I check.
Last updated: September 4, 2026