Welcome to the null space calculator, where we'll study the topic of how to find the null space of a matrix. In essence, it means finding all the vectors that are mapped to zero by the given array A. This notion comes from treating A as a linear map, and as such, the null space of a matrix is also often called the kernel of that matrix. In general, it will have infinitely many elements, so "finding all the vectors" basically means determining the basis for the null space (whose dimension we call the nullity of the matrix).
So sit back, bring along a cup of coffee, and let's get to it!
What is a matrix?
We begin our mathematical education by learning numbers, and soon enough we're told to add and subtract them. Then comes multiplication — and with it, the multiplication table: rows and columns filled with numbers. That grid is, quite literally, a matrix.
A matrix is an array of elements (usually numbers) with a set number of rows and columns. It is the main object of study in linear algebra. An example of a matrix would be:
A = [ 3 -1 ; 0 2 ; 1 -1 ]— a 3×2 matrix
We say that a matrix has cells, or boxes, into which we write the elements of our array. For example, the matrix A above has the value 2 in the cell that is in the second row and the second column. The starting point here are 1-cell matrices, which are the same thing as real numbers for all intents and purposes.
Matrices came to be when scientists decided that they needed to write a few numbers concisely and operate on the whole lot as a single object. As such, they naturally appear when dealing with:
- Systems of equations, especially with Cramer's rule;
- Vectors and vector spaces;
- 3-dimensional geometry (e.g., the dot product and the cross product);
- Linear transformations (translation and rotation); and
- Graph theory and discrete mathematics.
We can look at matrices as an extension of the numbers as we know them. After all, the multiplication table is just a simple example — in general, we can have any numbers we like in the cells: positive, negative, fractions, and decimals. The usefulness of matrices comes from the fact that they contain more information than a single value. That makes them fairly complicated objects, but it's still possible to define basic operations on them, like addition and subtraction — and to associate important values with them, such as the determinant or the rank.
Null space / kernel of a matrix
An m×n matrix A can be treated as a linear map that eats a vector x with n entries and spits out a vector Ax with m entries. The null space (or kernel) of A is the collection of every vector that this map sends to zero:
N(A) = ker(A) = { x ∈ ℝn : Ax = 0 }
Note that the zero vector 0 always satisfies A·0 = 0, so the null space is never empty — at the very least it contains the origin. It is also a vector subspace of ℝn: if u and v are both mapped to zero, then so is a·u + b·v for any scalars a and b. That is why, whenever the null space contains anything besides the origin, it automatically contains infinitely many vectors — and why we describe it by a finite basis rather than by listing its elements.
Nullity of a matrix
The nullity of A is the dimension of its null space — that is, the number of vectors in a basis of N(A). It is tied to the rank (the number of pivots, i.e. of linearly independent columns) by the rank–nullity theorem:
rank(A) + nullity(A) = n(the number of columns of A)
Two extremes are worth remembering:
- Nullity = 0 — the null space is trivial:
N(A) = {0}. The columns of A are linearly independent, and the map is injective. For a square matrix this happens exactly whendet(A) ≠ 0. - Nullity > 0 — the columns are linearly dependent, the map squashes a whole subspace down to the origin, and a square A is singular (non-invertible).
Because rank ≤ m, a wide matrix (more columns than rows, n > m) always has nullity ≥ n − m > 0 — it can never have a trivial kernel.
How to find the null space of a matrix
Solving Ax = 0 is solving a homogeneous system, and row reduction does not change its solution set. The recipe our null space calculator follows is:
- Row-reduce A to its reduced row echelon form (RREF) using Gauss–Jordan elimination. There is no need to carry a column of zeros along — the right-hand side stays zero no matter what you do to the rows.
- Identify the pivot columns (those containing a leading 1) and the free columns (all the rest). Variables in pivot columns are basic; the others are free. The count of free columns is the nullity.
- Write each basic variable in terms of the free ones, straight off the RREF rows:
xpivot = −(coefficients)·xfree. - Produce one basis vector per free variable: set that free variable to
1, all other free variables to0, and read off the basic variables. - The general element of the null space is then
x = t1v1 + … + tkvkfor arbitrary scalars ti.
If there are no free columns, step 4 produces nothing — the null space is just {0}. The calculator shows each of these stages, verifies that A·vi = 0 for every basis vector, and also offers an integer-scaled basis (fractions cleared) since any non-zero multiple of a basis vector is an equally valid basis vector.
Example: using the null space calculator
Let's find the kernel of the 3×4 matrix:
1 2 0 -12 4 1 03 6 1 -1
- Set Rows to
3and Columns to4. - Type the entries row by row into the grid.
- Hit Find null space.
- The RREF turns out to be
1 2 0 -1 ; 0 0 1 2 ; 0 0 0 0. Columns 1 and 3 are pivots; columns 2 and 4 are free — so rank = 2 and nullity = 4 − 2 = 2. - The calculator reports the basis
v1 = (-2, 1, 0, 0)andv2 = (1, 0, -2, 1), and confirms thatAv1 = Av2 = 0. Every kernel vector ist·v1 + s·v2.
Units: metric, US customary, and currencies
Finding a kernel is pure algebra, so units never change the arithmetic — a basis vector is a direction, not a quantity. But once you interpret Ax = 0 as a real-world balance condition, the entries of x do carry units. Pick one in the unit selector and set the parameter value t: the calculator then prints a concrete solution t·vi with each component labelled.
- Metric — meters, centimeters, kilograms, grams, liters.
- US customary — feet, inches, pounds, ounces, gallons.
- Currency — 20 world currencies (US dollar, Russian ruble, euro, pound, yen, yuan and more). Handy when the rows of A are constraints and x holds signed amounts of money: a null-space vector is then a set of trades that nets out to zero on every constraint. The calculator also totals the components for you.
Frequently Asked Questions
What is the null space of a matrix?
It is the set of all vectors x with Ax = 0, written N(A) or ker(A). It is a subspace of ℝn, where n is the number of columns of A, and it always contains the zero vector.
Can the null space be empty?
No. Since A·0 = 0 for every matrix, the zero vector always belongs to the kernel. The smallest possible null space is the trivial one, {0}, which has nullity 0 — but it is a one-element set, not an empty one.
What is the difference between null space and nullity?
The null space is the set of vectors killed by A; the nullity is a single number — the dimension of that set, i.e. how many vectors its basis has. Nullity 2, for instance, means the kernel is a plane through the origin.
How do I know my basis is correct?
Multiply each basis vector by A: you must get the zero vector every time. The calculator performs exactly this check and marks each product with a ✓. Also confirm the rank–nullity theorem: rank + nullity should equal the number of columns.
Is the basis unique?
No — only its size (the nullity) is. Any non-zero multiple of a basis vector, or any independent combination of them, spans the same subspace. That's why the calculator can also show an integer-scaled basis: it describes the very same null space with the fractions cleared.
Can I enter fractions or decimals?
Yes. You can type decimals like 0.5, negative numbers like -3, or simple fractions like 3/4 in any cell. Results are shown as exact fractions whenever possible.