Enter one matrix entry per cell. All rows must keep the same number of columns.
Null Space and Column Space Calculator
Use this Null Space and Column Space Calculator to enter values, adjust options, and review results in a compact responsive workspace.
Results are calculated automatically as you enter data.
▼ See explanations and tips below ▼
Related Calculators
What Are Null Space, Column Space, and Row Space?
Matrices do more than store numbers. In linear algebra, a matrix can represent a system of equations, a linear transformation, or a collection of vectors. The null space, column space, and row space are three ways to describe what that matrix does.
For an \(m \times n\) matrix \(A\):
- The column space is the set of all linear combinations of the columns of \(A\). It contains every vector \(b\) for which the equation \(Ax=b\) is possible.
- The null space is the set of all vectors \(x\) that make \(Ax=0\). It shows which input directions are sent to the zero vector.
- The row space is the set of all linear combinations of the rows of \(A\). It describes the independent equation information contained in the rows.
These spaces are subspaces, which means they are closed under addition and scalar multiplication and always include the zero vector. They are connected by row reduction, pivots, free variables, rank, and nullity.
Why These Spaces Matter
Null space and column space help answer two of the most important questions about a matrix equation:
- Can \(Ax=b\) be solved?
This depends on whether \(b\) is in the column space of \(A\).
- If a solution exists, is it unique?
This depends on the null space. If the null space contains only the zero vector, then a solution to \(Ax=b\), when it exists, is unique. If the null space contains nonzero vectors, then solutions can differ by those null-space vectors.
These ideas appear throughout linear algebra. They are used to study systems of equations, linear independence, transformations, least-squares problems, matrix rank, data models, and many applied problems where the key question is whether some information is independent or redundant.
Key Terms to Know
- Span: All linear combinations that can be made from a set of vectors.
- Basis: A linearly independent set of vectors that spans a space.
- Linear independence: A set of vectors is linearly independent when none of the vectors can be built from the others.
- Reduced row echelon form (RREF): A simplified row-reduced form of a matrix where pivots are easy to identify.
- Pivot column: A column that contains a pivot position after row reduction.
- Free variable: A variable corresponding to a non-pivot column.
- Rank: The number of pivot columns. It is also the dimension of the column space and the row space.
- Nullity: The number of free variables. It is also the dimension of the null space.
- Full column rank: Rank equals the number of columns.
- Full row rank: Rank equals the number of rows.
How RREF Connects the Spaces
Row reduction is useful because it reveals the pivot structure of a matrix. Once a matrix is in RREF, the pivots show which variables are basic, which variables are free, and how many independent directions the matrix has.
For an \(m \times n\) matrix \(A\), the rank-nullity relationship is:
where \(n\) is the number of columns of \(A\).
Because each column corresponds to one variable in \(Ax=0\), every column is either a pivot column or a free-variable column. The number of pivot columns is the rank, and the number of free-variable columns is the nullity.
In practice:
- Pivot columns identify the rank.
- Pivot columns from the original matrix form a basis for the column space.
- Nonzero rows of the RREF form a basis for the row space.
- Free variables generate the null-space basis.
The most common subtle point is the column-space basis. Row reduction changes the column space of a matrix, so the column-space basis should use the pivot columns from the original matrix, not the corresponding columns from the RREF. RREF tells you which columns to choose; the original matrix supplies the actual column vectors.
Examples of Null Space and Column Space in Practice
Example 1: A Rank-Deficient Matrix
Consider the matrix:
One reduced row echelon form is:
The pivot columns are \(c_1\) and \(c_2\), so:
There are four columns total, so:
A basis for the column space uses the first two columns of the original matrix:
A basis for the row space uses the nonzero rows of the RREF:
To find the null space, read the RREF as a homogeneous system:
So:
The variables \(x_3\) and \(x_4\) are free. Therefore:
A basis for the null space is:
This example has positive nullity, so the null space contains more than just the zero vector.
Example 2: A Full-Column-Rank Matrix
Consider a \(3 \times 2\) matrix whose two columns are independent:
This matrix has two columns, and both columns are pivot columns. Its rank is \(2\), so:
That means:
The null space contains only the zero vector, so the columns are linearly independent. However, the matrix has three rows and rank \(2\), so it has full column rank but not full row rank.
Example 3: The All-Zero Matrix
For the \(2 \times 3\) zero matrix,
there are no pivot columns. Therefore:
and:
The column space is the zero subspace, the row space is the zero subspace, and every vector in \(\mathbb{R}^3\) solves \(Ax=0\). This is an important edge case because it shows that nullity is not “the number of zero rows.” Nullity is the number of free variables.
How to Interpret the Result
The rank tells you how many independent column directions the matrix has. A higher rank means more independent information. A rank of zero means the matrix has no nonzero independent column direction.
The nullity tells you how much freedom exists in the homogeneous equation \(Ax=0\). A nullity of zero means only the zero vector solves \(Ax=0\). A positive nullity means there are infinitely many solutions to \(Ax=0\), generated by the null-space basis vectors.
The pivot columns show which original columns form a basis for the column space. The free variables show which variables generate the null space. The nonzero rows of the RREF give a clean basis for the row space.
Full row rank and full column rank mean different things:
| Status | Meaning |
|---|---|
| Full column rank | Every column is a pivot column; nullity is \(0\). |
| Full row rank | Every row has a pivot; rank equals the number of rows. |
| Both full row and full column rank | Possible only for a square matrix with rank equal to its size. |
| Neither | The matrix has both row dependence and column dependence. |
A matrix can have full row rank without full column rank, or full column rank without full row rank. Always compare the rank separately to the number of rows and the number of columns.
Common Mistakes and Misconceptions
Using RREF columns as the column-space basis.
RREF identifies the pivot column positions, but the actual column-space basis comes from the original matrix.
Confusing nullity with zero rows.
Nullity counts free variables, not zero rows. In an \(m \times n\) matrix, nullity is \(n-\operatorname{rank}(A)\).
Assuming full row rank implies full column rank.
Full row rank means the rank equals the number of rows. Full column rank means the rank equals the number of columns. For non-square matrices, these are different conditions.
Forgetting that each column corresponds to a variable.
In the homogeneous system \(Ax=0\), column \(c_i\) corresponds to variable \(x_i\). Non-pivot columns correspond to free variables.
Expecting exact symbolic results from numeric input.
A numeric row-reduction tool may display decimal approximations and may treat very small values as zero. For formal proofs or exact fraction work, check results with exact algebra when needed.
Rounding too early.
Small changes in matrix entries can change whether a value is treated as zero, especially in nearly dependent matrices. Interpret results carefully when entries are very close to zero.
When to Use Null Space and Column Space
Use these ideas when you need to:
- Find whether a matrix equation \(Ax=b\) can have a solution.
- Determine whether columns of a matrix are independent.
- Find a basis for the column space, row space, or null space.
- Determine rank and nullity.
- Understand how many free variables a homogeneous system has.
- Check whether a matrix has full row rank or full column rank.
- Study the structure of a linear transformation.
- Diagnose redundancy in rows, columns, equations, or variables.
They are especially useful in linear algebra homework, exam review, matrix analysis, engineering models, statistics, data science, and any setting where matrices encode systems or transformations.
Limitations and Things to Keep in Mind
This calculation works with real numeric matrix entries. It does not handle complex-number entries, symbolic variables, or fraction expressions such as “1/2” typed as text. Decimal values are allowed, but they are treated numerically rather than symbolically.
The calculator normalizes the matrix before row reduction and uses a scale-relative floating-point tolerance for pivot detection. This means multiplying every entry by the same nonzero scale does not by itself change the estimated rank. Displayed matrix and vector entries are rounded, so the output should still be read as a numerical result rather than an exact symbolic proof.
For most classroom and exploratory work, numerical RREF is very helpful. If a candidate pivot is close to the numerical tolerance, the calculator marks the rank as tolerance-sensitive while continuing to show the estimate. For formal proofs, exact fractions, symbolic parameters, or nearly dependent matrices, double-check the result with exact arithmetic or with guidance from an instructor.
Matrices are limited to 20 rows and 20 columns, and each entry may contain up to 15 significant digits. These limits keep interactive recalculation responsive and avoid implying precision that JavaScript numbers cannot preserve.
The row-operation list may also be shortened for long reductions. If many operations are required, use the RREF, pivot columns, and basis outputs as the main interpretation tools.
How to Use This Calculator
- Enter numeric values in the matrix table.
- Add or delete rows and columns as needed.
- Optionally load an example matrix or paste matrix data with rows separated by newlines.
- Review the result summary for rank, nullity, pivot columns, free variables, and full-rank status.
- Check the RREF table to see how pivots and free variables were identified.
- Use the basis tables to read the column-space, row-space, and null-space bases.
- Remember that the column-space basis uses original matrix columns at the pivot positions.
Frequently Asked Questions
What does it mean if the nullity is zero?
Nullity zero means there are no free variables in \(Ax=0\). The only solution to the homogeneous equation is the zero vector, so the columns of the matrix are linearly independent.
Why are original columns used for the column-space basis?
Row operations usually change the column space of a matrix. RREF is used to identify which column positions are pivots, but the basis vectors for the column space must be taken from the original matrix at those pivot positions.
Do the nonzero rows of RREF form a basis for the row space?
Yes. Row operations preserve the row space, and the nonzero rows of the RREF are independent. That makes the nonzero RREF rows a convenient basis for the row space.
Is rank the same as the number of nonzero rows in RREF?
Yes, for a matrix in RREF, the rank equals the number of nonzero rows, which is also the number of pivot columns. The pivot-column view is especially useful because it connects rank to the column-space basis.
What is the difference between rank and nullity?
Rank measures the number of independent pivot directions. Nullity measures the number of free-variable directions in the solution set of \(Ax=0\). Together they add up to the number of columns of the matrix.
Can a matrix have full row rank but not full column rank?
Yes. A wide matrix can have a pivot in every row but still have free variables because it has more columns than rows. In that case it has full row rank but not full column rank.
Can I enter fractions, complex numbers, or variables?
Use decimal or integer numeric entries. Complex numbers, symbolic variables, and typed fraction expressions such as “1/2” are not supported as direct input.
Sources and References
Books and Open Textbooks
- Dan Margalit and Joseph Rabinoff. Interactive Linear Algebra. Georgia Institute of Technology, 2019. Sections 2.6 “Subspaces,” 2.7 “Basis and Dimension,” and 2.9 “The Rank Theorem.” Subspaces, Basis and Dimension, The Rank Theorem.
- David Austin. Understanding Linear Algebra. 619 Wreath Publishing and Consulting, 2023. Section 1.4 “Pivots and their influence on solution spaces.” Pivots and their influence on solution spaces.
Online Course Sources
- MIT OpenCourseWare. “Column Space and Nullspace.” 18.06SC Linear Algebra, Fall 2011, Prof. Gilbert Strang. MIT OpenCourseWare.
- MIT OpenCourseWare. “Independence, Basis and Dimension.” 18.06SC Linear Algebra, Fall 2011, Prof. Gilbert Strang. MIT OpenCourseWare.
- MIT OpenCourseWare. “Lecture 10: The Four Fundamental Subspaces.” 18.06 Linear Algebra, Spring 2010, Prof. Gilbert Strang. Lecture transcript PDF.