The Null Space Calculator finds the set of all vectors x that satisfy Ax = 0. It outputs a basis for the null space and the dimension (how many independent directions exist).
This is the standard way to solve homogeneous linear systems, analyze constraints, and build tools for linear algebra, machine learning, and engineering.
What “Null Space” Means (and Why It Matters)
The null space of a matrix A is the set of all vectors x such that:
Ax = 0
In plain terms, it’s the set of inputs that produce zero output after the linear transformation defined by A.
- Null space answers: “Which vectors get mapped to zero?”
- Basis vectors describe the null space with the fewest independent directions.
- Nullity (dimension of the null space) tells you how many free degrees of freedom exist.
How the Calculator Works (Core Math)
To find the null space, the calculator performs Gaussian elimination to convert A into row-reduced echelon form (RREF). From that form, it identifies the free variables and builds basis vectors.
For a matrix A of size m × n, the system Ax = 0 is a homogeneous linear system. Solutions are typically infinite, forming a vector space.
Variables and Pivot Structure
After RREF:
- Pivot columns correspond to variables determined by the equations.
- Free columns correspond to variables that can be chosen freely.
Each choice of one free variable equal to 1 (and the rest 0) produces one basis vector for the null space.
Dimension (Nullity)
The dimension of the null space is the number of free variables. The calculator reports this as:
nullity = n − rank(A)
where rank(A) is the number of pivot positions found during elimination.
Inputs You Provide to the Null Space Calculator
You enter the matrix A directly. The calculator then computes a basis for all solutions to Ax = 0.
- Rows (m): number of equations.
- Columns (n): number of unknowns.
- Matrix entries: the coefficients of A.
Internally, the calculator uses a numeric tolerance to treat very small values as zero, which helps with floating-point input.
Outputs You Get
The calculator returns these main results:
| Output | Meaning |
|---|---|
| Rank | How many independent pivot constraints exist. |
| Nullity | Number of free variables (dimension of the null space). |
| Basis vectors | Vectors that span all solutions to Ax = 0. |
| General solution form | Expresses x as a linear combination of basis vectors. |
How to Use the Calculator Step-by-Step
- Choose matrix size: enter the number of rows and columns for A.
- Enter coefficients: fill in each entry of the matrix.
- Run the calculation: the calculator computes RREF, rank, and nullity.
- Read the basis: the output basis vectors span the entire null space.
- Form any solution: pick coefficients and combine basis vectors to get a specific x.
Practical Examples (Real Use Cases)
Example 1: Finding Hidden Degrees of Freedom
Suppose you have a constraint matrix A describing how variables affect an output. If you compute the null space, you find directions in variable space that do not change the output. Those directions are “invisible” to the system.
This is common in mechanics, electrical networks, and any setting where equations impose constraints.
Example 2: Building Features That Don’t Affect a Linear Model
In data science, a linear model can be written as y = Ax. If you find vectors in the null space of A, then adding those vectors to x does not change Ax, meaning the model output stays the same.
That can help with sensitivity analysis and understanding redundancy in representations.
Common Pitfalls (So Your Results Make Sense)
- Only homogeneous systems: the null space is defined for Ax = 0.
- Numerical precision: with decimals, results depend on a tolerance. Use exact fractions where possible.
- Interpretation: basis vectors span the null space, but any solution is a linear combination of them.
Frequently Asked Questions
What is the null space of a matrix?
The null space of a matrix A is the set of all vectors x that satisfy Ax = 0. It forms a vector space. Any solution x can be written as a linear combination of the basis vectors returned by a null space calculator.
How do I know how many basis vectors the null space has?
A null space calculator reports nullity, which equals the number of basis vectors. Mathematically, nullity is n − rank(A), where n is the number of columns of A. Each basis vector corresponds to one free variable in the reduced system.
Why do my results vary when I enter decimals?
Computations use floating-point arithmetic and a tolerance for “near-zero” values. Small rounding errors can change which entries are treated as zero. If you see unexpected rank or nullity, try entering exact fractions or fewer decimals, and rerun the calculation.
Is the null space basis unique?
No. Different elimination paths or tolerance choices can produce different basis vectors that still span the same null space. The calculator’s basis is valid if every returned vector satisfies Ax = 0 and the set spans all solutions.
How does the null space relate to solving linear systems?
The null space is the solution set of a homogeneous system Ax = 0. For non-homogeneous systems Ax = b, solutions exist only if b matches the column space. The null space still describes the freedom you have when solutions exist.



