Null Space Calculator — Step-by-Step Solutions
The Null Space Calculator finds the null space (kernel) of a matrix by reducing it to reduced row echelon form using Gaussian elimination. It computes the null space basis vectors, nullity, and column space.
Enter a matrix of any size up to 5x5, and the calculator will identify pivot and free variables, compute basis vectors for the null space, and verify the rank-nullity theorem.
Your calculations will appear here
How to Use the Null Space Calculator
- Set the number of rows and columns of your matrix (2 to 5 of each), then type the entries into the grid. Null-space vectors have one entry per column, so a matrix with 4 columns has null-space vectors with 4 entries.
- Choose a mode: Null Space Basis lists a set of vectors that span the null space, Nullity gives only its dimension, RREF with Free Variables shows the reduced matrix with pivot and free columns, and Column Space lists a basis for the column space.
- Read the result and the row-reduction steps below it. The rank and the nullity are always shown together so you can check rank + nullity = number of columns.
- To check an answer, multiply the matrix by each basis vector. Every product should be the zero vector.
Formula and Theory
The null space (kernel) of a matrix A is the set of all vectors x with Ax = 0. It always contains the zero vector, and it is closed under addition and scaling, so it is a subspace. Solving for it is the same task as solving the homogeneous system Ax = 0.
The method is Gauss-Jordan elimination. Reduce A to reduced row echelon form (RREF). Columns that contain a leading 1 are pivot columns; the remaining columns are free. Each free variable can take any value, and each pivot variable is then determined from its row. Setting one free variable to 1 and the others to 0 gives one basis vector, so there is one vector per free column.
The dimension of the null space is the nullity, which equals the number of free columns. The rank-nullity theorem says rank + nullity = number of columns. A matrix whose null space contains only the zero vector has nullity 0, which means its columns are linearly independent.
The column space is the span of the columns. A basis is given by the pivot columns of the original matrix (not the RREF).
Worked Examples
Example 1: Null space of a rank-deficient 3x3 matrix
Problem: Find a basis for the null space of the matrix with rows (1, 2, 3), (4, 5, 6) and (7, 8, 9).
Solution: Row reduce: the RREF has rows (1, 0, -1), (0, 1, 2) and (0, 0, 0). Pivot columns are 1 and 2, and column 3 is free. Set x3 = 1: then x1 = x3 = 1 and x2 = -2 x3 = -2. Check against the original rows: 1 - 4 + 3 = 0, 4 - 10 + 6 = 0, 7 - 16 + 9 = 0.
Answer: Basis: (1, -2, 1). Rank 2, nullity 1
Example 2: Two free variables in a 2x4 matrix
Problem: Find the null space of the matrix with rows (1, 2, 1, 0) and (2, 4, 3, 1).
Solution: Subtract 2 x row 1 from row 2 to get (0, 0, 1, 1). Subtract the new row 2 from row 1 to get (1, 2, 0, -1). RREF is (1, 2, 0, -1) and (0, 0, 1, 1). Pivot columns are 1 and 3; free columns are 2 and 4. With x2 = 1, x4 = 0: x1 = -2, x3 = 0. With x2 = 0, x4 = 1: x1 = 1, x3 = -1.
Answer: Basis: (-2, 1, 0, 0) and (1, 0, -1, 1). Rank 2, nullity 2
Example 3: An invertible matrix has a trivial null space
Problem: Find the null space of the matrix with rows (2, 1) and (1, 1).
Solution: The determinant is 2 x 1 - 1 x 1 = 1, which is not zero. Row reduction gives the identity matrix, so both columns are pivot columns and there are no free variables. The only solution of Ax = 0 is x = 0.
Answer: Null space = {0}, nullity 0, rank 2
Frequently Asked Questions
What is the null space of a matrix?
How do I find the null space by hand?
What is nullity?
When is the null space just the zero vector?
Is the basis unique?
Why does the answer use columns, not rows?
Related Linear Algebra Calculators
Eigenvalue Calculator
Calculate eigenvalues and eigenvectors of matrices. Supports 2x2 and 3x3 matrices. Free online eigenvalue calculator.
Matrix Calculator
Perform matrix operations: addition, subtraction, multiplication, determinant, transpose, and RREF. Free online matrix calculator with step-by-step solutions.
Cross Product Calculator
Calculate the cross product of two 3D vectors. Find magnitude, unit vector direction, parallel check, and dot product. Free online vector calculator.
Determinant Calculator
Calculate the determinant of 2x2, 3x3, and 4x4 matrices. Step-by-step cofactor expansion with detailed workings. Free online matrix determinant calculator.
Row Echelon Form Calculator
Convert matrices to row echelon form (REF) and reduced row echelon form (RREF) with step-by-step Gaussian elimination. Find rank and pivot columns. Free online calculator.
Percentage Calculator
Calculate percentages instantly. Find what percent of a number, percentage change, and percentage difference. Free and fast.