The Gauss-Seidel Method is an iterative technique designed to solve large systems of linear equations. By immediately plugging newly calculated variable values into subsequent equations within the exact same pass, it accelerates convergence!
1. Diagonal DominanceEnsure ∣a1∣>∣b1∣+∣c1∣ for guaranteed convergence.
2. Isolate VariablesSolve equation 1 for x, 2 for y, 3 for z.
3. Immediate UpdateUse new x(k+1) immediately when solving for y(k+1).
x(k+1)=a1d1−b1y(k)−c1z(k)
y(k+1)=b2d2−a2x(k+1)−c2z(k)
z(k+1)=c3d3−a3x(k+1)−b3y(k+1)
WHAT EACH SYMBOL MEANS
ai,bi,ciThe coefficients of x, y, z in equation i. The diagonal ones (a₁, b₂, c₃) should be the largest in their rows.Example: a1=4,b2=5,c3=6
diThe right-hand side of equation i.Example: d1=12
x(k),y(k),z(k)The values after k iterations. Start from a guess, usually all zeros.Example: (0,0,0)
x(k+1)The new value, worked out from the latest values available. Gauss–Seidel uses each new value straight away.Example: x1=3
∣a1∣>∣b1∣+∣c1∣Diagonal dominance: each diagonal coefficient beats the others in its row. It guarantees convergence.Example: 4>1+1
εThe tolerance. Stop when no value changes by more than it between iterations.Example: ε=0.001
Step-by-Step Worked Example
HAND-HOLDING TUTORIAL
OUR PROBLEM TO SOLVE
Solve the 3x3 linear system starting from initial guess (x0,y0,z0)=(0,0,0):
⎩⎨⎧4x+y+z=12x+5y+2z=272x+y+6z=18
STEP 01 • ISOLATE DIAGONAL VARIABLES
Solve each equation for its diagonal dominant variable:
x=412−y−z
y=527−x−2z
z=618−2x−y
STEP 02 • FIRST ITERATION (IMMEDIATE REUSE)
Substitute initial guess y=0,z=0 to find x1, then immediately use x1 to find y1, and so on:
x1=412−0−0=3.0000
y1=527−3.0000−2(0)=524=4.8000
z1=618−2(3.0000)−4.8000=67.2=1.2000
STEP 03 • SECOND ITERATION
Plug (y1,z1)=(4.8,1.2) into the recurrence formulas:
x2=412−4.8000−1.2000=46.0=1.5000
y2=527−1.5000−2(1.2000)=523.1=4.6200
z2=618−2(1.5000)−4.6200=610.38=1.7300
STEP 04 • STEP-BY-STEP ITERATIONS WALKTHROUGH
Iteration 3:
x3=412−4.6200−1.7300=45.6500=1.4125
y3=527−1.4125−2(1.7300)=522.1275=4.4255
z3=618−2(1.4125)−4.4255=610.7495=1.7916
The new x3 is used straight away for y3, and both for z3. Largest change from the last iteration: 0.1945.
Iteration 4:
x4=412−4.4255−1.7916=45.7829=1.4457
y4=527−1.4457−2(1.7916)=521.9711=4.3942
z4=618−2(1.4457)−4.3942=610.7143=1.7857
The new x4 is used straight away for y4, and both for z4. Largest change from the last iteration: 0.0332.
Iterations 5–7 follow the same pattern (see the table). Stop when no value changes by more than the tolerance: after iteration 7 the largest change is 0.0002<0.001.
STEP 05 • ITERATION SUMMARY TABLE
Step (k)
x
y
z
Largest change
0
0.0000
0.0000
0.0000
1
3.0000
4.8000
1.2000
4.8000
2
1.5000
4.6200
1.7300
1.5000
3
1.4125
4.4255
1.7916
0.1945
4
1.4457
4.3942
1.7857
0.0332
5
1.4550
4.3947
1.7825
0.0093
6
1.4557
4.3958
1.7821
0.0011
7
1.4555
4.3960
1.7822
0.0002
FINAL CONCLUSION
Converged Solution: (x, y, z) ≈ (1.4555, 4.3960, 1.7822)
By immediately reusing newly solved values within each pass, Gauss-Seidel converges much faster than Jacobi iteration!
Common Mistakes
LOSE NO MARKS+
MISTAKE 01
Using last round's values for everything (that is Jacobi).
FIXIn Gauss–Seidel, y(k+1) already uses the new x(k+1), and z(k+1) uses both new values.
MISTAKE 02
Not checking diagonal dominance.
FIXReorder the equations so the largest coefficient of x is in row 1, of y in row 2, of z in row 3. Without it the values may grow instead of settle.
MISTAKE 03
Rearranging an equation for the wrong variable.
FIXEquation 1 gives x, equation 2 gives y, equation 3 gives z: divide by the diagonal coefficient.
MISTAKE 04
Sign slips when moving terms across.
FIXx+5y+2z=27 gives y=527−x−2z: every other term changes sign.
MISTAKE 05
Stopping after two iterations.
FIXContinue until no value changes by more than the tolerance; here that takes 7 iterations for 0.001.
MISTAKE 06
Writing only the final answer.
FIXShow the rearranged formulas, the first iteration with numbers, and a table of every iteration.
LABORATORY
Interactive Live Calculator & Visualizer
LINEAR ALGEBRA SYSTEM SOLVER
Gauss-Seidel Interactive Engine
Common Questions
What is the Gauss-Seidel method?+
An iterative way to solve linear equations. Make each equation give one unknown, then keep updating x, y, z in turn, always using the newest values.
When does Gauss-Seidel converge?+
It is guaranteed when the system is diagonally dominant: in each row the diagonal number is bigger than the sum of the others. NETZ reorders the equations to get this when it can.
Gauss-Seidel vs Jacobi?+
Jacobi uses only the previous round’s values; Gauss-Seidel uses each new value straight away, so it usually needs about half as many rounds.