Solve the 3x3 linear system using Gaussian elimination (row reduction
to reduced row echelon form). Each row operation is shown as a single
step: eliminate below the pivot, then back-substitute to isolate each
variable. The augmented matrix updates after every operation.
Example
Use row operations on the augmented matrix until the system is solved.
highlighted = computed this step
Step 1 — Set up
Start with the augmented matrix.
[ 2 1 − 1 8 − 3 − 1 2 − 11 − 2 1 2 − 3 ] \left[\begin{array}{ccc|c}2&1&-1&8\\-3&-1&2&-11\\-2&1&2&-3\end{array}\right] 2 − 3 − 2 1 − 1 1 − 1 2 2 8 − 11 − 3
Step 2 — Eliminate below pivot 1
Update row 2 using row 1: r2 <- r2 + 3/2*r1; update row 3 using row 1: r3 <- r3 + r1.
[ 2 1 − 1 8 0 1/2 1/2 1 0 2 1 5 ] \left[\begin{array}{ccc|c}2&1&-1&8\\\hl{0}&\hl{1/2}&\hl{1/2}&\hl{1}\\\hl{0}&\hl{2}&\hl{1}&\hl{5}\end{array}\right] 2 0 0 1 1/2 2 − 1 1/2 1 8 1 5
Step 3 — Eliminate below pivot 2
Update row 3 using row 2: r3 <- r3 - 4*r2.
[ 2 1 − 1 8 0 1 2 1 2 1 0 0 -1 1 ] \left[\begin{array}{ccc|c}2&1&-1&8\\0&\frac{1}{2}&\frac{1}{2}&1\\\hl{0}&\hl{0}&\hl{-1}&\hl{1}\end{array}\right] 2 0 0 1 2 1 0 − 1 2 1 -1 8 1 1
Step 4 — Normalize pivot row 3
Scale row 3: r3 <- -1*r3.
[ 2 1 − 1 8 0 1 2 1 2 1 0 0 1 -1 ] \left[\begin{array}{ccc|c}2&1&-1&8\\0&\frac{1}{2}&\frac{1}{2}&1\\\hl{0}&\hl{0}&\hl{1}&\hl{-1}\end{array}\right] 2 0 0 1 2 1 0 − 1 2 1 1 8 1 -1
Step 5 — Eliminate x3 above
Update row 1 using row 3: r1 <- r1 + r3; update row 2 using row 3: r2 <- r2 - 1/2*r3.
[ 2 1 0 7 0 1/2 0 3/2 0 0 1 − 1 ] \left[\begin{array}{ccc|c}\hl{2}&\hl{1}&\hl{0}&\hl{7}\\\hl{0}&\hl{1/2}&\hl{0}&\hl{3/2}\\0&0&1&-1\end{array}\right] 2 0 0 1 1/2 0 0 0 1 7 3/2 − 1
Step 6 — Normalize pivot row 2
Scale row 2: r2 <- 2*r2.
[ 2 1 0 7 0 1 0 3 0 0 1 − 1 ] \left[\begin{array}{ccc|c}2&1&0&7\\\hl{0}&\hl{1}&\hl{0}&\hl{3}\\0&0&1&-1\end{array}\right] 2 0 0 1 1 0 0 0 1 7 3 − 1
Step 7 — Eliminate x2 above
Update row 1 using row 2: r1 <- r1 - r2.
[ 2 0 0 4 0 1 0 3 0 0 1 − 1 ] \left[\begin{array}{ccc|c}\hl{2}&\hl{0}&\hl{0}&\hl{4}\\0&1&0&3\\0&0&1&-1\end{array}\right] 2 0 0 0 1 0 0 0 1 4 3 − 1
Step 8 — Normalize pivot row 1
Scale row 1: r1 <- 1/2*r1.
[ 1 0 0 2 0 1 0 3 0 0 1 − 1 ] \left[\begin{array}{ccc|c}\hl{1}&\hl{0}&\hl{0}&\hl{2}\\0&1&0&3\\0&0&1&-1\end{array}\right] 1 0 0 0 1 0 0 0 1 2 3 − 1
Step 9 — Result
Read the solution: x1 = 2, x2 = 3, x3 = -1.
[ 1 0 0 2 0 1 0 3 0 0 1 − 1 ] , solution: x 1 = 2 , x 2 = 3 , x 3 = − 1 \left[\begin{array}{ccc|c}1&0&0&2\\0&1&0&3\\0&0&1&-1\end{array}\right],\quad \text{solution: }x1=2,\ x2=3,\ x3=-1 1 0 0 0 1 0 0 0 1 2 3 − 1 , solution: x 1 = 2 , x 2 = 3 , x 3 = − 1
row-operation
Replace a row with a linear combination of itself and another row to create a zero in the pivot column. This preserves the solution set.
pivot
The leading nonzero entry in a row used to eliminate entries above and below it in the same column.
back-substitution
After forward elimination produces an upper-triangular matrix, work upward row by row to find each variable's value.