Skip to content
CalculatorZilo Logo
  • Home
  • CalculatorsExpand
    • Finance
    • Math
    • Health & Fitness
    • Education
    • Science
    • Real Estate
    • Chemistry
  • About Us
  • Contact Us
CalculatorZilo Logo
Home / Basis For Null Space Calculator
Education Calculators

Basis For Null Space Calculator

Published onMay 13, 2026 Updated onOctober 19, 2026 4:11 pm

The null space of a matrix is the set of all vectors that the matrix sends to zero, and a basis for it is the compact list of vectors that generates the whole set. Every linear algebra course asks you to find one, and the hand computation, row reduction, pivot hunting, and back-substitution, is where most of the marks are lost to arithmetic slips rather than conceptual errors.

The Basis for Null Space Calculator below does the full job: enter any matrix up to 4×4, and it row-reduces it, identifies the free variables, and hands you the basis vectors, the nullity, and the rank. It uses exact rational arithmetic where the numbers are clean, so you get (1, −2, 1) instead of (0.9999999, −2.0000001, 1).

Basis for Null Space Calculator
Row-reduce any matrix up to 4×4 and read off the basis vectors
Basis for the null space
0
Nullity (dimension of null space)0
Rank of the matrix0
Rank + nullity check0
Vectors are scaled to clean integers when the arithmetic is exact. An all-zero row set, or the identity matrix, has the trivial null space containing only the zero vector.

Quick Answer

Quick answer: Row-reduce the matrix to RREF, mark the free variables (columns without pivots), and set each free variable to 1 in turn while solving for the pivot variables. For the matrix [[1, 2, 3], [4, 5, 6]], the only free variable is x3, giving the basis vector (1, −2, 1), so the nullity is 1 and the rank is 2.

Key takeaways

  • The null space is the solution set of Ax = 0. Its basis has one vector per free variable.
  • Free variables are the columns without pivots after row reduction. Each becomes 1 in its own basis vector, 0 in the others.
  • Rank + nullity = number of columns (the rank-nullity theorem). The calculator checks this on every run.
  • The identity matrix has a trivial null space: only the zero vector, nullity 0.
On this page
  • Quick Answer
  • What a basis for the null space actually is
  • The algorithm, step by step
  • Worked example, checked against this exact tool
  • What competing null-space tools get wrong
  • Frequently asked questions
  • Add This Calculator to Your Website
  • References

What a basis for the null space actually is

The null space of a matrix A, written Null(A), is the set of all vectors x with Ax = 0. That set is a subspace, and like every subspace it can be described by a basis: a minimal set of linearly independent vectors whose span is the whole space. So finding a basis for the null space means answering “how many independent directions does the solution set of Ax = 0 have, and which ones?”

The procedure is mechanical, which is exactly why it is worth automating: row-reduce A to reduced row echelon form, identify the pivot columns, and treat every non-pivot column as a free variable. For each free variable, set it to 1 (and the other free variables to 0), then read the pivot variables off the reduced equations. Each choice produces one basis vector, and the number of basis vectors is the nullity of A.

The algorithm, step by step

The calculator follows the standard textbook method, which every linear algebra text from De Anza’s course notes to Margalit and Rabinoff’s Interactive Linear Algebra teaches the same way:

1

Row-reduce to RREF. Use Gaussian elimination with partial pivoting (swapping in the largest available entry) to reach reduced row echelon form. Pivoting keeps the arithmetic stable and the output clean.

2

Mark pivot and free columns. Every column containing a leading 1 is a pivot column; every other column is free. The count of free columns is the nullity, and it equals the number of free variables.

3

Build one basis vector per free variable. Set the free variable to 1 (others to 0) and solve for the pivot variables from the reduced rows. The resulting vector is one basis vector.

4

Verify with rank-nullity. Rank (pivot columns) plus nullity (free columns) must equal the total number of columns. The calculator displays this check on every result.

The core relation: nullity(A) = number of columns without pivots, and rank(A) + nullity(A) = n for an m×n matrix. The basis vectors are the parametric solutions of the homogeneous system Ax = 0.

Worked example, checked against this exact tool

Enter the pre-filled defaults (the 2×3 matrix [[1, 2, 3], [4, 5, 6]]) and click Calculate. Here is what happens, verified against the underlying code:

StepDetail
RREF[[1, 0, −1], [0, 1, 2]]
Pivot columns1 and 2 (rank 2)
Free variablex3 (nullity 1)
Basis vector(1, −2, 1)
Rank-nullity check2 + 1 = 3 columns

Sanity check by hand: A × (1, −2, 1) = (1 − 4 + 3, 4 − 10 + 6) = (0, 0). The vector is genuinely in the null space, and since there is exactly one free variable, it alone spans the whole null space.

Watch the edge cases. The identity matrix has no free variables, so its null space is trivial (only the zero vector). A zero row, or a row that is a combination of others, creates extra free variables. Try [[1, 2, 3], [2, 4, 6]] and you will get two basis vectors: (−2, 1, 0) and (−3, 0, 1).

What competing null-space tools get wrong

We tested the popular null-space calculators before building this page. The gaps are real.

Fractional garbage. Several tools print (0.99999999, −2.00000001, 1.00000002) because they divide by pivots with no cleanup. This one rounds and snaps near-zero values to 0, so textbook answers come out as textbook answers.

No rank-nullity check. Competing tools show the basis but never confirm it. The rank + nullity = columns row on every result is a free correctness check that catches wrong pivot detection instantly.

Hidden pivot logic. Most tools never show which columns are pivots, so when the answer looks odd you cannot tell why. The rank and nullity rows make the free-variable structure explicit.

Trivial cases crash or confuse. Several calculators error out or show empty results for the identity matrix or a zero row. This one reports the trivial null space plainly.

Frequently asked questions

The null space of an m×n matrix A is the set of all vectors x in Rⁿ with Ax = 0, the solution set of the homogeneous system. It is always a subspace of Rⁿ, and it always contains the zero vector.

Row-reduce A to reduced row echelon form. The columns without pivots are the free variables. For each free variable, set it to 1 (and the other free variables to 0), solve for the pivot variables from the reduced equations, and collect the resulting vector. The set of these vectors is the basis.

Nullity is the dimension of the null space: the number of vectors in any basis for it, equivalently the number of free variables (columns without pivots). The rank-nullity theorem says rank + nullity = number of columns.

The trivial null space contains only the zero vector, so its nullity is 0. This happens exactly when every column has a pivot, for example the identity matrix, or any square matrix with full rank. It means Ax = 0 has only the solution x = 0.

Yes, one vector per free variable. The 2×3 matrix [[1, 2, 3], [2, 4, 6]] has two free variables, so its basis is {(−2, 1, 0), (−3, 0, 1)} and its nullity is 2. Wider matrices (more columns than rows) always have at least one free variable.

No. The nullity is fixed, but the specific basis vectors are not: any set of nullity-many linearly independent vectors spanning the null space is a valid basis. The calculator returns one standard choice (free variables set to 1 in turn), which is the form textbooks expect.

Add This Calculator to Your Website

Embed the Basis for Null Space Calculator on your own site. Pick a size to preview it live, then copy the code.

Powered by Calculator Zilo

References

  1. De Anza College, “4.7: Row, Column, and Null Spaces” (Mathematics LibreTexts) – null space as a span of basis vectors, nullity as the dimension of the null space, with a worked parametric example. LibreTexts: Row, Column, and Null Spaces. Accessed October 19, 2026.
  2. Margalit and Rabinoff, “2.8: The Rank Theorem” (Interactive Linear Algebra, Mathematics LibreTexts) – rank-nullity theorem: rank(A) + dim Nul(A) = number of columns, with definitions of rank and nullity. LibreTexts: The Rank Theorem. Accessed October 19, 2026.
  3. Mission College, “5.5: The Rank Theorem” (Mathematics LibreTexts) – rank as the number of pivot columns, nullity as the number of free variables (columns without pivots). LibreTexts: The Rank Theorem (Mission College). Accessed October 19, 2026.

Related calculators

Education CalculatorsProbability Mean Calculator Probability and statistics play a vital role in mathematics, finance, economics, engineering, data science, and scientific research.Education CalculatorsConjugation CalculatorType a verb, pick a language and a tense, and get the full six-person conjugation table.Education CalculatorsBrute Force Calculator Password strength meters lie by omission: they check whether you used a symbol without computing what that symbol actually bought you.Education CalculatorsMean Of Distribution Calculator Give this calculator every outcome of a discrete random variable together with its probability, and it...Education CalculatorsAmp Watt CalculatorAmps tell you how much current is flowing, watts tell you how much power that flow delivers, and volts are the missing middle term that connects them.Education CalculatorsOne To One Property Calculator The One To One Property Calculator is a mathematical analysis tool designed to determine whether a function is one-to-one (injective).

CalculatorZilo

Free calculators for everything. Accurate, fast, no signup.

Categories

Finance Math Health & Fitness Education Science Real Estate Chemistry Browse all calculators

Legal

Privacy Policy Terms and Conditions Disclaimer Cookie Policy DMCA Policy

Company

About Us Contact Us FAQ Accessibility Statement

We use cookies to analyze traffic and to serve ads that keep our calculators free. You can accept or decline cookies below. Learn more

© 2026 CalculatorZilo. All rights reserved.

  • Home
  • Calculators
    • Finance
    • Math
    • Health & Fitness
    • Education
    • Science
    • Real Estate
    • Chemistry
  • About Us
  • Contact Us
Search