Solve a diagonally-dominant linear system iteratively using the Jacobi method.
The Jacobi method rearranges each equation of a 3x3 system to isolate one variable, then sweeps through all three simultaneously using only values from the previous sweep. That simultaneity is its defining property: every update in a sweep is computed from the same old vector, which makes Jacobi trivially parallelisable but slower to converge than methods that reuse fresh values. Convergence is guaranteed when the matrix is strictly diagonally dominant, meaning each diagonal entry outweighs the sum of the other entries in its row, so the calculator reports that dominance ratio alongside the solution — a ratio above 1 means the iteration is certain to settle, and the further above 1, the fewer sweeps it takes.
Jacobi sweep
x_i(new) = (b_i - sum over j not equal to i of a_ij x_j(old)) / a_ii
Diagonal dominance ratio
ratio = min over rows of |a_ii| / sum of |a_ij| for j not equal to i
Stopping test
Stop when max |x_i(new) - x_i(old)| < tolerance
It is the tightest row in the matrix: the diagonal coefficient divided by the sum of the other coefficients in that row. Above 1 the matrix is strictly diagonally dominant and Jacobi is guaranteed to converge from any starting guess. Below 1 it may still converge, but nothing guarantees it.
For a convergent system Jacobi has a unique fixed point, so every starting vector lands on the same solution. The guess only affects how many sweeps that takes — a good guess can halve the sweep count, which matters for large systems.
When you can compute the three updates on separate processors. Jacobi reads only the previous vector, so all updates in a sweep are independent and parallel. Gauss-Seidel converges in fewer sweeps but each update depends on the one before it, forcing sequential execution.