Read this lesson as text
Gaussian Elimination Examples
Numerical Analysis · Axiom Academy
EXAMPLE Gaussian Elimination with Partial Pivoting Step-by-step solution of a 3×3 linear system Solve the following system using Gaussian elimination with partial pivoting: First, write the system as an augmented matrix [A|b]: For the first pivot column, which row has the largest absolute value in position (i,1)? Swap Row 1 and Row 2 so the pivot element is 4: Now eliminate below the pivot using: R2 → R2 - (2/4)R1 = R2 - 0.5R1 R3 → R3 - (1/4)R1 = R3 - 0.25R1 After eliminating below the first pivot, what is the value in position (2,2)? After first elimination, we have: For the second pivot column (positions 2,2 and 3,2), compare |3.5| vs |2.25|. Row 2 has the larger value, so no swap needed. Eliminate using: R3 → R3 - (2.25/3.5)R2 What is the final value in position (3,3) after the second elimination? The upper triangular system is: From Row 3: 0.5x₃ = 0.5 → x₃ = 1 From Row 2: 3.5x₂ + 0·x₃ = 3.5 3.5x₂ = 3.5 → x₂ = 1 From Row 1: 4x₁ - x₂ + 2x₃ = 5 4x₁ - 1 + 2 = 5 → 4x₁ = 4 → x₁ = 1 What is the solution to the system? Always verify by substituting back into the original equations: Equation 1: 2(1) + 3(1) + 1(1) = 2 + 3 + 1 = 6 ✓ Equation 2: 4(1) - 1(1) + 2(1) = 4 - 1 + 2 = 5 ✓ Equation 3: 1(1) + 2(1) + 1(1) = 1 + 2 + 1 = 4 ✓ Gaussian elimination with partial pivoting successfully solved the system!
This is the written version of the interactive lesson above. See the full Numerical Analysis course.