Advanced maths

Null space basis calculator

Find an exact basis for the homogeneous solutions A x = 0 and verify rank plus nullity.

Your numbers

One row per line or semicolon. Separate entries with spaces or commas. Up to 6 rows and 6 columns; integers, decimals up to 6 places, or fractions such as -2/3. Basis vectors are columns.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your numbers and select Calculate.

Behind the numbers

How this calculation works

Reduce the coefficient matrix. Each nonpivot variable is free. Give one free variable the value 1 and the other free variables 0, then solve for the pivot variables. These independent solution vectors span the null space.

THE FORMULAA x = 0; nullity = number of columns − rank(A)

A worked example

For [1 2 3; 2 4 6], a null-space basis is (−2,1,0), (−3,0,1). The rank is 1 and nullity is 2, totaling three coefficient columns.

Good to know

Exact rational matrices up to 6 × 6. Entries are bounded to ±1,000,000, integer fraction denominators to 1,000,000 and decimal input to 6 places. Intermediate fractions have a size limit. No complex entries, symbolic expressions, measurement uncertainty or numerical-conditioning analysis. Ordered vectors are entered as matrix columns.

The null space is a space of inputs

A matrix with m rows and n columns maps n-component inputs to m-component outputs. Its null space consists of inputs that map to the zero output. Null-space basis vectors therefore have n components, even when the matrix has a different number of rows.

For A = [1 2 3; 2 4 6], the second equation duplicates the first. The remaining equation is x₁ + 2x₂ + 3x₃ = 0. Choosing x₂ and x₃ freely gives x = x₂(−2,1,0) + x₃(−3,0,1).

Every scalar combination of the displayed basis vectors is a solution, and every solution has such a combination. The basis vectors are examples of independent directions, not an exhaustive list of solutions.

Keep coefficient columns separate from constants

This is a homogeneous problem A x = 0. Supply only A, without appending a constants column. Appending a zero column would introduce an extra unknown and change the computed null space.

The number of pivot columns is the rank. The number of nonpivot columns is the nullity. Rank plus nullity equals the number of input columns; the output shows that identity as a check on dimensions.

A full-column-rank matrix has no nonzero null-space directions. Its null space still contains the zero vector, but its basis is empty. The zero vector is not a one-element basis because it is not independent.

A few questions, answered

Does a zero-dimensional null space mean there are no solutions?

No. The homogeneous system always has the zero solution. Nullity zero means that zero is the only solution.

Are these eigenvectors?

They are solutions to A x = 0. Nonzero ones are eigenvectors for eigenvalue zero when A is square; the tool does not compute other eigenvalues.

Can I solve A x = b here?

Use the linear-system solver for nonzero constants. This page specifically finds the basis of homogeneous solutions.

Find your calculator

Start typing to explore the library.