On this page
You can solve three equations in three unknowns by elimination in a few minutes. A computer facing a million unknowns, most coefficients zero, often does something humbler: guess, correct, repeat. Jacobi and Gauss–Seidel are the two classic ways to do that, and you can run both with a pencil.
What are the Jacobi and Gauss–Seidel update formulas?
Write equation i as a_ii x_i + (the other terms) = b_i and solve it for x_i.
The Jacobi method computes every new value from old values only: x_i(new) = (b_i − Σ over j≠i of a_ij x_j(old)) / a_ii, as set out in the Jacobi method article. Because the whole old vector is needed until the sweep ends, you cannot overwrite x_i in place.
The Gauss–Seidel method uses the same rule but plugs in each new value as soon as it exists: for x_i it uses the new x_1 to x_(i−1) and the old x_(i+1) to x_n, as in the Gauss–Seidel method article. The same article notes that Gauss mentioned the idea only in a private letter to his student Gerling in 1823, and Seidel published it in 1874.
In matrix form, split A into its diagonal D, strictly lower part L and strictly upper part U. Jacobi's iteration matrix is −D⁻¹(L + U) and Gauss–Seidel's is −(L + D)⁻¹U, as derived in UT Austin course notes on convergence theorems for two iterative methods.
How do you iterate a 3×3 system by hand?
Take this system. Its exact solution is x = 1, y = 2, z = 3:
4x − y = 2
−x + 4y − z = 4
−y + 4z = 10
Solve each equation for its diagonal unknown:
x = (2 + y) / 4
y = (4 + x + z) / 4
z = (10 + y) / 4
Start both methods from (0, 0, 0).
Jacobi. Sweep 1 uses only zeros: x = 0.5, y = 1, z = 2.5. Sweep 2 uses those three numbers: x = (2 + 1)/4 = 0.75, y = (4 + 0.5 + 2.5)/4 = 1.75, z = (10 + 1)/4 = 2.75. Sweep 3 gives (0.9375, 1.875, 2.9375) and sweep 4 gives (0.96875, 1.96875, 2.96875).
Gauss–Seidel. Sweep 1: x = (2 + 0)/4 = 0.5, then y = (4 + 0.5 + 0)/4 = 1.125 using the new x, then z = (10 + 1.125)/4 = 2.78125 using the new y. Sweep 2 gives (0.78125, 1.890625, 2.97265625), sweep 3 gives (0.97265625, 1.98632813, 2.99658203) and sweep 4 gives (0.99658203, 1.99829102, 2.99957275).
Measure the error as the largest gap from (1, 2, 3). After 4 Gauss–Seidel sweeps it is about 0.0034. Jacobi needs 6 sweeps to reach 0.0039 and 7 to reach 0.0020.
Why does Gauss–Seidel converge about twice as fast?
Each sweep multiplies the error, in the long run, by the spectral radius ρ of the iteration matrix (its largest eigenvalue in absolute value), so the number of sweeps needed scales like 1/log(1/ρ), as explained in Bindel's Cornell lecture notes on iterative methods. For the 2D model problem in those notes, with red-black ordering, ρ(Gauss–Seidel) = ρ(Jacobi)², so each Gauss–Seidel iteration reduces the error by the same amount as two Jacobi iterations.
The general result is for consistently ordered matrices: there the Gauss–Seidel spectral radius equals the square of the Jacobi one, as stated in Hu's UCLA notes on stationary iterative methods. You can check by hand that Jacobi's ρ is √2/4 ≈ 0.354 and Gauss–Seidel's is exactly 1/8, its square. That is why Jacobi's error above falls by a factor of 8 every two sweeps, and Gauss–Seidel's falls by 8 every sweep after the first.
The UT Austin notes point out that their convergence bound does not guarantee Gauss–Seidel always converges faster, though it is often observed in practice to converge about twice as fast as Jacobi.
When do Jacobi and Gauss–Seidel converge?
A stationary iteration converges for every starting vector if and only if the spectral radius of its iteration matrix is below 1 (Theorem 2 in the UT Austin notes).
A matrix is strictly diagonally dominant when, in every row, the size of the diagonal entry beats the sum of the sizes of the other entries. Both Jacobi and Gauss–Seidel converge from any starting vector for such a matrix (Theorems 3 and 4 in the same notes). Our system passes: 4 > 1, 4 > 2 and 4 > 1.
The condition is sufficient, not necessary: the Jacobi method article notes that Jacobi sometimes converges without it, and the Gauss–Seidel article adds that Gauss–Seidel also converges for symmetric positive definite matrices.
What happens when the system is not diagonally dominant?
Swap the first two equations. The solution is still (1, 2, 3), but the diagonal is now −1, −1 and 4. The update rules become x = 4y − z − 4, y = 4x − 2 and z = (10 + y)/4.
Jacobi from zero: (−4, −2, 2.5), then (−14.5, −18, 2), then (−78, −60, −2).
Gauss–Seidel from zero: (−4, −18, −2), then (−74, −298, −72).
Both run away. By hand, Jacobi's spectral radius here is about 4.03 and Gauss–Seidel's is 15. Both exceed 1, so Theorem 2 in the UT Austin notes rules out convergence from every start, and the faster method blows up faster.
If the eigenvalue side of this feels shaky, the Fermi Concept Library has a lesson for every concept in mathematics, each placed in its map. To practise, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Try one more system of your own: make it diagonally dominant, run three sweeps of each method, and watch the gap.



