Did you not understand what I (and Mark44) said? Start with the left column and work to the right. For each column, make the "pivot" number (the number on the main diagonal) by dividing that entire row by the number that is there to start with. Then get the number each row above below that "pivot" row (the one containing the pivot number) equal to 0 by subtracting the "pivot" row times that number from the row.
If the first column were
\begin{bmatrix}a \\ b \\ c
the "pivot" row is the first row and the "pivot" number is a. Divide each number in the first row by a. Now you have
\begin{bmatrix}1 \\ b \\ c\end{bmatrix}
and you want "0" in place of "b" and "c". Subtract the first row time b from the second row. Subtract the first row times c from the third row. Since you now have "1" in the first row, you will be subtracting b- b and c- c in the second and third rows and have "0" there:
\begin{bmatrix}1 \\ 0\\ 0\end{bmatrix}
Suppose, after that, the second column is
\begin{bmatrix}d \\ e\\ f\end{bmatrix}.
Since this is the second column, the "pivot" row is the second row. The "pivot" number is e. Divide the entire second row by e so the second column is now
\begin{bmatrix}d \\ 1 \\ f\end{bmatrix}
To get "0"s in place of f, subtract f times the second row from the third row. At this point you have
[math]\begin{bmatrix}1 & d & * \\ 0 & 1 & * \\ 0 & 0 & *\end{bmatrix}[/math]
where the "*"s in the third column indicate the numbers that we need to "fix" yet. Of course, they will NOT be the same numbers that were in the original matrix since they have been changed by the "dividing" and "subtracting" of the entire rows.
("Reduced row-echelon" has "0"s both above and below the "pivot". You would get the "0" above the "pivot" number by subtracting d times the second row from the first row.)
Suppose those number in the third (and, in this example, last) column are \
\begin{bmatrix}g \\ h \\ i\end{bmatrix}
Since this is the third column the "pivot" row is the third row and the "pivot" number is i. Get a "1" there by dividing the entire third row by i. Now we have
begin{bmatrix}g \\ h \\ 1\end{bmatrix}
For "row-echelon" that's all you have to do. For "reduced row-echelon" you would want to get "0" in the first and second rows of the third column by subtracting as above.
The example you gave in your post,
\begin{bmatrix} 2 & 1 & 8 \\ -1 & 1 & -1 \\ -2 & 5 & 4\end{bmatrix}
would go like this:
Divide every number in the first column by 2 to get a "1" in the first column. Then subtract -1 times the new first row (add 1 times the new first row) from the second row and subtract -2 times the new first row (add 2 times the new first row) from the third row. That gives
\begin{bmatrix}1 & \frac{1}{2} & 4 \\ 0 & \frac{3}{2} & 3 \\ 0 & 6 & 12\end{bmatrix}
That is exactly what I gave before.
Look at the second column. The "pivot" row is the second row and the "pivot" number is [math]3/2[/math]. Divide every number in the second rwo by [math]\frac{3}{2}[/math]. Then, since there is a "6" just below that "pivot" number, subtract 6 times the second row from the third. You should now have:
\begin{bmatrix}1 & \frac{1}{2} & 4 \\ 0 & 1 & 2 \\ 0 & 0 & 0\end{bmatrix}
We would like to have a "1" in the third row, third column, but we can't. This matrix is not "invertible" (one way of finding an inverse for a matrix is to put it into "reduced row-echeolon" form, which would give you the identity matrix, while simultaneously performing the same row-operations on the identity matrix- if you can't do that, the matrix is not invertible). But what we have is the "row-echelon" form for this matrix.
Mark44 started by swapping two rows- that can make the calculations easier. Since we always divide a row by the "pivot" number, if that number happens to be 0, we will need to swap with a lower row. If there are NO non-zero numbers lower in the same column, that means the matrix is not invertible and you cannot proceed. What you have is the "row-reduced" matrix.