Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

How to Reduce a Matrix to Row Echelon Form

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.

Recognize the task

Any matrix you need to row-reduce: a coefficient or augmented matrix before back substitution, a matrix whose rank you want, a set of vectors to test for independence. Typical forms: (1213243836513)\begin{pmatrix} 1 & 2 & 1 & 3 \\ 2 & 4 & 3 & 8 \\ 3 & 6 & 5 & 13 \end{pmatrix}, a square matrix, a matrix with a zero first column. Test: is there a nonzero entry below a leading entry? Then the matrix is not yet in echelon form.
The conditions are listed in the lesson section Row Echelon Form.

Steps

StepOn (1213243836513)\begin{pmatrix} 1 & 2 & 1 & 3 \\ 2 & 4 & 3 & 8 \\ 3 & 6 & 5 & 13 \end{pmatrix}
1Find the leftmost column with a nonzero entry. That is the pivot column for the current row.column 1
2Bring 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 11.Elementary row operations ↗pivot 11 in row 1, no swap
3Clear every entry below the pivot. Subtract multiples of the pivot row from each row below.Elementary row operations ↗R2−2R1, R3−3R1R_2 - 2R_1,\ R_3 - 3R_1: [0 0 1 2][0\ 0\ 1\ 2], [0 0 2 4][0\ 0\ 2\ 4]
4Cover 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.R3−2R2R_3 - 2R_2: [0 0 0 0][0\ 0\ 0\ 0]
5Check 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.(121300120000)\begin{pmatrix} 1 & 2 & 1 & 3 \\ 0 & 0 & 1 & 2 \\ 0 & 0 & 0 & 0 \end{pmatrix}, rank 22

Worked examples

Example 1 · one step

2 × 3
(246135)\begin{pmatrix} 2 & 4 & 6 \\ 1 & 3 & 5 \end{pmatrix}
pivot 22 in row 1
R2−12R1R_2 - \frac{1}{2}R_1: (246012)\begin{pmatrix} 2 & 4 & 6 \\ 0 & 1 & 2 \end{pmatrix}
two pivots, rank 22

Example 2 · a zero first entry

swap first
(024369111)\begin{pmatrix} 0 & 2 & 4 \\ 3 & 6 & 9 \\ 1 & 1 & 1 \end{pmatrix}, R1↔R3R_1 \leftrightarrow R_3
put a nonzero entry on top
R2−3R1R_2 - 3R_1: [0 3 6][0\ 3\ 6], then 13R2\frac{1}{3}R_2: [0 1 2][0\ 1\ 2]
clear, then simplify
R3−2R2R_3 - 2R_2: (111012000)\begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{pmatrix}, rank 22
third row vanishes

Example 3 · full rank

3 pivots
(1−12211−150)\begin{pmatrix} 1 & -1 & 2 \\ 2 & 1 & 1 \\ -1 & 5 & 0 \end{pmatrix}
R2−2R1, R3+R1R_2 - 2R_1,\ R_3 + R_1: [0 3 −3][0\ 3\ {-3}], [0 4 2][0\ 4\ 2]
clear column 1
13R2\frac{1}{3}R_2, then R3−4R2R_3 - 4R_2: [0 0 6][0\ 0\ 6]
clear column 2
(1−1201−1006)\begin{pmatrix} 1 & -1 & 2 \\ 0 & 1 & -1 \\ 0 & 0 & 6 \end{pmatrix}, rank 33
a pivot in every column
Count the pivots of any matrix in the matrix rank visualizer.

See it happen

Each row of the echelon form starts with a pivot, and the pivots step down to the right like a staircase. Below the staircase everything is zero, so the last nonzero row involves the fewest columns. That shape is what makes back substitution possible: each row adds exactly one new pivot unknown to the rows below it.

Common mistakes

Thinking every pivot must be 1

✗ "(246012)\begin{pmatrix} 2 & 4 & 6 \\ 0 & 1 & 2 \end{pmatrix} is not in echelon form"
✓ it is; pivots equal to 11 are a condition of reduced form only

A nonzero entry left below a pivot

✗ (123045067)\begin{pmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 0 & 6 & 7 \end{pmatrix} called echelon form
✓ the 66 sits below the pivot 44; clear it with R3−32R2R_3 - \frac{3}{2}R_2

Expecting one correct echelon form

✗ marking (123012)\begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 2 \end{pmatrix} wrong because the key has (246012)\begin{pmatrix} 2 & 4 & 6 \\ 0 & 1 & 2 \end{pmatrix}
✓ echelon form is not unique; the pivot positions are
Only the reduced form is unique.