Gaussian Elimination

Summary

Gaussian elimination transforms Ax=b into an upper-triangular system Ux=c by elementary row operations, then recovers x by back substitution. Partial pivoting improves numerical stability.

Prerequisites

Problem Type

Solve a square linear system Ax=b .

Method Definition

Form the augmented matrix [A|b] . For each column k=1,,n1 , eliminate entries below the pivot akk using multipliers mik=aik/akk . After triangularization, apply back substitution.[1]

With partial pivoting, swap row k with the row of largest |aik| for ik before eliminating.

Assumptions / Requirements

Algorithm

  1. For k=1 to n1 :
    • Pivot: choose pk maximizing |apk| ; swap rows k and p (and entries of b ).
    • For i=k+1 to n : maik/akk ; row i row im row k .
  2. Back-substitute on the resulting upper-triangular system.

Convergence

Direct method: finishes in finitely many arithmetic operations ( O(n3) ). No iteration.

Error / Accuracy

Primary check: residual r=bAx . In exact arithmetic r=0 . In floating point, small r relative to Ax+b indicates a consistent solve.

Worked Example

Solve

{2x+3yz=14xy+2z=72x+2y+5z=0

Augmented matrix:

[231141272250]

Eliminate column 1:

R2R22R1,R3R3+R1 [231107450541]

Eliminate y in row 3. Multiplier m=5/(7)=5/7 , so

R3R3mR2=R3+57R2: [2311074500487327]

Back substitution:

z=32/748/7=23, 7y+423=57y=73y=13, 2x+3(13)23=12x=83x=43.

Solution: (43,13,23) . Residual:

A(4/31/32/3)(170)=0.

Common Failure Modes

Connections

References


  1. Burden & Faires, Numerical Analysis, Gaussian elimination; NIST DLMF Ch. 3, https://dlmf.nist.gov/3 ↩︎