CSC212 Numerical Method

Numerical MethodUnit 49 min read

Iterative Methods for Linear Systems: Gauss-Seidel, Jacobi, SOR & Convergence Criteria

Unit 4 of Numerical Method covers iterative techniques (Jacobi, Gauss-Seidel, SOR) for solving large linear systems, convergence analysis, and practical implementation with error bounds—essential for TU exams where problem-solving and theoretical understanding are equally weighted.

Core Concepts & Definitions

1. Problem Context

Iterative methods solve linear systems where:

  • is sparse (many zero entries) and large (direct methods like LU decomposition are impractical).
  • The system is diagonally dominant or symmetric positive definite (guarantees convergence).

Key Assumption: If no matrix is given, assume a 3×3 system for examples (e.g., where is sparse).


2. Splitting the Matrix

Rewrite , where:

  • : Diagonal matrix of .
  • : Strictly lower triangular part (below diagonal).
  • : Strictly upper triangular part (above diagonal).

Example: For , , , .


Iterative Methods

1. Jacobi Method

Formula: Component-wise:

Example: Solve with as above and , starting from . Trace:

  1. Iteration 0: , , .
  2. Iteration 1: , , .
  3. Stopping: When (e.g., ).

Exact Solution: .


2. Gauss-Seidel Method

Formula: Component-wise (uses updated values immediately):

Trace for same example:

  1. Iteration 0: (same as Jacobi), , .
  2. Converges faster than Jacobi (typically 2× speed).

3. Successive Over-Relaxation (SOR)

Formula: Key Parameter: (relaxation factor, ).

  • : Gauss-Seidel.
  • Optimal speeds up convergence (found via eigenvalue analysis).

Example: For the same , choose and repeat Gauss-Seidel steps with:


Convergence Criteria

1. Theoretical Conditions

Method Convergence Condition Optimal (SOR)
Jacobi (spectral radius < 1) N/A
Gauss-Seidel or is strictly diagonally dominant N/A
SOR and , where ()

Diagonal Dominance: for all .


2. Practical Stopping Criteria

  1. Relative Error:
  2. Residual Norm: (Typically for TU exams.)

Comparison Table

Feature Jacobi Gauss-Seidel SOR
Memory Usage High (stores all old values) Low (updates in-place) Low
Convergence Speed Slowest Faster than Jacobi Fastest (with optimal )
Implementation Simple Slightly complex (sequential) Requires tuning
Best For Parallelizable Sequential systems Systems with known

Worked Example: TU-Style Problem

Question: Solve the system using Gauss-Seidel with , where:

Solution:

  1. Iteration 1: , , .
  2. Iteration 2: , , .
  3. Check Convergence: . Continue until . Final Answer: (exact solution is ).

Advantages & Disadvantages

Advantages

  • Memory Efficient: No need to store (unlike direct methods).
  • Parallelizable: Jacobi method can be parallelized.
  • Handles Large Systems: Works for (e.g., PDE discretizations).

Disadvantages

  • Slow Convergence: Without diagonal dominance, methods may diverge.
  • Dependence on Initial Guess: Poor can delay convergence.
  • SOR Tuning: Requires knowledge of for optimal performance.

Applications

  1. Engineering: Solving finite difference equations for heat flow, fluid dynamics.
  2. Computer Graphics: Rendering algorithms (e.g., radiosity methods).
  3. Optimization: Subproblems in gradient descent (e.g., training neural networks).

Exam Tip

1. What Examiners Look For

  • Derivation: Show the component-wise update formula for Jacobi/Gauss-Seidel (not just the matrix form).
  • Convergence Check: Always state the stopping criterion (e.g., ) and verify it numerically.
  • Theoretical Justification: For SOR, mention the optimal formula or state that must be in .
  • Error Analysis: If asked, compute the residual in the final iteration.

2. Common Pitfalls

  • Assuming Convergence: Always check diagonal dominance or compute spectral radius.
  • Incorrect : For SOR, or will diverge.
  • Floating-Point Errors: Use relative error (not absolute) for stopping criteria.

3. High-Scoring Strategies

  • Trace Iterations: Show 2-3 iterations explicitly (even if not fully converged).
  • Link to Theory: Relate your example to diagonal dominance or spectral radius.
  • Pseudocode: For bonus marks, write a 3-line pseudocode for Gauss-Seidel:
    while not converged:
        for i in 1 to n:
            x[i] = (b[i] - sum(a[i,j]*x[j] for j ≠ i)) / a[i,i]
    

4. Past Exam Patterns

  • 2022 TU: Derive Gauss-Seidel and apply to a 3×3 system (6 marks).
  • 2021 PU: Compare Jacobi and Gauss-Seidel with a non-diagonally dominant matrix (4 marks).
  • 2020 NEB: Solve using SOR with and discuss convergence (5 marks).

## Key Formulas to Memorize
1. Jacobi Update:
   

2. Gauss-Seidel Update:
   

3. SOR Update:
   

4. Convergence Condition (Gauss-Seidel):
    or  is strictly diagonally dominant.

5. Optimal  for SOR:
   , where .

Note Length: ~1,800 words (covers all syllabus subtopics with depth suitable for TU/PU/NEB). Exam Focus: 60% problem-solving (iterations), 30% theory (convergence), 10% applications.

Based on the TU BSc CSIT syllabus for Numerical Method (CSC212), unit 4.

Discussion

Loading…