UNIHIVE

Study Hub UNIPORT ENG 303

ENG 303 · Engineering Mathematics V (Numerical Methods and Computer Application)

Linear systems: Jacobi and Gauss-Seidel iteration

Iterative solution of large systems, the Jacobi and Gauss-Seidel methods, diagonal dominance and convergence, and relaxation.

Our notes

1 min read

Why iterate

Large systems from finite-difference grids (thousands of unknowns, mostly zeros in A) are cheaper to solve by iteration than by elimination.

Jacobi method

Solve each equation for its diagonal unknown, and use the old values on the right:
xᵢ(new) = [bᵢ − Σ (j ≠ i) aᵢⱼ xⱼ(old)] / aᵢᵢ.
Worked example.
10x + y + z = 12
x + 10y + z = 12
x + y + 10z = 12 (exact solution x = y = z = 1)
Starting from (0, 0, 0):

Iterationxyz
11.21.21.2
20.960.960.96
31.0081.0081.008

Gauss-Seidel method

Use each new value as soon as it is computed:

Iterationxyz
11.2(12 − 1.2 − 0)/10 = 1.08(12 − 1.2 − 1.08)/10 = 0.972
2(12 − 1.08 − 0.972)/10 = 0.9948(12 − 0.9948 − 0.972)/10 = 1.00332(12 − 0.9948 − 1.00332)/10 = 1.000188

Gauss-Seidel usually converges about twice as fast as Jacobi and needs to store only one copy of x.

When they converge

A sufficient condition: A is strictly diagonally dominant (in each row, |aᵢᵢ| > sum of the other |aᵢⱼ|). Reorder the equations to achieve it where possible. Symmetric positive definite matrices also guarantee Gauss-Seidel convergence.

Stopping

Stop when the largest change between iterations (or the residual b − Ax) is below a tolerance, with a maximum number of iterations.

Successive over-relaxation (SOR)

x(new) = ω × (Gauss-Seidel value) + (1 − ω) × x(old). With 1 < ω < 2 it can greatly speed up convergence on grid problems; ω = 1 is plain Gauss-Seidel.

Exams usually ask: perform two or three Jacobi or Gauss-Seidel iterations; state the convergence condition; rearrange equations to be diagonally dominant; compare the methods.

Common mistake: in Gauss-Seidel, using old values for unknowns already updated in the same sweep. That turns it back into Jacobi.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All ENG 303 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.