Solve a diagonally dominant linear system iteratively: update each unknown immediately using the most recent values within the same iteration. Example: 4x+y=9; x+4y=6; converges faster than Jacobi.

By using the updated x immediately, Gauss-Seidel typically converges faster than Jacobi iteration.

Example

Use each updated value immediately in the same iteration.

highlighted = computed this step

Step 1 — Set up

Set up the Gauss-Seidel system.

4x+y=9x+4y=64 x+y= 9 \quad x+ 4 y= 6

Step 2 — Iteration 1

Gauss-Seidel iteration 1: use the updated x immediately.

kxy0001941516\begin{array}{ccc}\text{k} & \text{x} & \text{y} \\ 0 & 0 & 0 \\ \hlmath{1} & \hlmath{\frac{9}{4}} & \hlmath{\frac{15}{16}}\end{array}

Step 3 — Iteration 2

Gauss-Seidel iteration 2: use the updated x immediately.

kxy0001941516212964255256\begin{array}{ccc}\text{k} & \text{x} & \text{y} \\ 0 & 0 & 0 \\ 1 & \frac{9}{4} & \frac{15}{16} \\ \hlmath{2} & \hlmath{\frac{129}{64}} & \hlmath{\frac{255}{256}}\end{array}

Step 4 — Result

Compare the last Gauss-Seidel iterate with the true solution.

kxy0001941516212964255256x2, y1\begin{array}{ccc}\text{k} & \text{x} & \text{y} \\ 0 & 0 & 0 \\ 1 & \frac{9}{4} & \frac{15}{16} \\ 2 & \frac{129}{64} & \frac{255}{256}\end{array} \quad x\to \hl{2} ,\ y\to \hl{1}
gauss-seidel The Gauss-Seidel method uses newly computed values immediately: x_{k+1} = (b1 - a12·y_k) / a11 y_{k+1} = (b2 - a21·x_{k+1}) / a22