Skip to content

Null Space Calculator

One row per line; separate entries with spaces or commas. Integers, decimals and fractions such as 3/4 work. Up to 8 × 8.

Nullity (dimension of the null space) —
Rank
—
Matrix size
—
Null space basis
—

The null space of a matrix A is every vector x with A·x = 0. Reduce A to reduced row echelon form, set each free variable to 1 in turn and read off the pivot variables. For [[1,2,3],[4,5,6],[7,8,9]] the rank is 2, the nullity is 1, and the null space is spanned by (1, -2, 1).

About this tool

Students checking homework, engineers looking for dependent columns and anyone solving a homogeneous system need the same thing: a basis for the set of x that A sends to zero. Type the matrix one row per line and the calculator row-reduces it with exact fractions, so no rounding noise creeps into the pivots. It reports the rank, the nullity (rank plus nullity always equals the number of columns), each basis vector scaled to whole numbers, and every row operation it performed. The basis it returns is the standard one built from free variables; any other basis of the same space is equally correct, so a textbook answer may look different while spanning the same subspace. Matrices are limited to 8 rows and 8 columns.

How to use it

  1. Type the matrix

    Put each row on its own line and separate entries with spaces or commas. Fractions such as -3/4 and decimals such as 0.5 are accepted.

  2. Read rank and nullity

    The headline is the nullity, the number of free variables. Rank is shown beside it; the two add up to the column count.

  3. Check the basis vectors

    The table lists one vector per free variable, multiplied through so its entries are coprime integers.

  4. Follow the row operations

    The working lists each row exchange, scaling and elimination, then the final RREF. Compare it line by line with your own reduction.

Examples

The 1–9 matrix

Matrix A
1 2 3 4 5 6 7 8 9

Result Nullity (dimension of the null space): 1
Rank: 2
Matrix size: 3 × 3
Null space basis: (1, -2, 1)

  1. Matrix A is 3 × 3. Solve A·x = 0 by reducing A to reduced row echelon form.
  2. R2 − (4)·R1.
  3. R3 − (7)·R1.
  4. R2 ÷ -3.
  5. R1 − (2)·R2.
  6. R3 − (-6)·R2.

Row three is twice row two minus row one, so the rank is 2 and one free variable gives the single basis vector (1, -2, 1).

A plane through the origin

Matrix A
1 1 1

Result Nullity (dimension of the null space): 2
Rank: 1
Matrix size: 1 × 3
Null space basis: (-1, 1, 0); (-1, 0, 1)

  1. Matrix A is 1 × 3. Solve A·x = 0 by reducing A to reduced row echelon form.
  2. RREF: [1, 1, 1]
  3. Pivot columns: x1. Free variables: x2, x3.
  4. Set x2 = 1, other free variables 0: v1 = (-1, 1, 0).
  5. Set x3 = 1, other free variables 0: v2 = (-1, 0, 1).

A single equation in three unknowns leaves two free variables, so the null space is a plane spanned by two vectors.

An invertible matrix

Matrix A
1 0 0 1

Result Nullity (dimension of the null space): 0
Rank: 2
Matrix size: 2 × 2
Null space basis: Only the zero vector

  1. Matrix A is 2 × 2. Solve A·x = 0 by reducing A to reduced row echelon form.
  2. RREF: [1, 0] [0, 1]
  3. Pivot columns: x1, x2. Free variables: none.

Every column holds a pivot, so the only solution of A·x = 0 is the zero vector and the nullity is 0.

How it is calculated

N(A) = { x : A·x = 0 }, nullity = n − rank(A)

A
the m × n matrix you entered
x
a column vector with n entries
rank(A)
number of pivot columns in the RREF
n
number of columns (unknowns)

Gauss-Jordan elimination turns A into reduced row echelon form without changing its null space. Columns with a leading 1 are pivot variables; the rest are free. For each free variable, set it to 1 and the other free variables to 0, then each pivot variable equals minus the RREF entry in that free column. The resulting vectors are linearly independent and span the null space. All arithmetic uses exact fractions, and each vector is then multiplied by the least common denominator and divided by the common factor.

When not to use it

  • Measured floating-point data needs an SVD-based numerical rank, not exact zero pivots.
  • Symbolic entries are not supported, and matrices above 8 × 8 are rejected.

Common mistakes

  • Typing columns as rows gives the left null space, which usually has a different dimension.
  • A basis that differs from the textbook's is not wrong if it spans the same subspace; a scalar multiple of a basis vector is still valid.

Frequently asked questions

What is the difference between null space and kernel?

Nothing in practice. Kernel is the name used for the linear map x ↦ A·x, null space the name used for the matrix. Both mean the set of vectors that map to the zero vector.

Why does my textbook show a different basis vector?

A subspace has infinitely many bases. A book might pick (-1, 2, -1) where this calculator shows (1, -2, 1), or combine two basis vectors differently. Check that each of your vectors satisfies A·x = 0 and that you have as many independent vectors as the nullity.

What does a nullity of 0 mean?

Every column has a pivot, so the columns are linearly independent and A·x = 0 has only the trivial solution x = 0. For a square matrix this means A is invertible and its determinant is non-zero.

How is the rank-nullity theorem used here?

For an m × n matrix, rank plus nullity equals n. The calculator counts pivot columns for the rank and free columns for the nullity, so the two numbers it shows always add up to the number of columns you entered.

Can I enter fractions and decimals?

Yes. Entries like 3/4, -2/5, 0.25 or -1.5 are converted to exact fractions before elimination, so the reduction has no rounding error. Decimals are limited to six places.

Why are the basis vectors whole numbers?

After back-substitution a vector may contain fractions such as (-3/2, 1). Multiplying by the least common denominator gives (-3, 2), which spans the same line and is easier to read and check. The working shows the unscaled vector too.

Does the null space depend on row operations?

No. Swapping rows, scaling a row by a non-zero number and adding a multiple of one row to another all preserve the solution set of A·x = 0, which is why reducing to RREF is a valid way to find it.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 24). Null Space Calculator. Tools Directory. Retrieved October 26, 2026, from https://tools.milunir.com/math/algebra-tools/null-space-calculator/

MLA

Tools Directory Editorial Team. “Null Space Calculator.” Tools Directory, 24 Oct. 2026, https://tools.milunir.com/math/algebra-tools/null-space-calculator/. Accessed 26 Oct. 2026.

Chicago

Tools Directory Editorial Team. “Null Space Calculator.” Tools Directory. Last modified October 24, 2026. Accessed October 26, 2026. https://tools.milunir.com/math/algebra-tools/null-space-calculator/.

Link<a href="https://tools.milunir.com/math/algebra-tools/null-space-calculator/">Null Space Calculator – Tools Directory</a>