How to solve a system of equations with Gaussian elimination
6 min read
Short answer
Write the system as an augmented matrix, then use row operations to create zeros below each pivot until the matrix is in staircase (echelon) form. Read the last equation, solve it, and back-substitute upward. The three allowed operations are swapping rows, scaling a row, and adding a multiple of one row to another.
Why row operations are safe
Each allowed operation replaces the system by one with exactly the same solutions: swapping equations, multiplying an equation by a nonzero number, and adding a multiple of one equation to another change how the system looks, not what solves it. Elimination is just doing these on purpose to make the system triangular.
The procedure
- Write the augmented matrix .
- Pick the first pivot (top-left). Use row operations to make everything below it zero.
- Move to the next row and column and repeat.
- Back-substitute from the last equation upward.
If you reach a row with there is no solution. If a column has no pivot, that variable is free and there are infinitely many solutions.
Worked example
Solve
Augmented matrix: Step 1. : .
Step 2. : .
Back-substitute. . Then . Then .
Check in the third original equation: ✓. The solution is .
Try it yourself
Solve .
Show the answer
Subtract the second equation from the first: , so . The first two then give . The third becomes , i.e. . Adding to gives , so and . Check in the first equation: ✓.
Keep going with practice
Vidi's Linear Algebra & Probability course walks through elimination, and its matrix calculator can show the row-reduced form so you can check each step.