Every matrix $A\phantom{\rule{mediummathspace}{0.2em}}$ can be reduced to a matrix in row echelon form and to a matrix in reduced row echelon form using only elementary row operations. The algorithm that does it is very similar to the Gauss Elimination Method for systems of linear equations. More precisely

Theorem 1.1. Every matrix $A$ can be reduced to a matrix $B$ in row echelon form and to a matrix $C$ in reduced row echelon form using elementary row operations.

Before proving Theorem 1.1 let us give some useful notation:

When we are using row operations to obtain a matrix in row echelon form, the leading entries are always at the same place. Hence in what follows we will call **the pivot position** the position where the leading entry is, and the column that contains a pivot position will be **the pivot column**.

Algorithm 1.2.
**Gauss Elimination Method. **For a given $m\times n$ nonzero matrix $A=\left({a}_{i,j}\right)$ it finds an equivalent matrix in the row echelon form.

The algorithm works in steps numbered $i=1,\dots ,m-1$. Each step makes one more row of the matrix in echelon form. More precisely, after $i$ steps the matrix formed by the first $i+1$ rows is in echelon form. We start with the step $i=1$.

The general step $i$ of the Gauss Elimination Method works as follows:

- Find the first nonzero column $j$ of the submatrix formed by rows $i,\mathrm{...},m$. If there is no such column, stop. Otherwise, call the column $j$ the pivot column.
- In the pivot column $j$ find any nonzero element ${a}_{k,j}\ne 0$ such that $k\ge i$.
- Move the $k$-th row to the $i$-th position by interchanging the $i$-th and $k$-th rows. This moves the element ${a}_{k,j}\phantom{\rule{mediummathspace}{0.2em}}$to the position $(i,j)$. Call the new element the pivot and the new $i$-th row the pivot row.
- For each row $r>i$ do the following: Add suitable multiple of the pivot row to the $r$-th row so that the element bellow the pivot is zeroed. More precisely, put $q=-{a}_{r,j}/{a}_{i,j}$ and add the $q$-multiple of the pivot row to the $r$-th row. This makes the element on the $(r,j)$ position equal to $0$. Note that all elements to the left to ${a}_{r,j}$ were zero and remain zero.

The Gauss Elimination Methods stops when we cannot proceed, i.e. if the submatrix formed by rows $i,\mathrm{...},m$ does not have a nonzero element (it is a zero matrix) or if we performed all $m-1$ steps.

Example 1.3. Reduce the following matrix $A$ using the Gauss Elimination Method.

$$A=\left(\begin{array}{cccccc}0& 0& 4& 4& 10& 8\\ -1& -2& 1& -2& 1& 1\\ 2& 4& 0& 6& 5& 3\end{array}\right)\mathrm{.}$$ |

Solution 1.4. Step $i=1$: The first nonzero column is the first one, hence the pivot column is the first column. We choose a nonzero entry of it, e.g. $-1$, i.e. the entry in the second row. We interchange first and second row and get

$$\left(\begin{array}{cccccc}-1& -2& 1& -2& 1& 1\\ 0& 0& 4& 4& 10& 8\\ 2& 4& 0& 6& 5& 3\end{array}\right)\mathrm{.}$$ | (1.1) |

The pivot element is ${a}_{1,1}=-1$. Since only the third row has nonzero entry in the first column, we add $2$ times first row to the third one and get

$$\left(\begin{array}{cccccc}-1& -2& 1& -2& 1& 1\\ 0& 0& 4& 4& 10& 8\\ 0& 0& 2& 2& 7& 5\end{array}\right)\mathrm{.}$$ | (1.2) |

The step $i=1$ is now finished.

Step $i=2$. First we need to find the pivot column. In the matrix (1.2) we need to find the leftmost column which has a nonzero entry in the rows $2,3$. It is the third column. Hence, the third column is the pivot column.

In the pivot column we choose a nonzero entry in the second and third row. Since ${a}_{2,3}\ne 0$, we choose the second row to be the pivot row.

We multiply the second row by $q=-\frac{1}{2}$ and add it to the third row. We obtain

$$\left(\begin{array}{cccccc}-1& -2& 1& -2& 1& 1\\ 0& 0& 4& 4& 10& 8\\ 0& 0& 0& 0& 2& 1\end{array}\right)\mathrm{.}$$ | (1.3) |

The matrix (1.3) is the matrix equivalent to $A$ which is in the row echelon form.

Algorithm 1.5.
**Jordan Elimination Method. **For a given $m\times n$ nonzero matrix $A=\left({a}_{i,j}\right)$ it finds an equivalent matrix in the reduced row echelon form.

The algorithm works in steps numbered $i=1,\dots ,m$. Each step makes one more row of the matrix in reduced echelon form. More precisely, after $i$ steps the matrix formed by the first $i$ rows is in reduced echelon form. We start with the step $i=1$.

The general step $i$ of the Jordan Elimination Method works as follows:

- Find the first nonzero column $j$ of the submatrix formed by rows $i,\mathrm{...},m$. If there is no such column, stop. Otherwise, call the column $j$ the pivot column.
- In the pivot column $j$ find any nonzero element ${a}_{k,j}\ne 0$ such that $k\ge i$.
- Move the $k$-th row to the $i$-th position by interchanging the $i$-th and $k$-th rows. This moves the element ${a}_{k,j}\phantom{\rule{mediummathspace}{0.2em}}$to the position $(i,j)$. Call the new element the pivot and the new $i$-th row the pivot row.
- Divide the pivot row by the pivot element. This makes the pivot element ${a}_{i,j}=1$.
- For each row $r\ne i$ do the following: Add the $(-{a}_{r,j})$-multiple of the pivot row to the $r$-th row. Note that all elements to the left to ${a}_{r,j}$ are not changed. After doing this for all rows $r\ne i$ the pivot column becomes the unit vector ${e}_{i}\phantom{\rule{mediummathspace}{0.2em}}$(i.e. the vector with all zeros except one $1$ in the $i$-the place).

The Jordan Elimination Methods stops when we cannot proceed, i.e. if the submatrix formed by rows $i,\dots ,m$ does not have a nonzero element (it is a zero matrix) or if we performed all $m$ steps.

Example 1.6. Find the reduced row echelon form of the following matrix $A$ using the Jordan Elimination Method.

$$A=\left(\begin{array}{cccccc}0& 0& 4& 4& 10& 8\\ -1& -2& 1& -2& 1& 1\\ 2& 4& 0& 6& 5& 3\end{array}\right)\mathrm{.}$$ |

Solution 1.7. Step $i=1$: Finding the pivot column and the pivot in the Jordan Elimination Method is precisely the same as in the Gauss Elimination Method. So we get the following matrix

$$\left(\begin{array}{cccccc}-1& -2& 1& -2& 1& 1\\ 0& 0& 4& 4& 10& 8\\ 2& 4& 0& 6& 5& 3\end{array}\right)\mathrm{.}$$ | (1.4) |

The pivot is ${a}_{1,1}=-1$. We divide the first row by the pivot, i.e. by $-1$ and get

$$\left(\begin{array}{cccccc}1& 2& -1& 2& -1& -1\\ 0& 0& 4& 4& 10& 8\\ 2& 4& 0& 6& 5& 3\end{array}\right)\mathrm{.}$$ | (1.5) |

Since the first column has $0\phantom{\rule{mediummathspace}{0.2em}}$in the second row, we deal only with the third row. We subract twice the pivot (first) row from the third one and get

$$\left(\begin{array}{cccccc}1& 2& -1& 2& -1& -1\\ 0& 0& 4& 4& 10& 8\\ 0& 0& 2& 2& 7& 5\end{array}\right)\mathrm{.}$$ | (1.6) |

The step $i=1$ is now finished.

Step $i=2$. As in the Gauss Elimination Method the pivot column is the third one and the pivot is ${a}_{2,3}=4$. We divide the second row by the pivot and get

$$\left(\begin{array}{cccccc}1& 2& -1& 2& -1& -1\\ 0& 0& 1& 1& \raisebox{1ex}{$5$}\!\left/ \!\raisebox{-1ex}{$2$}\right.& 2\\ 0& 0& 2& 2& 7& 5\end{array}\right)\mathrm{.}$$ | (1.7) |

Now we add the pivot row to the first row and subract twice the pivot row from the third row. We obtain

$$\left(\begin{array}{cccccc}1& 2& 0& 3& \raisebox{1ex}{$3$}\!\left/ \!\raisebox{-1ex}{$2$}\right.& 1\\ 0& 0& 1& 1& \raisebox{1ex}{$5$}\!\left/ \!\raisebox{-1ex}{$2$}\right.& 2\\ 0& 0& 0& 0& 2& 1\end{array}\right)\mathrm{.}$$ | (1.8) |

Step $i=3$. The pivot column is the fifth column, and pivot row is the last row. We divide the third row by ${a}_{3,5}$ and get

$$\left(\begin{array}{cccccc}1& 2& 0& 3& \raisebox{1ex}{$3$}\!\left/ \!\raisebox{-1ex}{$2$}\right.& 1\\ 0& 0& 1& 1& \raisebox{1ex}{$5$}\!\left/ \!\raisebox{-1ex}{$2$}\right.& 2\\ 0& 0& 0& 0& 1& \raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$2$}\right.\end{array}\right)\mathrm{.}$$ | (1.9) |

Finally, we add $(-3/2)$ multiple of the pivot row to the first row and then the $(-5/2)$ multiple of the pivot row to the second one. By this we get

$$\left(\begin{array}{cccccc}1& 2& 0& 3& 0& \raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$4$}\right.\\ 0& 0& 1& 1& 0& \raisebox{1ex}{$3$}\!\left/ \!\raisebox{-1ex}{$4$}\right.\\ 0& 0& 0& 0& 1& \raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$2$}\right.\end{array}\right)\mathrm{.}$$ | (1.10) |

The matrix (1.10) is the matrix equivalent to $A$ which is in the reduced row echelon form.

Notice that the columns that served as pivot columns during the computation are now the unit vectors ${e}_{1},\phantom{\rule{mediummathspace}{0.2em}}{e}_{2},\phantom{\rule{mediummathspace}{0.2em}}{e}_{3}$ (the first, third and fifth columns).

Remark Note that to get a reduced row echelon form we could use an extended version of the Gauss Elimination Method instead of the Jordan Elimination Method. Indeed, when we have a row echelon form we can proceed as follows: We first divide all the pivot rows by their respective pivots and then by a back procedure starting with the last pivot row, we get the desired matrix. Let us show it on the above example.

We start with the matrix (1.3) in row echelon form

$$\left(\begin{array}{cccccc}-1& -2& 1& -2& 1& 1\\ 0& 0& 4& 4& 10& 8\\ 0& 0& 0& 0& 2& 1\end{array}\right)\mathrm{.}$$ |

We divide the first row by $(-1)$, the second row by $4$, and the third one by $2$ and get

$$\left(\begin{array}{cccccc}1& 2& -1& 2& -1& -1\\ 0& 0& 1& 1& \raisebox{1ex}{$5$}\!\left/ \!\raisebox{-1ex}{$2$}\right.& 2\\ 0& 0& 0& 0& 1& \raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$2$}\right.\end{array}\right)\mathrm{.}$$ | (1.11) |

Now, we will arrange the last pivot column with the use of the third row (the last pivot row). We add appropriate multiples of the third row to the first and second rows and obtain

$$\left(\begin{array}{cccccc}1& 2& -1& 2& 0& -\raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$2$}\right.\\ 0& 0& 1& 1& 0& \raisebox{1ex}{$3$}\!\left/ \!\raisebox{-1ex}{$4$}\right.\\ 0& 0& 0& 0& 1& \raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$2$}\right.\end{array}\right)\mathrm{.}$$ | (1.12) |

So the fifth column has the desired form. To finish the procedure we need to arrange the third column. For this we add the second row to the first one so that the $(1,3)$-entry becomes zero

$$\left(\begin{array}{cccccc}1& 2& 0& 3& 0& \raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$4$}\right.\\ 0& 0& 1& 1& 0& \raisebox{1ex}{$3$}\!\left/ \!\raisebox{-1ex}{$4$}\right.\\ 0& 0& 0& 0& 1& \raisebox{1ex}{$1$}\!\left/ \!\raisebox{-1ex}{$2$}\right.\end{array}\right)\mathrm{.}$$ | (1.13) |

Notice that we have got the same matrix as in (1.10).