Matrix Rank Calculator
Find the rank of any matrix up to 10 × 10 by exact Gaussian elimination, with the row echelon form, pivot columns, nullity and whether the matrix has full rank or is invertible.
How it works
rank(A) = number of pivots (non-zero rows) in a row echelon form of A · rank ≤ min(m, n) · rank + nullity = n (rank–nullity theorem)
The rank is the number of linearly independent rows — equivalently columns — of a matrix. Gaussian elimination (swap rows, subtract multiples of one row from another) never changes the rank, so after reducing to row echelon form you simply count the pivots. Exact fractions are used, so there is no rounding error deciding whether a row is zero. A square matrix is invertible exactly when its rank equals its size.
Worked example
For [1 2 3; 4 5 6; 7 8 9]: subtract 4×row 1 from row 2 and 7×row 1 from row 3 to get [1 2 3; 0 −3 −6; 0 −6 −12], then subtract 2×row 2 from row 3: [1 2 3; 0 −3 −6; 0 0 0]. There are two pivots, so the rank is 2 and the nullity is 3 − 2 = 1 (the matrix is singular).
Sources: MIT OpenCourseWare 18.06 Linear Algebra (Strang) — Rank of a matrix · Wolfram MathWorld — Matrix Rank
Frequently asked questions
What does the rank of a matrix tell you?
How many rows (or columns) are truly independent. For a system Ax = b it decides whether there is one solution, none or infinitely many (Rouché–Capelli theorem).
Is the row rank always equal to the column rank?
Yes. That is a fundamental theorem of linear algebra, so a 3 × 5 matrix can have rank at most 3.
How do I find the rank with determinants?
The rank is the size of the largest square submatrix (minor) with a non-zero determinant. Elimination is much faster for anything bigger than 3 × 3.
What is the nullity?
The dimension of the null space — the number of free variables in Ax = 0. Rank + nullity = number of columns.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.