Echelon form is good enough for back substitution, but it is not unique: different sequences of row operations give different staircases. One more round of simplifying gives a form that is unique and lets you read the solution with no back substitution at all.
A matrix is in reduced row echelon form (RREF) when it is in echelon form and also (3) every pivot is $1$, and (4) each pivot is the only nonzero entry in its column. For example, $$\begin{bmatrix} 1 & 0 & 3 & 0 & -2 \\ 0 & 1 & -1 & 0 & 4 \\ 0 & 0 & 0 & 1 & 5 \end{bmatrix}$$ is in RREF: columns 1, 2 and 4 hold the pivots, and each of those columns is a single $1$ with zeros above and below.
Gauss–Jordan elimination
First reach echelon form as before (the forward phase). Then, starting with the rightmost pivot and moving left, scale each pivot row so the pivot is $1$ and use replacements to clear the entries above it (the backward phase).
Why it works
Worked example: From a system to its RREF
- Forward: $R_{2} \to R_{2} - 2R_{1}$ and $R_{3} \to R_{3} + R_{1}$ clear column 1: $\left[\begin{array}{ccc|c} 1 & 2 & 1 & 4 \\ 0 & 1 & 2 & 3 \\ 0 & 1 & 3 & 5 \end{array}\right]$
- $R_{3} \to R_{3} - R_{2}$ clears below the second pivot: $\left[\begin{array}{ccc|c} 1 & 2 & 1 & 4 \\ 0 & 1 & 2 & 3 \\ 0 & 0 & 1 & 2 \end{array}\right]$. Echelon form, with pivots $1, 1, 1$.
- Backward, starting at the right: $R_{1} \to R_{1} - R_{3}$ and $R_{2} \to R_{2} - 2R_{3}$ clear above the third pivot: $\left[\begin{array}{ccc|c} 1 & 2 & 0 & 2 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{array}\right]$
- $R_{1} \to R_{1} - 2R_{2}$ clears above the second pivot: $\left[\begin{array}{ccc|c} 1 & 0 & 0 & 4 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{array}\right]$
- Read the solution: $x = 4$, $y = -1$, $z = 2$. Check in row 2 of the original: $2(4) + 5(-1) + 4(2) = 11$. ✓
Answer: $\left[\begin{array}{ccc|c} 1 & 0 & 0 & 4 \\ 0 & 1 & 0 & -1 \\ 0 & 0 & 1 & 2 \end{array}\right]$
Worked example: Scaling a pivot to 1
- $R_{1} \to \frac{1}{2}R_{1}$ makes the first pivot $1$: $\begin{bmatrix} 1 & 2 & -1 & 3 \\ 1 & 3 & 2 & 7 \end{bmatrix}$
- $R_{2} \to R_{2} - R_{1}$: $\begin{bmatrix} 1 & 2 & -1 & 3 \\ 0 & 1 & 3 & 4 \end{bmatrix}$. The second pivot is already $1$.
- $R_{1} \to R_{1} - 2R_{2}$ clears above it: $\begin{bmatrix} 1 & 0 & -7 & -5 \\ 0 & 1 & 3 & 4 \end{bmatrix}$
Answer: $\begin{bmatrix} 1 & 0 & -7 & -5 \\ 0 & 1 & 3 & 4 \end{bmatrix}$
Key idea