22 Jacobi and Gauss-Seidel Methods
Standard stationary iterations based on diagonal and triangular splittings.
22.1 Jacobi Iteration
Decomposes \(\bA\) into diagonal \(\bD\) and remainder \(\bR\): \(\bA = \bD + \bR\).
\[ \begin{align} \bx^{(k+1)} = \bD^{-1}(\bb - \bR\bx^{(k)}) \end{align} \]
Component form: \(x_i^{(k+1)} = \frac{1}{a_{ii}}\left(b_i - \sum_{j \neq i} a_{ij}x_j^{(k)}\right)\).
Concurrency: All components update independently using values from the previous step.
(Jacobi performance) Jacobi iteration is inherently parallel, as all components can be updated simultaneously. However, it often exhibits slow convergence and requires double buffering of the solution vector.
22.2 Gauss-Seidel Iteration
Splits \(\bA = \bL_* + \bU_*\), where \(\bL_*\) includes the diagonal.
\[ \begin{align} \bL_* \bx^{(k+1)} = \bb - \bU_* \bx^{(k)} \end{align} \]
Component form: \(x_i^{(k+1)} = \frac{1}{a_{ii}}\left(b_i - \sum_{j < i} a_{ij}x_j^{(k+1)} - \sum_{j > i} a_{ij}x_j^{(k)}\right)\).
Update rule: Use updated values immediately within the same sweep.
(Gauss-Seidel performance) Sequential dependencies restrict efficient parallelization, but Gauss-Seidel typically converges twice as fast as Jacobi and allows for in-place updates.
22.3 Convergence Conditions
For \(\bA=\bD+\bL+\bU\), where \(\bL\) and \(\bU\) are the strict lower and upper triangular parts, \[ \begin{align} \bT_J = -\bD^{-1}(\bL+\bU) \end{align} \] is the Jacobi iteration matrix, and \[ \begin{align} \bT_{GS}=-(\bD+\bL)^{-1}\bU \end{align} \] is the Gauss-Seidel iteration matrix. By the result above, each method converges for every initial guess exactly when the corresponding spectral radius is less than \(1\).
Rewrite the result above in the form \(\bx^{(k+1)}=\bT_J\bx^{(k)}+\bc_J\).
Rewrite the result above in the form \(\bx^{(k+1)}=\bT_{GS}\bx^{(k)}+\bc_{GS}\).
Apply the result above to prove the convergence criterion in the result above.
Compute \(\bT_J\) and \(\bT_{GS}\) for \(\bA=\begin{pmatrix}2&1\\1&2\end{pmatrix}\).
If \(\bA\) is strictly diagonally dominant (\(|a_{ii}| > \sum_{j \neq i} |a_{ij}|\)), both Jacobi and Gauss-Seidel converge for any \(\bx^{(0)}\).
For Jacobi, use strict diagonal dominance to show that the infinity-norm row sums of \(\bT_J\) are less than \(1\).
Conclude \(\rho(\bT_J)\leq \|\bT_J\|_\infty<1\).
Repeat the argument for Gauss-Seidel by isolating the largest component of the error equation.
If \(\bA\) is SPD, Gauss-Seidel is guaranteed to converge. Jacobi may still diverge.
For \(\bA = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix}\), compute one step of Jacobi and Gauss-Seidel from \(\bzero\).
Compare \(\rho(\bT_J)\) and \(\rho(\bT_{GS})\). Does \(\rho_{GS} \approx \rho_J^2\) hold?
22.4 Successive Over-Relaxation (SOR)
Accelerates Gauss-Seidel by overshooting the update.
\[ \begin{align} x_i^{(k+1)} = (1-\omega)x_i^{(k)} + \omega \left[\text{GS update}\right] \end{align} \]
For SPD systems, SOR converges for relaxation parameters \[ \begin{align} 0<\omega<2. \end{align} \] For model Poisson problems, well-chosen \(\omega>1\) can reduce the iteration count substantially compared with Gauss-Seidel.
(SOR acceleration) For the 1D Poisson problem on a grid with spacing \(h\):
Jacobi and Gauss-Seidel require \(O(n^2)\) iterations.
Optimal SOR requires only \(O(n)\) iterations.
SOR effectively improves the convergence rate from \(O(h^2)\) to \(O(h)\).
Optimal Tuning: For \(\rho_J = 0.95\), calculate the optimal \(\omega^* = 2/(1 + \sqrt{1-\rho_J^2})\).
Convergence Sweep: Implement SOR and plot iterations to convergence vs. \(\omega \in [1, 2)\). Identify the ``cliff’’ at \(\omega^*\).
Check numerically that choices \(\omega\leq 0\) or \(\omega\geq 2\) fail on an SPD Poisson matrix, as predicted by the result above.
22.5 Stopping Criteria
Common stopping tests include
absolute residual: \(\|\br^{(k)}\| < \varepsilon\),
relative residual: \(\|\br^{(k)}\|/\|\bb\| < \varepsilon\),
increment: \(\|\bx^{(k+1)}-\bx^{(k)}\|<\varepsilon\).
Residual tests are tied to the equation; increment tests are cheap but can stop prematurely if convergence is slow.
Why is a small residual not enough to guarantee a small error \(\be^{(k)}\)? Use the result above.
Implement a robust solver that combines relative residual with a
max\_iterbudget.