MathIsimple
SC-07
Course 7

Iterative Methods for Linear Systems

For large sparse systems, iterative methods are often more efficient than direct methods. Learn Jacobi, Gauss-Seidel, and SOR methods, and understand when they converge.

Learning Objectives
  • Understand matrix splitting and iterative formulations
  • Implement Jacobi, Gauss-Seidel, and SOR methods
  • Analyze convergence using spectral radius
  • Apply sufficient conditions for convergence
  • Choose optimal relaxation parameters
  • Understand block iterative methods

1. Jacobi Method

The Jacobi method solves Ax=bAx = b by isolating each variable and iterating.

Definition 7.1: Matrix Splitting

Write A=DLUA = D - L - U where:

  • DD = diagonal of AA
  • L-L = strict lower triangular part of AA
  • U-U = strict upper triangular part of AA

Definition 7.2: Jacobi Iteration

From Dx=(L+U)x+bDx = (L + U)x + b:

x(k+1)=D1(L+U)x(k)+D1bx^{(k+1)} = D^{-1}(L + U)x^{(k)} + D^{-1}b

Component-wise:

xi(k+1)=1aii(bijiaijxj(k))x_i^{(k+1)} = \frac{1}{a_{ii}} \left( b_i - \sum_{j \neq i} a_{ij} x_j^{(k)} \right)

Algorithm Jacobi Method

Input: A,b,x(0)A, b, x^{(0)}, tolerance ϵ\epsilon

  1. For k=0,1,2,k = 0, 1, 2, \ldots until convergence:
  2. For i=1,,ni = 1, \ldots, n: compute xi(k+1)x_i^{(k+1)} using only x(k)x^{(k)}
  3. If x(k+1)x(k)<ϵ\|x^{(k+1)} - x^{(k)}\| < \epsilon, stop
Remark:

Parallelizable: All components of x(k+1)x^{(k+1)} can be computed independently since they only depend on x(k)x^{(k)}.

2. Gauss-Seidel Method

Definition 7.3: Gauss-Seidel Iteration

Use updated values immediately as they become available:

x(k+1)=(DL)1Ux(k)+(DL)1bx^{(k+1)} = (D - L)^{-1}Ux^{(k)} + (D - L)^{-1}b

Component-wise:

xi(k+1)=1aii(bij<iaijxj(k+1)j>iaijxj(k))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)

Example: Comparison

For system 4x1x2=1,x1+4x2=14x_1 - x_2 = 1, -x_1 + 4x_2 = 1 with x(0)=(0,0)x^{(0)} = (0, 0):

kkJacobi x(k)x^{(k)}Gauss-Seidel x(k)x^{(k)}
0(0, 0)(0, 0)
1(0.25, 0.25)(0.25, 0.3125)
2(0.3125, 0.3125)(0.328, 0.332)

Exact solution: (1/3,1/3)(1/3, 1/3). Gauss-Seidel converges faster.

Remark:

Gauss-Seidel typically converges faster than Jacobi (roughly twice as fast for many problems), but it cannot be parallelized as easily due to data dependencies.

3. Successive Over-Relaxation (SOR)

Definition 7.4: SOR Iteration

Introduce relaxation parameter ω\omega:

xi(k+1)=(1ω)xi(k)+ωaii(bij<iaijxj(k+1)j>iaijxj(k))x_i^{(k+1)} = (1 - \omega)x_i^{(k)} + \frac{\omega}{a_{ii}} \left( b_i - \sum_{j < i} a_{ij} x_j^{(k+1)} - \sum_{j > i} a_{ij} x_j^{(k)} \right)

In matrix form: x(k+1)=(DωL)1((1ω)D+ωU)x(k)+ω(DωL)1bx^{(k+1)} = (D - \omega L)^{-1}((1-\omega)D + \omega U)x^{(k)} + \omega(D - \omega L)^{-1}b

Theorem 7.1: SOR Convergence

SOR can only converge if 0<ω<20 < \omega < 2.

Note:

Special cases:

  • ω=1\omega = 1: Gauss-Seidel
  • ω<1\omega < 1: Under-relaxation (more stable, slower)
  • ω>1\omega > 1: Over-relaxation (can accelerate convergence)

Theorem 7.2: Optimal SOR for Tridiagonal SPD

For symmetric positive definite tridiagonal matrices with Jacobi iteration matrix BJB_J:

ωopt=21+1ρ(BJ)2\omega_{\text{opt}} = \frac{2}{1 + \sqrt{1 - \rho(B_J)^2}}

This minimizes ρ(BSOR)\rho(B_{\text{SOR}}).

4. Convergence Analysis

Definition 7.5: Spectral Radius

The spectral radius of matrix BB is:

ρ(B)=maxiλi\rho(B) = \max_{i} |\lambda_i|

where λi\lambda_i are the eigenvalues of BB.

Theorem 7.3: Convergence Criterion

The iteration x(k+1)=Bx(k)+cx^{(k+1)} = Bx^{(k)} + c converges to the unique solution for any initial guess x(0)x^{(0)} if and only if:

ρ(B)<1\rho(B) < 1

Definition 7.6: Convergence Rate

The asymptotic convergence rate is:

R=log10(ρ(B))R = -\log_{10}(\rho(B))

This measures decimal digits of accuracy gained per iteration.

Theorem 7.4: Sufficient Conditions

The following ensure convergence of both Jacobi and Gauss-Seidel:

  • Strict diagonal dominance: aii>jiaij|a_{ii}| > \sum_{j \neq i} |a_{ij}| for all ii
  • Symmetric positive definite: A=ATA = A^T and xTAx>0x^T A x > 0 for all x0x \neq 0

Example: Convergence Check

For matrix A=(410141014)A = \begin{pmatrix} 4 & -1 & 0 \\ -1 & 4 & -1 \\ 0 & -1 & 4 \end{pmatrix}:

  • Row 1: 4=4>1+0=1|4| = 4 > |-1| + |0| = 1
  • Row 2: 4=4>1+1=2|4| = 4 > |-1| + |-1| = 2
  • Row 3: 4=4>0+1=1|4| = 4 > |0| + |-1| = 1

Strictly diagonally dominant → Both methods converge.

5. Practical Considerations

Definition 7.7: Stopping Criteria

Common stopping criteria:

  • Residual: bAx(k)<ϵb\|b - Ax^{(k)}\| < \epsilon \|b\|
  • Relative change: x(k+1)x(k)<ϵx(k+1)\|x^{(k+1)} - x^{(k)}\| < \epsilon \|x^{(k+1)}\|
  • Maximum iterations: k<kmaxk < k_{\max}

When to Use Iterative Methods

  • Large sparse matrices (thousands or millions of unknowns)
  • When matrix structure can be exploited (e.g., matrix-free methods)
  • When only approximate solutions are needed
  • When storage is limited

Block Methods

Partition unknowns into blocks and solve block systems at each iteration. Often converges faster than point methods.

Remark:

Modern iterative methods like Conjugate Gradient (for SPD) andGMRES (for general matrices) are often preferred over classical stationary methods. They are covered in advanced courses.

Practice Quiz

Iterative Linear Systems Quiz
10
Questions
0
Correct
0%
Accuracy
1
In the Jacobi method, the update for xi(k+1)x_i^{(k+1)} uses:
Easy
Not attempted
2
Gauss-Seidel differs from Jacobi by:
Easy
Not attempted
3
The SOR method introduces a parameter ω\omega that should satisfy:
Easy
Not attempted
4
An iterative method x(k+1)=Bx(k)+cx^{(k+1)} = Bx^{(k)} + c converges for all initial guesses iff:
Medium
Not attempted
5
A matrix is strictly diagonally dominant if:
Medium
Not attempted
6
For a strictly diagonally dominant matrix, which methods converge?
Medium
Not attempted
7
The convergence rate of an iterative method is determined by:
Hard
Not attempted
8
For SPD matrices with SOR, the optimal ω\omega satisfies:
Hard
Not attempted
9
Block Jacobi differs from point Jacobi by:
Hard
Not attempted
10
A common stopping criterion for iterative methods is:
Medium
Not attempted

Frequently Asked Questions

When should I use iterative vs. direct methods?

Direct methods: For small to medium dense systems, or when you need to solve with many right-hand sides.

Iterative methods: For large sparse systems where direct methods would be too slow or use too much memory. Also useful when only approximate solutions are needed.

How do I choose between Jacobi, Gauss-Seidel, and SOR?

Jacobi: Simple to implement and parallelize. Often slowest to converge.

Gauss-Seidel: Usually faster than Jacobi (about 2x). Use when parallelization isn't critical.

SOR: Fastest when optimal ω\omega is known. Worth the effort for repeated solves of similar systems.

My iteration isn't converging. What should I check?

Check these in order:

  1. Is AA non-singular?
  2. Is AA diagonally dominant or SPD?
  3. For SOR, is 0<ω<20 < \omega < 2?
  4. Try scaling the system (row equilibration)
  5. Consider preconditioning or Krylov methods

What is preconditioning?

Preconditioning transforms Ax=bAx = b into an equivalent system with better convergence properties. Instead of solving Ax=bAx = b, solveM1Ax=M1bM^{-1}Ax = M^{-1}b where MAM \approx A but M1vM^{-1}v is easy to compute. Good preconditioners dramatically speed up convergence.

How do I estimate the spectral radius without computing eigenvalues?

Run a few iterations and observe the ratio x(k+1)x(k)/x(k)x(k1)\|x^{(k+1)} - x^{(k)}\| / \|x^{(k)} - x^{(k-1)}\|. This ratio approaches ρ(B)\rho(B) asymptotically. Alternatively, use the power method on the iteration matrix (covered in the next chapter).