Row Echelon Form Calculator — Step-by-Step Gaussian Elimination
Enter any m×n matrix and get its row echelon form (REF) step by step. Each Gaussian elimination operation — row swap, subtraction — is listed in order so you can follow the method by hand.
Step 1
Step 2
Step 3
Step 4
Step 5
How does this calculator work?
Gaussian elimination scans each column left to right, swaps in the largest-magnitude row (partial pivoting), then subtracts multiples of that row from all lower rows to create zeros. The result is row echelon form, where each row's leading entry is strictly to the right of the one above. Rank = number of pivots; nullity = columns − rank.
Formula
How this is calculated
Row echelon form (REF) requires that all entries below each leading (pivot) entry are zero and that each pivot is further right than the pivot in the row above it. This is achieved by Gaussian elimination: scan the matrix column by column from left to right, find a pivot in each column, and use row subtraction to zero out everything below it.
This calculator uses partial pivoting for numerical stability: before eliminating a column it swaps in the row whose entry in that column has the largest absolute value, reducing the risk of dividing by a near-zero number. Entries below one part-per-billion in magnitude are snapped to zero to suppress floating-point noise.
REF differs from reduced row echelon form (RREF) in two ways: in REF the pivots are not necessarily 1, and entries above the pivot are not eliminated. The rank (number of pivots) is the same for both. REF is the intermediate result of forward-elimination before any back-substitution takes place.
Frequently asked questions
Row echelon form (REF) only requires zeros below each pivot — pivots can be any nonzero value and entries above them may be nonzero. Reduced row echelon form (RREF) adds two extra conditions: every pivot must equal 1, and every other entry in its column must be zero. The RREF of a matrix is unique; the REF is not.
The rank is the number of pivot columns — the number of non-zero rows in the echelon form. It equals the dimension of the row space and column space. For a square n×n matrix, rank = n means the matrix is invertible and any linear system it represents has a unique solution.
Yes. Enter the augmented matrix [A | b] with the constants as the last column. The REF will have the same solution set as the original system. If the last column has a pivot in a row where all variable entries are zero, the system is inconsistent (no solution). Otherwise, back-substitute from the last pivot row upward.
Also known as
TG we-Calculate Editorial Team. (2026). Row Echelon Form Calculator — Step-by-Step Gaussian Elimination [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/row-echelon-form-calculator
TG we-Calculate Editorial Team. "Row Echelon Form Calculator — Step-by-Step Gaussian Elimination." TG we-Calculate. 2026. https://we-calculate.com/calculator/row-echelon-form-calculator.
TG we-Calculate Editorial Team, "Row Echelon Form Calculator — Step-by-Step Gaussian Elimination," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/row-echelon-form-calculator
@misc{wecalculate_row_echelon_form_calculator, title = {Row Echelon Form Calculator — Step-by-Step Gaussian Elimination}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/row-echelon-form-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
