Pivot the matrix
Find the pivot, the first non-zero entry in the first column of the matrix.
Interchange rows, moving the pivot row to the first row.
Multiply each element in the pivot row by the inverse of the pivot, so the pivot equals 1.
Add multiples of the pivot row to each of the lower rows, so every element in the pivot column of the lower rows equals 0.
To get the matrix in row echelon form, repeat the pivot
Repeat the procedure from Step 1 above, ignoring previous pivot rows.
Continue until there are no more pivots to be processed.
To get the matrix in reduced row echelon form, process non-zero entries above each pivot.
Identify the last row having a pivot equal to 1, and let this be the pivot row.
Add multiples of the pivot row to each of the upper rows, until every element above the pivot equals 0.
Moving up the matrix, repeat this process for each row.