English

# How to Calculate the Gauss Jacobi Iterative Method - Tutorial

##### Definition:

Gauss Jacobi method is the first iterative method used to solve linear system of equations.This tutorial explains you how to solve the linear equation using Gauss jacobi iterative method.

##### Example:

Use the Jacobi method to calculate the approximate solution for the following system of linear equations. 5x0 - 2x1 = 3 -3x0 + 9x1 = 1 Carry on the iterations until two successive approximations are identical when rounded to three significant digits.

##### Solution:

Let us calculate the approximate x1, x2 values from the given equations.

###### Step 1:

Keep the variables x0, x1 on the left hand side and the numbers to the right hand side. Therefore the equation becomes,      5x0 = 3 + 2x1      -> equation-1 9x1 = 1 + 3x0      -> equation-2 Divide the equation-1 by 5 and equation-2 by 9 => x0 = 3/5 + 2x1/5      -> equation-3 => x1 = 1/9 + 3x0/9      -> equation-4

###### Step 2:

Now, substitute the value x1 = 0 in equation-3 and x0 = 0 in equation-4. Let us take the equation-3, x0 = 3/5 + 2x1/5 Substitute x1 = 0 in this equation, x0 = 3/5 + 2*(0)/5 x0 = 0.6 + 0 = 0.6 -> result-1

###### Step 3:

Now take the equation-4, Substitute x0 = 0 in this equation, x1 = 1/9 + 3x0/9 x1 = 1/9 + 3*(0)/9 x1 = 0.11 - 0 x1 = 0.11 -> result-2

###### Step 4:

The iteration should be continued till the x0, x1 values of the last and previous iterations are equal. The x0, x1 values of first iteration should be substituted in the equation-3 and equation-4 of next iteration. Let us see an example for this. Take the x0, x1 values of 1st iteration and substitute it in 2nd iteration. Substitute x0 = 0.6 and x1 = 0.111 in equation-3 and equation-4 respectively. x0 = 3/5 + ( 2 * 0.111 )/5 x0 = 3/5 + ( 0.222)/5 x0 = 0.6 + 0.0444 x0 = 0.644 x1 = 1/9 + ( 3 * 0.6 ) /9 x1 = 0.111 + ( 1.8 ) /9 x1 = 0.111 + 0.2 x1 = 0.311 Now x0 = 0.644 and x1 = 0.311. Subtitute these values and then repeat the iteration again.

##### Step 5:

Continuing this procedure, you obtain the sequence of approximations

 n 1 2 3 4 5 6 7 8 9 10 x0 0.6 0.644 0.724 0.73 0.741 0.742 0.743 0.743 0.744 0.744 x1 0.111 0.311 0.326 0.352 0.354 0.358 0.358 0.359 0.359 0.359

Since the last two columns in the table are identical, we can conclude the solution as, x0 = 0.744 x1 = 0.359