Matrix Rank & RREF Calculator
Reduced row echelon form and rank for whole-number matrices, computed in exact fractions — every row operation listed, no floating-point fog. The RREF is unique, so the answer can be checked by anyone.
Example — Rank of [[1, 2, 3], [4, 5, 6], [7, 8, 9]]Rank 2 — RREF [[1, 0, −1], [0, 1, 2], [0, 0, 0]]
How we got it — the example, step by step
- Eliminate downwards: row 2 − 4×row 1, row 3 − 7×row 1; then row 3 − 2× the new row 2 — it becomes all zeros, because the third row was the sum pattern of the first two.
- Scale and eliminate upwards to ones and zeros above the pivots. Two non-zero rows remain: rank 2.
Check it backwards
The RREF of a matrix is unique — any correct elimination, in any order, lands on the same final matrix. The zero row is the proof the rows were dependent: row 3 = 2×row 2 − row 1 for the original, which you can verify in your head.
Questions people also ask
Why whole numbers only?
Exact fractions keep every step honest: 1/3 stays 1/3 instead of becoming 0.333 and drifting. Decimal entries would need a rounding policy at each step, and this tool would rather decline than hide one. Convert decimals to fractions first (0.5 = 1/2 — enter it as a fraction-friendly whole-number matrix scaled up, or use the matrix calculator for approximate work).