UcenlyOpen in the app

Differential Equations & Numerical Methods · BE5B01DEN · Topic 10 of 13

Iterative methods for linear systems: Jacobi, Gauss–Seidel

Week 10. Jacobi uses old values, Gauss–Seidel reuses the new ones; strict diagonal dominance guarantees convergence.

Open the interactive lesson

Key ideas

Jacobi and Gauss–Seidel sweeps

Solve the i-th equation for xᵢ. Jacobi computes the whole new vector from the old one; Gauss–Seidel uses the already updated entries x₁,…,xᵢ₋₁ inside the same sweep, so it usually converges faster.

When does it converge?

The iteration xₖ₊₁=Bx_k+c converges for every start exactly when ϱ(B)<1, and ‖B‖<1 in some induced norm is sufficient. Strictly diagonally dominant matrices make both methods converge; reorder the equations to get a large diagonal.

Relaxation (SOR)

Blend the Gauss–Seidel value with the old value using a parameter ω. For a symmetric matrix with positive diagonal, SOR converges for every start exactly when A is positive definite and 0<ω<2 (Ostrowski).

In one line: Check the matrix, not the iteration: dominance or ϱ(B)<1 decides before you compute anything.

Formulas

Practice with worked solutions

Question 1

Apply the Jacobi iteration from (0, 0) and give x₂.

4x+y=9x+3y=7\begin{aligned}4x+y&=9\\x+3y&=7\end{aligned}
Worked solution

Answer: 5/3

  1. x1=94, y1=73x_1=\tfrac94,\ y_1=\tfrac73
  2. x2=9−7/34=53x_2=\frac{9-7/3}4=\frac53

Both new values of a sweep use only the old vector.

Question 2

Apply the Gauss–Seidel iteration from (0, 0) and give y₂.

4x+y=9x+3y=7\begin{aligned}4x+y&=9\\x+3y&=7\end{aligned}
Worked solution

Answer: 247/144

  1. x1=94,y1=7−9/43=1912x_1=\tfrac94,\quad y_1=\frac{7-9/4}3=\frac{19}{12}
  2. x2=9−19/124=8948,y2=7−89/483=247144x_2=\frac{9-19/12}4=\frac{89}{48},\quad y_2=\frac{7-89/48}3=\frac{247}{144}

Each sweep updates x first and uses the new x to update y.

Question 3

In which order should the equations be listed so that both Jacobi and Gauss–Seidel are guaranteed to converge?

(E1)  x+2z=−2(E2)  3x+y−z=9(E3)  x+4y+z=4\begin{aligned}\text{(E1)}\ \ x+2z&=-2\\\text{(E2)}\ \ 3x+y-z&=9\\\text{(E3)}\ \ x+4y+z&=4\end{aligned}
  1. E1, E2, E3
  2. E2, E3, E1 (correct)
  3. E3, E2, E1
  4. E2, E1, E3
Worked solution
  1. (31−1141102):  3>2,  4>2,  2>1\begin{pmatrix}3&1&-1\\1&4&1\\1&0&2\end{pmatrix}:\ \ 3>2,\ \ 4>2,\ \ 2>1

Put each unknown’s largest coefficient on the diagonal until the matrix is strictly diagonally dominant.

More Differential Equations & Numerical Methods practice in Ucenly

Sources

Written by Ucenly. Based on the BE5B01DEN course materials: