Read this lesson as text

Iterative Method Examples

Numerical Analysis · Axiom Academy

EXAMPLE Comparing Jacobi and Gauss-Seidel Step-by-step iteration comparison Solve the following system using both Jacobi and Gauss-Seidel methods, starting from x⁽⁰⁾ = (0, 0, 0): Before iterating, verify the matrix is diagonally dominant to guarantee convergence: Row 1: |5| = 5 > |1| + |1| = 2 ✓ Row 2: |5| = 5 > |1| + |1| = 2 ✓ Row 3: |5| = 5 > |1| + |1| = 2 ✓ Is this matrix strictly diagonally dominant? Rearrange each equation to isolate the diagonal variable: Using x⁽⁰⁾ = (0, 0, 0), what is x₁⁽¹⁾ for Jacobi? Compute all new values using OLD values x⁽⁰⁾ = (0, 0, 0): Jacobi k=1: x⁽¹⁾ = (1.2, 1.4, 1.6) In Gauss-Seidel, what would x₂⁽¹⁾ be? (Remember: use x₁⁽¹⁾ immediately) Compute new values using latest available values: x₂⁽¹⁾ = (7 - 1.2 - 0 )/5 = 5.8/5 = 1.16 x₃⁽¹⁾ = (8 - 1.2 - 1.16 )/5 = 5.64/5 = 1.128 Gauss-Seidel k=1: x⁽¹⁾ = (1.2, 1.16, 1.128) After just one iteration, which method is closer to the true solution (1, 1, 1)? Here's how both methods converge over several iterations: Key Observation: Gauss-Seidel converges in about half the iterations of Jacobi because it uses updated information immediately! You've seen how Gauss-Seidel's "use it now" strategy leads to faster convergence!

This is the written version of the interactive lesson above. See the full Numerical Analysis course.