Gaussian Elimination
Summary
Gaussian elimination transforms
Prerequisites
- Direct Methods - Triangular System
- Elementary row operations
Problem Type
Solve a square linear system
Method Definition
Form the augmented matrix
With partial pivoting, swap row
Assumptions / Requirements
-
nonsingular (all pivots nonzero after possible row swaps) - Prefer partial pivoting in floating-point arithmetic
Algorithm
- For
to :- Pivot: choose
maximizing ; swap rows and (and entries of ). - For
to : ; row row row .
- Pivot: choose
- Back-substitute on the resulting upper-triangular system.
Convergence
Direct method: finishes in finitely many arithmetic operations (
Error / Accuracy
Primary check: residual
Worked Example
Solve
Augmented matrix:
Eliminate column 1:
Eliminate
Back substitution:
Solution:
Common Failure Modes
- Zero/tiny pivot without swapping
- Arithmetic sign errors in multipliers (classic source of wrong
) - Accepting
without checking
Connections
- LU Factorization records the same multipliers in
- Iterative Methods for large sparse alternatives
- Numerical Methods/Linear Systems/Solving Linear Systems
References
Burden & Faires, Numerical Analysis, Gaussian elimination; NIST DLMF Ch. 3, https://dlmf.nist.gov/3 ↩︎