Null Space Calculator

Find the null space (kernel) of a matrix.
Enter a 2x2, 3x3, or 4x4 matrix and get the basis vectors for all solutions to Ax = 0.

Null Space

The null space (also called the kernel) of a matrix A is the set of all vectors x such that Ax = 0. It is a subspace of R^n whose dimension equals the nullity of A, which is n minus the rank.

If the matrix has full rank (rank = n), the null space contains only the zero vector — the equation Ax = 0 has only the trivial solution.

If the matrix is rank-deficient, the null space has one or more basis vectors, each representing a free direction in the solution space. Any linear combination of these basis vectors is also a solution to Ax = 0.

This calculator finds the null space via Gaussian elimination (RREF). After row reduction, columns without pivot entries correspond to free variables. For each free variable, set that variable to 1 and all other free variables to 0, then solve for the pivot variables by back-substitution. Each such assignment gives one null space basis vector.

Example: A = [[1,2,3],[4,5,6],[7,8,9]]. RREF reduces this to a rank-2 matrix. One free variable exists (nullity = 1). The null space basis is the vector (1, -2, 1), meaning x = t*(1,-2,1) satisfies Ax = 0 for any scalar t.

Enter the matrix as rows separated by semicolons: “1,2,3;4,5,6;7,8,9” for 3x3. The calculator shows the RREF, the rank, and each basis vector of the null space.

The null space matters in linear systems, differential equations, and least-squares problems. When fitting a model with collinear predictors, the null space of the design matrix reveals which parameter combinations are unidentifiable.


How we build and check this calculator

This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.

SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.

Embed This Calculator

Copy the code below and paste it into your website or blog.
The calculator will work directly on your page.