Matrix Rank Calculator
Find the rank and nullity of any matrix up to 6 by 6. Enter your m by n grid and we count the pivots via Gaussian elimination.
Frequently Asked Questions about the Matrix Rank Calculator
What is the rank of a matrix?
The rank of a matrix is the number of linearly independent rows, which always equals the number of linearly independent columns. You find it by reducing the matrix to row echelon form and counting the pivots (the leading non-zero entries). A 4 by 4 matrix can have a rank from 0 (the zero matrix) up to 4 (full rank).
How does this calculator compute the rank?
It runs Gaussian elimination with partial pivoting to bring your matrix to row echelon form. For each column it picks the row with the largest absolute value as the pivot, eliminates the entries below it, and counts one pivot. The total number of pivots is the rank, and the columns that hold a pivot are listed as the pivot columns.
What is nullity and how is it related to rank?
Nullity is the dimension of the null space (the set of vectors x where Ax = 0). By the rank-nullity theorem, rank plus nullity always equals the number of columns n, so nullity = n minus rank. For a 3 by 5 matrix with rank 3, the nullity is 5 minus 3, which is 2.
What does full rank mean?
A matrix has full rank when its rank equals the smaller of its row count and column count, written min(m, n). A square matrix has full rank exactly when it is invertible and its determinant is non-zero. If the rank is below min(m, n), the rows or columns are linearly dependent and the matrix is rank deficient.
Why might the rank differ from what I expect with decimal entries?
Computers store numbers with limited precision, so an entry that should be exactly zero after elimination can come out as a tiny value like 1e-16. To handle this, the calculator treats any pivot candidate below a small tolerance as zero. The tolerance scales with the size of the matrix and its largest entry, which keeps the rank stable even when you use fractions or decimals.
Can this find the rank of a non-square matrix?
Yes. Rank is defined for any m by n matrix, not just square ones. Set the number of rows and columns independently, up to 6 by 6, and the calculator reports the rank, the nullity, and whether the matrix has full column or row rank.
Related Calculators
More calculators in "Math"
Matrix Transpose CalculatorNewton's Method CalculatorNull Space CalculatorOdds Ratio CalculatorSimpson's Rule CalculatorTrapezoidal Rule Calculator
See all 202 calculators in "Math"