Get in touch

Contact Form Demo

Null Space Calculator

Find the Basis for the Null Space (Kernel) with Detailed Steps

$$ A = \begin{bmatrix} 1 & 2 & -1 \\ 2 & 4 & -2 \\ -1 & -2 & 1 \end{bmatrix} $$
Matrix (Enter Coefficients)
Format: Space separated. New line for each row.
Examples:
1
2
3
4
5
6
,
7
8
9
0
Space
Enter
CLR
Basis for Null Space
Visual Representation (3D)
Step-by-Step Solution
👨‍🏫
By Prof. David Anderson
Professor of Mathematics | 20+ Years Teaching Experience
“In my linear algebra lectures, I often compare the Null Space (or Kernel) to the ‘blind spot’ of a transformation. It represents all the vectors that disappear into the origin. Students frequently struggle with the algorithm: converting to RREF and identifying free variables. I built this Null Space Calculator to automate the Gaussian elimination and visualize the solution space.”

The Ultimate Null Space Calculator Guide: Basis, Kernel, and RREF Algorithms

A Deep Dive into Homogeneous Systems ($A\mathbf{x} = \mathbf{0}$), Rank, and Linear Independence
Key Takeaways for Students
  • The Null Space (denoted $\text{Nul}(A)$ or $\ker(A)$) is the set of all vectors $\mathbf{x}$ such that $A\mathbf{x} = \mathbf{0}$.
  • To find the basis, you must compute the Reduced Row Echelon Form (RREF) and identify the Free Variables.
  • The dimension of the null space is called the Nullity.
  • The Rank-Nullity Theorem states: $\text{Rank} + \text{Nullity} = \text{Number of Columns}$.

Welcome to the definitive guide on the Matrix Null Space. Whether you call it the Null Space, the Kernel, or simply the solution to the homogeneous equation, this concept is fundamental to Linear Algebra and vector space theory.

Geometrically, the Null Space represents the “collapsed” dimensions of a matrix transformation—everything in the Null Space gets mapped to the zero vector. Our free Null Space Calculator above uses advanced Gaussian Elimination to find the basis vectors and visualizes this subspace in 3D (if dimensions allow).

1. What is Null Space? (Formal Definition)

Definition: The Kernel (Null Space)

For an $m \times n$ matrix $A$, the Null Space (or Kernel) is the set of all vectors $\mathbf{x}$ in $\mathbb{R}^n$ that satisfy the homogeneous linear equation:

$$ A\mathbf{x} = \mathbf{0} $$

Ideally, we want to find a Basis for Null Space—a minimal set of linearly independent vectors that span the entire kernel. The number of these vectors is the Nullity.

2. Comparison: Null Space vs. Column Space

It is crucial to distinguish between these two fundamental subspaces when using a Null Space Calculator.

Feature Null Space ($\text{Nul } A$) Column Space ($\text{Col } A$)
Location Subspace of $\mathbb{R}^n$ (Domain) Subspace of $\mathbb{R}^m$ (Codomain)
Equation Solutions to $A\mathbf{x} = \mathbf{0}$ Linear combinations of columns
Dimension Nullity ($n – r$) Rank ($r$)
Geometric Meaning Vectors mapped to zero Range of the transformation

3. The Algorithm: How to Find the Null Space

Our Null Space Calculator follows a strict 4-step algorithm based on Gaussian Elimination. You should memorize this for your exams.

Step-by-Step Procedure Algorithm
  • Row Reduce to RREF: Use Gaussian Elimination to convert the matrix $A$ into Reduced Row Echelon Form.
  • Identify Variables:
    • Pivot Columns: Correspond to Basic Variables (Constrained).
    • Non-Pivot Columns: Correspond to Free Variables.
  • Write Equations: Express each Basic Variable in terms of the Free Variables.
  • Parametric Vector Form: Decompose the general solution $\mathbf{x}$ into a linear combination of vectors, with free variables as weights. These vectors form the Basis for the Null Space.

4. Detailed Example: Finding the Kernel of a 3×4 Matrix

Let’s solve for the null space of the matrix $A$ manually to understand the output of the Null Space Calculator.

$$ A = \begin{bmatrix} 1 & -1 & 2 & 3 \\ 2 & -2 & 5 & 4 \\ 1 & -1 & 2 & 3 \end{bmatrix} $$

Step 1: RREF
After row reduction operations ($R_2 – 2R_1$, etc.), we get:

$$ \text{RREF}(A) = \begin{bmatrix} 1 & -1 & 0 & 7 \\ 0 & 0 & 1 & -2 \\ 0 & 0 & 0 & 0 \end{bmatrix} $$

Step 2: Identify Variables
Pivots are in columns 1 and 3 ($x_1, x_3$ are basic).
No pivots in columns 2 and 4 ($x_2, x_4$ are free).

Step 3: Write Solution
$$ x_1 – x_2 + 7x_4 = 0 \implies x_1 = x_2 – 7x_4 $$ $$ x_3 – 2x_4 = 0 \implies x_3 = 2x_4 $$

Step 4: Basis
$$ \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = x_2 \begin{bmatrix} 1 \\ 1 \\ 0 \\ 0 \end{bmatrix} + x_4 \begin{bmatrix} -7 \\ 0 \\ 2 \\ 1 \end{bmatrix} $$ The basis vectors are $\langle 1, 1, 0, 0 \rangle$ and $\langle -7, 0, 2, 1 \rangle$. The Nullity is 2.

5. The Rank-Nullity Theorem

This theorem connects the dimensions of the fundamental subspaces. It is a powerful tool to check the results from our Kernel of Matrix Calculator.

$$ \text{Rank}(A) + \text{Nullity}(A) = n $$
Where:
• $n$ is the number of columns (variables).
• Rank is the number of Pivot columns.
• Nullity is the number of Free columns (dimension of the Null Space).

6. Frequently Asked Questions (FAQ)

What if there are no free variables?
If every column has a pivot, there are no free variables. The only solution to $A\mathbf{x}=\mathbf{0}$ is the zero vector $\mathbf{0}$. The Null Space is the trivial subspace $\{\mathbf{0}\}$, and the Nullity is 0.
Can the Null Space be empty?
No. The Null Space always contains at least the zero vector $\mathbf{0}$, because $A\mathbf{0}$ is always $\mathbf{0}$. It is never an “empty set”.
Is the Basis for Null Space unique?
No. There are infinitely many bases for a subspace. However, the dimension (Nullity) is unique. Our calculator provides the “standard” basis derived directly from RREF.

References & Further Reading

  • Strang, G. (2016). Introduction to Linear Algebra (5th ed.). Wellesley-Cambridge Press. (Chapter 3: Vector Spaces).
  • Lay, D. C. (2021). Linear Algebra and Its Applications (6th ed.). Pearson. (Section 4.2: Null Spaces).
  • Khan Academy. “Null space and column space.” https://www.khanacademy.org/

Find the Basis Instantly

Stop doing row reduction by hand. Use our free Null Space Calculator to get the RREF, identify free variables, and find the exact basis vectors for the kernel of any matrix.

Launch Null Space Solver