Null Space and Column Space Calculator

Enter a real matrix to find bases and dimensions for its null space and column space. The calculator shows RREF, pivot and free columns, basis construction, and a numerical check—all locally in your browser.

Enter Matrix A

A candidate pivot no larger than this fraction of the largest entered magnitude is treated as zero. Standard suits most ordinary decimal data.

Enter integers, decimals, or scientific notation. Display precision does not round intermediate calculations.

Put rows on separate lines and separate entries with spaces, commas, or tabs. A valid 1×1 through 8×8 paste resizes the grid.

Space Dimensions

dim Null(A)
dim Col(A)
Matrix dimensions
Rank–nullity check
Pivot columns
Free columns
Enter a valid matrix to calculate null-space and column-space bases.

Advertisement

Null-Space and Column-Space Bases

Basis for Null(A)

Independent vectors x ∈ Rⁿ satisfying Ax = 0.

Null-space basis vectors will appear here.

Basis for Col(A)

The original columns of A at the pivot positions.

Column-space basis vectors will appear here.

A numerical verification will appear after calculation.

RREF and Basis Construction

Reduced row echelon form

RREF reveals the pivot variables and free variables in Ax = 0.

Calculate a matrix to display RREF(A).

Construction steps

One null-space basis vector is created for each free variable.

Basis-construction steps will appear here.

Null Space, Column Space, and Rank–Nullity

Null space

Null(A) = {x ∈ Rⁿ : Ax = 0}

Its dimension is the number of free variables: nullity(A) = n − rank(A).

Column space

Col(A) = span{pivot columns of original A}

Its dimension is rank(A). Each column-space vector has one coordinate per matrix row.

Rank–nullity theorem

dim Col(A) + dim Null(A) = n

For an m × n matrix, the dimensions add to n, the number of columns.

Numerical method: This calculator uses Gauss–Jordan elimination with partial pivoting and JavaScript double-precision arithmetic. The selected tolerance decides which small candidate pivots count as zero. Results are numerical estimates for decimal inputs; exact symbolic software is preferable when exact algebraic dependence matters.

How to Find the Null Space and Column Space

  1. Select the row and column counts for A, then enter every value or paste a rectangular matrix.
  2. Keep the standard tolerance for typical decimal data, or change it when the scale and precision of your data require another pivot threshold.
  3. Select Find null and column spaces.
  4. Use the free columns to interpret the null-space basis. Use the pivot positions to select the basis columns from the original matrix.

Worked 3×4 Example

For the default matrix, RREF has pivots in columns 1 and 3, so columns 2 and 4 are free.

Matrix

A = [[1,2,1,0], [2,4,0,2], [3,6,1,2]]

Null-space basis

{(−2,1,0,0), (−1,0,1,1)}

Column-space basis

{(1,2,3), (1,0,1)}

The two null-space vectors correspond to the two free variables. The column-space basis uses original columns 1 and 3—not columns from RREF.

How to Interpret the Results

Null(A) lives in Rⁿ, so every null-space basis vector has n entries. If there are no free columns, the null space contains only the zero vector and its basis is empty.

Col(A) lives in Rᵐ, so every column-space basis vector has m entries. Row operations locate the pivot positions, but because row operations can change the column space, the basis must use those columns from the original matrix.

Null Space and Column Space FAQs

How do you find a basis for the null space?

Row-reduce A, identify the free variables in Ax = 0, and set one free variable at a time to 1 while all other free variables are 0. The resulting solution vectors form a basis.

How do you find a basis for the column space?

Find the pivot-column positions in RREF, then take the columns at those positions from the original matrix. Those original columns are independent and span Col(A).

Why does a null-space vector have one entry per column?

An m × n matrix multiplies vectors from Rⁿ. Therefore every input vector, including every vector in Null(A), has n coordinates.

Can the null space contain only the zero vector?

Yes. If every column is a pivot column, there are no free variables. Then Ax = 0 has only x = 0, nullity is 0, and the null-space basis is empty.

Can this calculator handle rectangular matrices?

Yes. It accepts real matrices from 1×1 through 8×8. Wide matrices necessarily have at least as many free variables as columns minus rows, while tall matrices can have full column rank.

Why can changing tolerance change the bases?

For floating-point decimal data, a tiny pivot can represent information or numerical noise. The tolerance controls when the calculator treats that pivot as zero, which can change rank, free variables, and both reported bases.

Are my matrix entries private?

Yes. Calculation, copying, and download creation happen locally. The calculator code does not transmit or store matrix entries.

Calculation Notes

Last reviewed: August 5, 2026 by the Starlight Tools editorial team.

The verification reports the largest absolute entry of Av across the displayed null-space basis vectors. All displayed spaces follow the numerical pivot decisions made at the selected tolerance.

Explore more tools