Wikipedia / Jacobi method
Wikipedia / Jacobi method
In numerical linear algebra, the Jacobi method (a.k.a. the Jacobi iteration method) is an iterative algorithm for determining the solutions of a strictly diagonally dominant system of linear equations. Each diagonal element is solved for, and an approximate value is plugged in. The process is then iterated until it converges. This algorithm is a stripped-down version of the Jacobi transformation method of matrix diagonalization. The method is named after Carl Gustav Jacob Jacobi.
Description
be a square system of n
as the k- is the next (or k.
Matrix-based formula
Then A can be decomposed into a diagonal component D, a lower triangular part L and an upper triangular part UThe solution is then obtained iteratively via
Element-based formula
except itself. Unlike the Gauss–Seidel method, as that value will be needed by the rest of the computation. The minimum amount of storage is two vectors of size n.
Algorithm
Input: initial guess x(0) to the solution, (diagonal dominant) matrix A, right-hand side vector b, convergence criterion
Output: solution when convergence is reached
Comments: pseudocode based on the element-based formula above
k = 0
while convergence not reached do
for i := 1 step until n do
σ = 0
for j := 1 step until n do
if j ≠ i then
σ = σ + aij xj(k)
end
end
xi(k+1) = (bi − σ) / aii
end
increment k
endConvergence
The standard convergence condition (for any iterative method) is when the spectral radius of the iteration matrix is less than 1:
A sufficient (but not necessary) condition for the method to converge is that the matrix A is strictly or irreducibly diagonally dominant. Strict row diagonal dominance means that for each row, the absolute value of the diagonal term is greater than the sum of absolute values of other terms:
The Jacobi method sometimes converges even if these conditions are not satisfied.
Note that the Jacobi method does not converge for every symmetric positive-definite matrix
Examples
Example question
is given by
is small). The solution after 25 iterations is
Example question 2
Suppose we are given the following linear system:
If we choose Using the approximations obtained, the iterative procedure is repeated until the desired accuracy has been reached. The following are the approximated solutions after five iterations.The exact solution of the system is .
Python example
Weighted Jacobi method
to compute the iteration as
being the usual choice., this may also be expressed as
.
Convergence in the symmetric positive definite case
is symmetric positive-definite, one can show convergence.
be the iteration matrix. Then, convergence is guaranteed for
is the maximal eigenvalue.
is the matrix condition number.
See also
References
External links