Row Echelon
1. **Problem Statement:** Find the row echelon form of the matrix
$$\begin{bmatrix} 1 & 2 & 0 & 1 & 2 \\ 3 & 6 & 2 & 5 & 0 \\ 0 & 2 & 1 & 5 & 2 \\ 2 & 3 & 7 & 1 & -1 \end{bmatrix}$$
2. **Definition:** The row echelon form of a matrix is a form where all nonzero rows are above any rows of all zeros, and the leading coefficient (pivot) of a nonzero row is always strictly to the right of the leading coefficient of the row above it.
3. **Step 1:** Use the first row as the pivot row. Eliminate entries below the pivot in column 1.
- Multiply row 1 by 3 and subtract from row 2:
$$R_2 = R_2 - 3R_1 = \begin{bmatrix}3 & 6 & 2 & 5 & 0\end{bmatrix} - 3 \times \begin{bmatrix}1 & 2 & 0 & 1 & 2\end{bmatrix} = \begin{bmatrix}0 & 0 & 2 & 2 & -6\end{bmatrix}$$
- Multiply row 1 by 2 and subtract from row 4:
$$R_4 = R_4 - 2R_1 = \begin{bmatrix}2 & 3 & 7 & 1 & -1\end{bmatrix} - 2 \times \begin{bmatrix}1 & 2 & 0 & 1 & 2\end{bmatrix} = \begin{bmatrix}0 & -1 & 7 & -1 & -5\end{bmatrix}$$
4. **Step 2:** Use row 3 as is since it has a zero in the first column.
5. **Step 3:** Move to the second column. The pivot in the second column should be below the first pivot. Rows 2 and 3 have zeros in the second column, but row 4 has -1. Swap row 2 and row 4 to bring the pivot up:
$$R_2 \leftrightarrow R_4$$
6. **Step 4:** Use the new row 2 as pivot to eliminate entries below it in column 2.
- Multiply row 2 by 2 and add to row 3:
$$R_3 = R_3 + 2R_2 = \begin{bmatrix}0 & 2 & 1 & 5 & 2\end{bmatrix} + 2 \times \begin{bmatrix}0 & -1 & 7 & -1 & -5\end{bmatrix} = \begin{bmatrix}0 & 0 & 15 & 3 & -8\end{bmatrix}$$
7. **Step 5:** Use row 2 to eliminate entries below in column 2. Row 4 is now row 3, so no further elimination needed.
8. **Step 6:** Move to the third column. The pivot is in row 3, column 3 (value 15). Use it to eliminate entries below if any (none here).
9. **Final row echelon form:**
$$\begin{bmatrix} 1 & 2 & 0 & 1 & 2 \\ 0 & -1 & 7 & -1 & -5 \\ 0 & 0 & 15 & 3 & -8 \\ 0 & 0 & 2 & 2 & -6 \end{bmatrix}$$
This matrix is in row echelon form because each leading entry is to the right of the one above it, and all entries below pivots are zero.
**Answer:**
$$\begin{bmatrix} 1 & 2 & 0 & 1 & 2 \\ 0 & -1 & 7 & -1 & -5 \\ 0 & 0 & 15 & 3 & -8 \\ 0 & 0 & 2 & 2 & -6 \end{bmatrix}$$