Lably
Skip to content

Jacobi method

Iterative method used to solve a linear system of equations

  • 7 min read
  • 5 chapters

Related on Lably

Through System of linear equations and Absolute value

Description

Let Ax=b be a square system of n linear equations, where:A=[a11a12⋯a1na21a22⋯a2n⋮⋮⋱⋮an1an2⋯ann],x=[x1x2⋮xn],b=[b1b2⋮bn].

When A and b are known, and x is unknown, we can use the Jacobi method to approximate x. The vector x(0) denotes our initial guess for x (often xi(0)=0 for i=1,2,...,n). We denote x(k) as the k-th approximation or iteration of x, and x(k+1) is the next (or k+1) iteration of x.

Matrix-based formula

Then A can be decomposed into a diagonal component D, a lower triangular part L and an upper triangular part U:A=D+L+UwhereD=[a110⋯00a22⋯0⋮⋮⋱⋮00⋯ann] and L+U=[0a12⋯a1na210⋯a2n⋮⋮⋱⋮an1an2⋯0].The solution is then obtained iteratively via

x(k+1)=D−1(b−(L+U)x(k)).

Element-based formula

The element-based formula for each row i is thus:xi(k+1)=1aii(bi−∑j≠iaijxj(k)),i=1,2,…,n.The computation of xi(k+1) requires each element in x(k) except itself. Unlike the Gauss–Seidel method, we cannot overwrite xi(k) with xi(k+1), as that value will be needed by the rest of the computation. The minimum amount of storage is two vectors of size n.

Sign in to keep reading

4 more chapters are free with a Lably account.

More in Algebra