Gaussian Elimination on a 3×3 System
Solve a three-variable linear system by reducing its augmented matrix and reading the unique solution.
Eliminate one column at a time
The augmented column holds the right-hand sides. Row operations preserve every equation while producing pivots, and the final vector is x = 2, y = 3, z = −1.
solveSystem([[2, 1, −1, 8], [−3, −1, 2, −11], [−2, 1, 2, −3]])Use the same procedure for two variables
Eliminate the first-column entry in the second row, solve for y, then substitute back. The ordered vector is 2, 1, which satisfies both original rows.
solveSystem([[1, 2, 4], [2, 1, 5]])Track every pivot
A zero in a potential pivot position is handled by choosing another nonzero row. Once all three variable columns have pivots, read the unique components.
solveSystem([[1, 1, 1, 6], [0, 2, 1, 5], [1, 0, 1, 3]])Practice
Practice: problems like this one, made and checked in your browser.
Recap
- Augment the coefficient matrix with the right-hand side.
- Row operations preserve the solution set.
- A pivot in every variable column gives a unique solution vector.