Row Echelon Form Calculator
Compute the row echelon form (REF) with Gaussian elimination and partial pivoting.
Get rank, determinant, pivot columns, and back-substituted solutions.
Row echelon form (REF) is the result of forward Gaussian elimination: row operations that make every entry below each pivot zero, working left to right and top to bottom. Unlike reduced row echelon form (RREF), the pivots are not scaled to 1 and the entries above them are left alone.
REF properties:
- All zero rows (if any) appear at the bottom
- The leading non-zero entry of each non-zero row is to the right of the leading entry in the row above
- Below each leading entry, the column is all zero
REF is not unique, and this calculator prints the proof rather than asserting it. Different sequences of row operations produce different REFs for the same matrix. Whenever pivoting changes the route, you get two echelon forms side by side: the one partial pivoting produces and the one you would reach by hand. The pivot positions, the rank and the determinant come out the same in both. The actual numbers do not. RREF is the form that is unique, which is the main reason to go the extra distance.
REF is the natural stopping point if you only need to:
- Determine the rank (count non-zero rows)
- Solve a triangular system by back-substitution
- Compute the determinant. For a square matrix, det = (product of the diagonal entries) × (-1)^(number of row swaps)
Going further to RREF is useful when you want a parametric description of the solution set, a null space basis, or a quick read of which columns are linearly independent. RREF takes more arithmetic and gives more information. The short version of when to use which page: stop here for rank, a determinant, or a system with exactly one answer, and go there when the system has free variables and you want them written out.
Worked example, and why the answer may surprise you. Take A = [[1,2,3],[4,5,6],[7,8,9]]. By hand you would probably keep row 1 where it is: row 2 minus 4×row 1 gives [0,-3,-6], row 3 minus 7×row 1 gives [0,-6,-12], then row 3 minus 2×(new row 2) gives [0,0,0]. That is the textbook REF, [[1,2,3],[0,-3,-6],[0,0,0]].
This calculator uses partial pivoting, so it does something different. At each step it swaps in the row with the largest entry in that column, which here means starting with [7,8,9] rather than [1,2,3]. The REF it prints is [[7,8,9],[0,0.857143,1.714286],[0,0,0]], and underneath it prints the textbook one as well so you can see they are both correct. Different numbers, same two pivot columns, same rank 2, same determinant of 0.
Why bother with pivoting if it gives an uglier answer? Because dividing by a small pivot magnifies floating-point error. If your leading entry is 0.0001 and another row has 5000 in that column, eliminating with the tiny pivot can destroy several digits of accuracy. Every serious linear-algebra library pivots for this reason. The cost is that the printed numbers stop matching the ones in your textbook.
Enter a rectangular matrix and the calculator treats the last column as the right-hand side of a system, checks whether the system is consistent, and back-substitutes for a unique solution when one exists.
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.
More Math Calculators
- Sampling Distribution Calculator
- Secant Line Calculator
- Simpson's Rule Calculator
- Singular Value Decomposition Calculator
- Skewness Calculator - Distribution Shape
- Tangent Line Equation Calculator
- Trinomial Distribution Calculator
- Triple Integral Calculator
- Two-Proportion Z-Test Calculator
- Uniform Distribution Calculator
- Cosecant Calculator
- Cotangent Calculator