Rank–Nullity Formula and Meaning
Rank
rank(A) = number of pivotsRank is the dimension of both the column space and the row space.
Nullity
nullity(A) = number of free columnsNullity is the dimension of the solution space of the homogeneous system Ax = 0.
Rank–nullity theorem
rank(A) + nullity(A) = nFor an m × n matrix, the sum equals n, the number of columns—not generally the number of rows.
How to Use the Matrix Rank and Nullity Calculator
- Select the matrix's row and column counts, then enter every value or paste a complete rectangular matrix.
- Choose a relative pivot tolerance. The standard setting is appropriate for most ordinary decimal inputs.
- Select Calculate rank and nullity.
- Review the rank–nullity identity, RREF, pivot and free columns, and bases. Column numbers are counted from 1.
Worked 3×4 Example
The default matrix has columns c₂ = 2c₁ and c₄ = c₁ − c₃, so only two columns are independent.
Matrix
A = [[1,2,1,0], [2,4,0,2], [3,6,1,2]]RREF
[[1,2,0,1], [0,0,1,−1], [0,0,0,0]]Result
rank(A) = 2, nullity(A) = 2Columns 1 and 3 are pivots. Columns 2 and 4 are free, producing the null-space basis vectors (−2, 1, 0, 0) and (−1, 0, 1, 1).
How to Interpret Rank and Nullity
A matrix has full column rank when its rank equals its number of columns; then its nullity is zero and Ax = 0 has only the zero solution. It has full row rank when its rank equals its number of rows. A matrix can have both only when it is square and nonsingular.
Pivot columns from the original matrix form a column-space basis. Nonzero rows of RREF form a convenient row-space basis. One null-space basis vector is constructed for each free variable.
Matrix Rank and Nullity FAQs
What is matrix rank?
Rank counts independent columns, independent rows, or pivots—these three counts are always equal. Rank cannot exceed the smaller of the row and column counts.
What is matrix nullity?
Nullity is the number of independent directions sent to zero by the matrix. It equals the number of free variables in Ax = 0.
Does rank plus nullity equal rows or columns?
It equals the number of columns. An m × n matrix maps vectors from Rⁿ, and rank plus nullity equals the dimension n of that domain.
Can this calculator handle rectangular matrices?
Yes. It accepts any rectangular size from 1×1 through 8×8, including wide matrices that must have positive nullity and tall matrices that may have full column rank.
Why does the column-space basis use the original matrix?
Row operations preserve row relations but generally change the column space. RREF identifies which column positions are pivots; the basis vectors must then be taken from those positions in the original matrix.
Why can changing tolerance change rank?
Numerical rank depends on what counts as indistinguishable from zero. A looser tolerance treats more small pivots as zero; exact-zero mode accepts every nonzero floating-point pivot and can magnify roundoff.
Are my matrix entries private?
Yes. The page calculates, copies, and creates downloads locally. Its calculator code does not transmit or save entered matrix values.
Calculation Notes
Last reviewed: August 5, 2026 by the Starlight Tools editorial team.
All displayed bases correspond to the numerical pivot decisions made at the selected tolerance. The residual shown in copied and downloaded results is the largest absolute entry of Av across the computed null-space basis vectors.
