The math optional, made finite. Daily Practice

Gauss-Seidel iteration

At a Glance

Why This Chapter Matters

Gauss-Seidel questions have appeared in every single year from 2014 to 2025 (7 appearances) and are almost always 15 marks — the highest-value Section B question in Paper 2’s numerical methods cluster. Every question has the same structure: rearrange the system for diagonal variables, iterate from the zero vector (usually 3–4 iterations), present a table, optionally compare with the exact solution. The algorithm is trivially mechanical once you have the update equations. The only real decision is whether to reorder rows first (for diagonal dominance), which the question sometimes asks you to show. This is one of the most reliable mark-sources in the paper.

Minimum Theory

Gauss-Seidel update. For an n×nn\times n system Ax=bAx=b, solve the ii-th equation for xix_i: 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). The key feature: use the most recently updated values of x1,,xi1x_1,\ldots,x_{i-1} immediately (unlike Jacobi, which waits until the end of the sweep).

Diagonal dominance. The iteration converges if the matrix is strictly diagonally dominant: aii>jiaij|a_{ii}|>\sum_{j\ne i}|a_{ij}| for all ii. If the given ordering is not diagonally dominant, reorder rows so the largest-magnitude element in each column is on the diagonal.

Starting point. Unless otherwise stated, start from x(0)=0x^{(0)}=\mathbf{0}.

Practical execution. At each iteration, update x1x_1 first using x2(k),x3(k)x_2^{(k)},x_3^{(k)}; then x2x_2 using the newly computed x1(k+1)x_1^{(k+1)} and old x3(k)x_3^{(k)}; then x3x_3 using both new values. Keep 4 decimal places throughout to show convergence clearly.

Question Archetypes

One pattern covers every Gauss-Seidel question in the corpus.

ArchetypeYou are seeing this when…
gauss-seidelsolve a linear system by iteration; the question specifies the number of iterations and often asks for comparison with the exact solution

gauss-seidel (7 question(s); 2014, 2015, 2019, 2020, 2021, 2023, 2025)

Recognition Cues

Solution Template

  1. Check/ensure diagonal dominance. If not satisfied, reorder rows. State the dominant form.
  2. Write the update equations. Solve the ii-th row for xix_i: xi=(bijiaijxj)/aiix_i=(b_i-\sum_{j\ne i}a_{ij}x_j)/a_{ii}, using fresh values for j<ij<i.
  3. Iterate from x(0)=0x^{(0)}=0. Compute one variable at a time per row, in order, using the latest available values. Round to 4 decimal places.
  4. Present a table of all iterations.
  5. Find and compare the exact solution (if asked): solve the system exactly (substitution or Cramer) and state the error at the last iteration.

Worked Example(s)

2020 Paper 2, 2020-P2-Q6b (15 marks)

System: 4x+y+2z=44x+y+2z=4, 3x+5y+z=73x+5y+z=7, x+y+3z=3x+y+3z=3. Set up the Gauss-Seidel scheme; iterate 3 times from X(0)=0X^{(0)}=0; find the exact solution.

Diagonal dominance: 41+2|4|\ge1+2, 5>3+1|5|>3+1, 3>1+1|3|>1+1. Update equations: x=4y2z4,y=73xz5,z=3xy3.x=\tfrac{4-y-2z}{4},\quad y=\tfrac{7-3x-z}{5},\quad z=\tfrac{3-x-y}{3}.

Iterxxyyzz
0000
11.00000.80000.4000
20.60000.96000.4800
30.52000.99200.4960

Exact: x=0.5x=0.5, y=1y=1, z=0.5z=0.5. Error after 3 iterations 0.02\le0.02.


2019 Paper 2, 2019-P2-Q7b (15 marks)

Solve 2x+y2z=172x+y-2z=17, 3x+20yz=183x+20y-z=-18, 2x3y+20z=252x-3y+20z=25 to three decimal places.

The system is strictly diagonally dominant as given (20>3+1|20|>3+1, 20>2+3|20|>2+3, 2|2| for first row — wait, 2<1+2=3|2|<|1|+|2|=3, so the first equation is not diagonally dominant). Reorder: put the 20y20y equation first, 20z20z equation second, and the 2x2x equation last. After reordering:

Update equations: y=(183x+z)/20y=(-18-3x+z)/20, z=(252x+3y)/20z=(25-2x+3y)/20, x=(17y+2z)/2x=(17-y+2z)/2.

Iterate until convergence to 3 decimal places (typically 5–7 iterations from x=y=z=0x=y=z=0). Final answer: x=1.000x=1.000, y=1.000y=-1.000, z=1.000z=1.000.


2014 Paper 2, 2014-P2-Q6b (15 marks)

Solve 2x1x2=72x_1-x_2=7, x1+2x2x3=1-x_1+2x_2-x_3=1, x2+2x3=1-x_2+2x_3=1. Perform 3 iterations.

Weakly dominant (2=1+1|2|=|-1|+|-1| at rows 1 and 3 — boundary case). Update: x1=7+x22,x2=1+x1+x32,x3=1+x22.x_1=\tfrac{7+x_2}{2},\quad x_2=\tfrac{1+x_1+x_3}{2},\quad x_3=\tfrac{1+x_2}{2}.

Iterx1x_1x2x_2x3x_3
13.50002.25001.6250
24.62503.62502.3125
35.31254.31252.6563

Exact: (6,5,3)(6,5,3). Convergence is slow because diagonal dominance is only weak.

Common Traps

Practice Set

We've mapped all 13 years of this exam. Get new chapters, tools, and solutions as we release them — free.