Matrix Null Space Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

Introduction: What this matrix null space calculator computes

The null space of the matrix you enter is the set of all vectors that the matrix sends to the zero vector. If we denote our matrix by A, then the null space is the set {x|Ax=0}. In kernel language, that same set can be written as ker(A)={x|Ax=0}. These vectors are the directions that disappear under the linear transformation, so the calculator is really searching for every input direction that is wiped out by the matrix.

The dimension of the null space is called the nullity. For a matrix with n columns, the rank-nullity theorem states that rank(A)+nullity(A)=n. For this 3x3 calculator, that means a full-rank matrix has nullity zero, while every missing pivot creates one more free variable. A compact way to say the same thing is nullity(A)=3-rank(A). A drop in rank is exactly what makes a nontrivial kernel appear.

Computing the null space means solving a homogeneous system. The standard route is to apply row operations to bring the matrix into reduced row echelon form (RREF). Row operations are legal manipulations—swapping rows, scaling them, or adding multiples of one row to another—that preserve the solution set of the system Ax=0. Once in RREF, the pivot columns and free columns are easy to read, which makes the kernel basis visible instead of hidden.

In this calculator the matrix is limited to three columns, so the basis vectors always live in 3-dimensional space. If one column is free, the result is a one-vector basis; if two columns are free, two basis vectors are listed. Each free variable is set to one in turn while the others are set to zero, and the resulting vectors span the entire null space.

Connection to 3×3 linear systems and dependent columns

When solving a nonhomogeneous system Ax=b, the null space determines whether solutions are unique. If the kernel contains only the zero vector, there is no room to add a hidden direction and the solution is unique once found. If the kernel has positive dimension, then any particular solution can be shifted by a null-space vector and still satisfy the same right-hand side. One convenient way to write that is x=xp+z, where the correction vector lives in the kernel.

The same idea shows up in constrained models. Whenever one equation is a combination of others, the null space exposes the directions that the equations fail to pin down. If the matrix is singular, then det(A)=0, which is another signal that a nontrivial kernel exists. In applications, that information is useful for reducing redundancy, checking whether a matrix really has independent columns, and seeing where a model has built-in freedom.

Rank-Nullity in a 3x3 Matrix

For a 3x3 matrix, rank and nullity always add up to three. A rank of three means there are three pivots and no free variables, so the null space is trivial. A rank of two leaves one free variable and therefore one basis vector. In general, the size of the kernel is the same as dim(ker(A)). A rank of one leaves two free variables and a two-dimensional kernel, while a rank of zero sends every vector to zero. The calculator uses the entered values to identify which of those cases applies.

Geometrically, the null space tells you which directions disappear under the transformation represented by the matrix. If a matrix behaves like a projection, the vectors that point along the collapsed direction are exactly the vectors the calculator lists as basis vectors. That geometry is why the null space is so useful: it tells you what information the matrix destroys, not just what it preserves.

Formula: Row-Reduction Steps for the Null Space

Behind the scenes the calculator uses the same Gauss-Jordan elimination routine you would use by hand on a 3x3 matrix. It searches each column for a pivot, normalizes the pivot row, and clears the rest of the column so the matrix moves toward RREF. A column without a pivot becomes free, and each free column becomes a parameter in the final null-space basis. The table below shows an illustrative elimination path, not a second calculator mode.

Step Row Operation Resulting Matrix
1 Start with 1 2 -1 2 4 2 -1 0 5 Initial matrix
2 R 2 2 R 1 1 2 -1 0 0 4 -1 0 5
3 R 3 + R 1 1 2 -1 0 0 4 0 2 4

The table illustrates how row operations preserve the null space while simplifying the matrix. Once the pivots are isolated, the calculator can read the free-variable pattern directly and turn it into basis vectors. In larger problems the same logic still applies, but this page keeps the workflow transparent by limiting the input to a 3x3 matrix.

Interpreting the Null-Space Output

When the calculator lists basis vectors, each one is an independent kernel direction. Any null-space vector can be written as a linear combination of those directions, so the output is really a compact description of every solution to Ax=0. If no vectors are listed, the null space is trivial and only the zero vector solves the homogeneous system. That empty list is the signal that the matrix has full rank.

Because the page works with floating-point arithmetic, tiny roundoff values can appear during elimination. To keep the output readable, values with magnitude below 1010 are treated as zero. That helps the calculator ignore numerical noise, but a matrix that is nearly singular can still be sensitive to how the inputs are written. If you expect an exact dependency, double-check the entries before interpreting the basis.

Applications of matrix null spaces and kernel basis vectors

The null space appears anywhere a matrix describes something that can lose directions. In computer graphics, it can describe motion that leaves a shape unchanged. In electrical engineering, it can reveal currents that circulate without changing a node balance. In statistics, it can expose parameter combinations that the data cannot separate. Those are all different stories, but the same null-space calculation explains each one. A vector belongs to that invisible direction set exactly when vker(A).

Beyond 3x3 matrices, the null space can also be found with singular value decomposition. In that approach, the right singular vectors associated with zero singular values span the kernel. This calculator uses row reduction instead because the steps are easy to inspect, which is helpful when you want to understand why the basis vectors appear rather than just seeing them. For exact algebra on larger systems, SVD and other decompositions offer stronger numerical tools.

Studying null spaces also opens the door to quotient spaces, exact sequences, and differential operators. In control theory, for example, null spaces help describe directions a controller cannot influence. In differential equations, they characterize homogeneous solutions. Even if you never leave elementary matrix algebra, learning to read a null space builds intuition about dependency, redundancy, and what a linear map erases.

How to use this matrix null space calculator for a 3x3 matrix

  1. Enter the first row of the 3x3 matrix in a 11, a 12, and a 13.
  2. Enter the second row in a 21, a 22, and a 23 so the columns line up correctly.
  3. Enter the third row in a 31, a 32, and a 33.
  4. Run the calculation once, then change one entry or one row and run it again to see how the pivot pattern and basis vectors change.

Worked example: one missing pivot in a 3x3 null-space solve

Suppose one column of the matrix is a combination of the other two. The calculator will then find fewer pivots than columns, and the missing pivot becomes a free variable. In that situation the null space is nontrivial, so the output contains at least one basis vector. If two columns are dependent, the kernel grows larger; if all three columns are independent, the result collapses to the zero vector. This is the quickest way to tell whether the matrix is hiding a redundancy.

Limitations and assumptions for this 3x3 null-space calculator

This tool works with decimal numbers in the browser and treats values whose absolute size is below 1010 as zero during elimination. That makes ordinary calculations easy to read, but matrices that are nearly singular can still be sensitive to rounding. Because the calculator is limited to 3x3 input, it reports a kernel basis for three variables only; it does not perform symbolic simplification or exact rational arithmetic. If an entry is supposed to cancel exactly, make sure it was typed correctly before you rely on the displayed basis vectors.

Matrix entries
Enter matrix entries.

Arcade Mini-Game: Matrix Null Space Pivot Practice

Use this quick arcade run to practice spotting pivots, free columns, and the entries that actually shape a matrix null-space basis before you rely on the calculator output.

Score: 0 Timer: 30s Best: 0

Start the game, then use your pointer or arrow keys to catch helpful matrix entries and avoid values that do not belong in the kernel.