Row echelon form is a staircase: each row starts further right than the row above, everything below a pivot is zero, and zero rows sit at the bottom. You reach it column by column, clearing below one pivot at a time.
| Step | On | |
|---|---|---|
| 1 | Find the leftmost column with a nonzero entry. That is the pivot column for the current row. | column 1 |
| 2 | Bring a nonzero entry to the top of the remaining rows. Swap rows if the current top entry is zero. Any nonzero number can be the pivot; it does not have to be .Elementary row operations ↗ | pivot in row 1, no swap |
| 3 | Clear every entry below the pivot. Subtract multiples of the pivot row from each row below.Elementary row operations ↗ | : , |
| 4 | Cover the pivot row and repeat on the rows below. The next pivot may skip a column: here column 2 has only zeros left, so the pivot is in column 3. | : |
| 5 | Check the staircase. Each pivot is to the right of the one above, zeros fill below every pivot, zero rows are last. The number of pivots is the rank. | , rank |