┌ ┐ │ 2 2 4 -8 │ │ -1 -3 -4 5 │ A = │ 2 -1 -1 0 │ │ 0 -2 -2 1 │ └ ┘
When a row of the matrix A is non-null, its first non-zero entry is the leading entry of the row. The matrix A is in row echelon form when any zero rows are below all non-zero rows, and for each non-zero row, the leading entry is in a column to the right of the leading entries of the previous rows. A convenient method consists of making zero all the entries that are below the leading entry (pivot) in each row, starting by the first row, until the matrix is in row echelon form.
r1 <———> r2 ┌ ┐ │ -1 -3 -4 5 │ │ 2 2 4 -8 │ │ 2 -1 -1 0 │ │ 0 -2 -2 1 │ └ ┘ r2 <———> r2 + 2•r1 r3 <———> r3 + 2•r1 ┌ ┐ │ -1 -3 -4 5 │ │ 0 -4 -4 2 │ │ 0 -7 -9 10 │ │ 0 -2 -2 1 │ └ ┘ r2 <———> r4 ┌ ┐ │ -1 -3 -4 5 │ │ 0 -2 -2 1 │ │ 0 -7 -9 10 │ │ 0 -4 -4 2 │ └ ┘ r3 <———> -2•r3 ┌ ┐ │ -1 -3 -4 5 │ │ 0 -2 -2 1 │ │ 0 14 18 -20 │ │ 0 -4 -4 2 │ └ ┘ r3 <———> r3 + 7•r2 r4 <———> r4 - 2•r2 ┌ ┐ │ -1 -3 -4 5 │ │ 0 -2 -2 1 │ │ 0 0 4 -13 │ │ 0 0 0 0 │ └ ┘
┌ ┐ │ -1 -3 -4 5 │ │ 0 -2 -2 1 │ A ~ │ 0 0 4 -13 │ │ 0 0 0 0 │ └ ┘