In one line
Gauss–Jacobi rewrites each equation to make one unknown the subject, then repeatedly substitutes the previous round's values into all equations at once until the values settle.
Explained simply
Imagine three friends each trying to guess their own share of a bill, where each share depends on the other two. In round 1, everyone guesses using the old guesses of the others. In round 2, everyone updates using round 1 guesses. They keep going until nobody's number changes. That is Jacobi iteration: everyone updates simultaneously using only old values.
Technically, for a diagonally dominant system \(a_1x+b_1y+c_1z=d_1\), etc., write \(x=\dfrac{d_1-b_1y-c_1z}{a_1}\), \(y=\dfrac{d_2-a_2x-c_2z}{b_2}\), \(z=\dfrac{d_3-a_3x-b_3y}{c_3}\). Starting from an initial guess (often \(0,0,0\)), compute \(x^{(k+1)},y^{(k+1)},z^{(k+1)}\) using only \(x^{(k)},y^{(k)},z^{(k)}\).
How it works
- Check diagonal dominance; rearrange equations if needed so the biggest coefficient of each unknown is on the diagonal.
- Make \(x\), \(y\), \(z\) the subject of equations 1, 2, 3.
- Start with \(x^{(0)}=y^{(0)}=z^{(0)}=0\).
- Compute all new values from the old ones.
- Repeat until two successive iterations agree to the required decimals.
Key formula
\(x^{(k+1)}=\dfrac{d_1-b_1y^{(k)}-c_1z^{(k)}}{a_1},\ y^{(k+1)}=\dfrac{d_2-a_2x^{(k)}-c_2z^{(k)}}{b_2},\ z^{(k+1)}=\dfrac{d_3-a_3x^{(k)}-b_3y^{(k)}}{c_3}\)
Quick example
Solve \(10x+y+z=12\), \(x+10y+z=12\), \(x+y+10z=12\).
\(x=\dfrac{12-y-z}{10}\), and similarly for \(y\), \(z\).
| Iteration | \(x\) | \(y\) | \(z\) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1.2 | 1.2 | 1.2 |
| 2 | 0.96 | 0.96 | 0.96 |
| 3 | 1.008 | 1.008 | 1.008 |
| 4 | 0.9984 | 0.9984 | 0.9984 |
The values approach the exact solution \(x=y=z=1\).
Common mistakes
- Using new values within the same iteration; that is Gauss–Seidel, not Jacobi.
- Not rearranging a non-diagonally dominant system, so the iteration diverges.
- Stopping too early; the question usually asks for a fixed number of iterations or decimal accuracy.
How MU asks it
Common 5/6-mark question (and SCILAB tutorial): "Solve by Gauss–Jacobi method: \(20x+y-2z=17\), \(3x+20y-z=-18\), \(2x-3y+20z=25\)" (exact answer \(1,-1,1\)). Write the rearranged formulas, a clean iteration table, and the final values with the accuracy stated.