The Jacobi method is a stationary iterative method for solving a linear system
It is one of the simplest iterative solvers in numerical linear algebra. The method updates each unknown by using the values from the previous iteration. This makes it easy to understand, easy to implement, and naturally parallel.
The method is most useful as a basic model for iterative solution, as a smoother in multigrid methods, and as a simple preconditioner. By itself, it may converge slowly, but it introduces the main ideas behind stationary methods: matrix splitting, iteration matrices, residuals, convergence criteria, and stopping rules.
89.1 The Basic Problem
Let
The system
is equivalent to the equations
Assume that
for every . Then the -th equation can be solved for :
The Jacobi method turns this identity into an iteration.
89.2 Jacobi Update Formula
Starting from an initial guess
the Jacobi method defines
All entries of are computed from entries of , not from entries already updated during the same iteration.
This is the defining feature of the Jacobi method.
The update is simultaneous:
Each component uses old values from the previous iterate.
89.3 Example
Consider the system
Solving each equation for its diagonal variable gives
Thus the Jacobi iteration is
Start with
Then
So
Next,
The exact solution is
The iterates move toward this solution.
89.4 Matrix Splitting
Write the matrix as
where:
| Symbol | Meaning |
|---|---|
| diagonal part of | |
| strictly lower triangular part of | |
| strictly upper triangular part of |
Then
becomes
Move the off-diagonal terms to the right side:
The Jacobi iteration is
Since is diagonal, solving with is cheap:
Thus the Jacobi iteration matrix is
89.5 Fixed-Point Form
The Jacobi method has the fixed-point form
where
If the iteration converges to a vector , then
Substituting the definitions gives
Multiplying by ,
Therefore,
So the limit is a solution of the original system.
89.6 Error Recurrence
Let be the exact solution. The exact solution satisfies
The computed iterate satisfies
Subtracting gives
Thus the error
satisfies
By repeated substitution,
The convergence of Jacobi is therefore controlled entirely by powers of the iteration matrix.
89.7 Convergence Criterion
The Jacobi method converges for every initial guess if and only if
where is the spectral radius of . The spectral radius is the largest absolute value of the eigenvalues of .
This is the standard convergence condition for stationary linear iterations. The same criterion is commonly used for Jacobi and related stationary methods.
If
then
as
Consequently,
The iterates converge to the exact solution.
89.8 Diagonal Dominance
A common sufficient condition for convergence is strict diagonal dominance.
A matrix is strictly row diagonally dominant if
$$ |a_{ii}|
\sum_{j\ne i}|a_{ij}| $$
for every row .
This means each diagonal entry is larger in magnitude than the sum of the off-diagonal entries in the same row.
For strictly diagonally dominant systems, the Jacobi method is commonly introduced as a convergent iterative algorithm.
Strict diagonal dominance is sufficient, but not necessary. Some matrices that are not strictly diagonally dominant still allow Jacobi to converge.
89.9 Why Diagonal Dominance Helps
The Jacobi update divides each equation by its diagonal coefficient.
If the diagonal coefficient dominates the off-diagonal coefficients, then the new value of depends only weakly on the other variables.
In that case, the iteration matrix has small enough entries to contract errors.
For example, if
$$ |a_{ii}|
\sum_{j\ne i}|a_{ij}|, $$
then the sum of the absolute values in row of is less than :
Thus
Since
we get
Therefore, Jacobi converges.
89.10 Residual Form
The residual at step is
The Jacobi correction can be written using the residual.
Since
Jacobi updates the current approximation by adding a diagonally scaled residual.
This form is useful in implementation and interpretation.
It says that Jacobi corrects each variable according to the residual in its corresponding equation, scaled by the diagonal entry.
89.11 Algorithm
Input:
Repeat for
Compute, for each ,
Compute the residual
Stop if
Return
89.12 Pseudocode
jacobi(A, b, x, tol, max_iter):
n = length(b)
for k = 0 to max_iter - 1:
x_new = zero vector of length n
for i = 1 to n:
s = 0
for j = 1 to n:
if j != i:
s = s + A[i,j] * x[j]
x_new[i] = (b[i] - s) / A[i,i]
r = b - A * x_new
if norm(r) / norm(b) <= tol:
return x_new
x = x_new
return xThe new vector must be stored separately from the old vector. Otherwise the method becomes Gauss-Seidel rather than Jacobi.
89.13 Storage Requirements
Jacobi needs:
| Object | Storage |
|---|---|
| Matrix | problem-dependent |
| Right-hand side | |
| Current vector | |
| New vector | |
| Residual , optional |
For sparse matrices, the matrix is stored using a sparse format such as compressed sparse row.
The method does not require factorizing . This makes it memory-light compared with direct methods.
89.14 Computational Cost
For a dense matrix, each Jacobi iteration costs
operations.
For a sparse matrix, each iteration costs approximately
where is the number of nonzero entries.
The cost per iteration is low, but many iterations may be required.
This is the main tradeoff.
89.15 Parallelism
Jacobi is naturally parallel.
Each component
depends only on values from the previous iterate . Therefore all components of can be computed independently after is known.
This makes Jacobi attractive on parallel hardware.
However, parallel efficiency alone does not guarantee overall efficiency. If convergence is slow, a faster converging method with less parallelism may still be better.
89.16 Weighted Jacobi
Weighted Jacobi modifies the update by mixing the old iterate with the ordinary Jacobi iterate.
Let
be the ordinary Jacobi update.
Weighted Jacobi defines
Here is a relaxation parameter.
Equivalently,
When
weighted Jacobi becomes ordinary Jacobi.
For some problems, choosing
improves smoothing behavior.
89.17 Jacobi as a Smoother
In multigrid methods, Jacobi is often used as a smoother.
A smoother reduces high-frequency error components quickly, even if it reduces low-frequency components slowly.
This property is useful because multigrid handles different error scales on different grids.
Weighted Jacobi is especially common in this context.
The method may be poor as a standalone solver but useful as a component inside a stronger algorithm.
89.18 Jacobi Preconditioning
Jacobi preconditioning uses the diagonal of as a preconditioner.
Set
Then the preconditioned system is
This scales each equation by its diagonal entry.
Jacobi preconditioning is cheap and easy to apply. It may help when diagonal scaling is the main issue.
It is weak for strongly coupled systems, where off-diagonal entries play a major role.
89.19 Comparison with Gauss-Seidel
Jacobi and Gauss-Seidel are closely related.
| Feature | Jacobi | Gauss-Seidel |
|---|---|---|
| Update style | simultaneous | sequential |
| Uses newest values immediately | no | yes |
| Needs separate new vector | yes | no |
| Parallelism | high | lower |
| Typical convergence speed | slower | faster |
| Implementation simplicity | high | high |
Gauss-Seidel often converges faster because it uses updated values during the same iteration. Jacobi is easier to parallelize because each update is independent.
89.20 Failure Modes
Jacobi may fail for several reasons.
| Failure mode | Cause |
|---|---|
| Divergence | |
| Slow convergence | close to |
| Division by zero | some |
| Poor scaling | diagonal entries too small |
| Misleading residual | ill-conditioned |
Before applying Jacobi, one should check that diagonal entries are nonzero and that convergence is plausible.
89.21 Residual Versus Error
A small residual does not always mean a small error.
For the residual
the error satisfies
Thus
If is ill-conditioned, then may be large. The residual can be small while the solution error remains significant.
This is not specific to Jacobi. It applies to all linear solvers.
89.22 Practical Use
Jacobi is rarely the best standalone method for difficult linear systems.
It remains important because it is:
| Role | Reason |
|---|---|
| Teaching method | exposes core iteration ideas |
| Parallel method | updates are independent |
| Preconditioner | diagonal scaling is cheap |
| Multigrid smoother | damps high-frequency error |
| Baseline solver | simple reference implementation |
In production solvers, Jacobi is often replaced or supplemented by Krylov methods, multigrid methods, domain decomposition, or stronger preconditioners.
89.23 Implementation Notes
A robust implementation should:
| Issue | Practical handling |
|---|---|
| Zero diagonal | reject matrix or reorder equations |
| Small diagonal | warn or scale system |
| Sparse storage | avoid looping over zeros |
| Residual check | use relative residual |
| Maximum iterations | always enforce a limit |
| Parallel update | separate old and new vectors |
| Weighted update | expose as parameter |
For sparse matrices, it is inefficient to compute sums over all . Instead, loop only over nonzero entries in each row.
89.24 Simple Sparse Row Update
For a sparse row, the update is computed by separating the diagonal entry from the off-diagonal entries:
for i = 1 to n:
s = 0
diag = 0
for each nonzero (j, aij) in row i:
if j == i:
diag = aij
else:
s = s + aij * x[j]
x_new[i] = (b[i] - s) / diagThis structure avoids unnecessary operations on zero entries.
It is the natural implementation for compressed sparse row storage.
89.25 Summary
The Jacobi method is the iteration
In matrix form,
Its iteration matrix is
The method converges for every initial guess exactly when
Jacobi is simple, parallel, and memory-light. Its main weakness is slow or absent convergence. It is often more useful as a building block than as a final solver.