Applying The Jacobi Iteration Method

# Applying The Jacobi Iteration Method

We are now going to look at some examples of The Jacobi Iteration Method. Suppose that we have a system of $n$ linear equations in $n$ unknowns with a unique solution, and let $x^{(0)} =\begin{bmatrix}x_1^{(0)}\\ x_2^{(0)}\\ \vdots\\ x_n^{(0)} \end{bmatrix}$ be an initial approximation to the solution to this system. We first rewrite this system in the form:

(1)

For $k = 1, 2, ...$ we defined the further approximations to the solution with the following formulas:

(2)

We will now look at an example of applying this method.

## Example 1

Let $A = \begin{bmatrix}5 & 1 & 2\\ 1 & 4 & 1\\ 2 & 2 & 5 \end{bmatrix}$ and let $b = \begin{bmatrix} 1\\ 2\\ 3 \end{bmatrix}$. Using the Jacobi Iteration method with the initial approximation $x^{(0)} = \begin{bmatrix} 1\\ 1\\ 1 \end{bmatrix}$ with three iterations to approximate the solution to the system $Ax = b$. Determine whether the Jacobi Iteration method will converge to the solution.

From $Ax = b$ we obtain the following system of equations:

(3)
\begin{align} \quad 5x_1 + x_2 + 2x_3 = 1 \\ \quad x_1 + 4x_2 + x_3 = 2 \\ \quad 2x_1 + 2x_2 + 5x_3 = 3 \end{align}

We can rewrite this system in the following form:

(4)
\begin{align} \quad x_1 = \frac{1 - x_2 - 2x_3}{5} \\ \quad x_2 = \frac{2 - x_1 - x_3}{4} \\ \quad x_3 = \frac{3 - 2x_1 - 2x_2}{5} \end{align}

For the first iteration $x^{(1)}$ we use the values of $x^{(0)}$ in the system above and we have that:

(5)
\begin{align} \quad x_1^{(1)} = \frac{1 - 1 - 2}{5} = -\frac{2}{5}\\ \quad x_2^{(1)} = \frac{2 - 1 - 1}{4} = 0 \\ \quad x_3^{(1)} = \frac{3 - 2 - 2}{5} = -\frac{1}{5} \end{align}

For the second iteration $x^{(2)}$ we use the values of $x^{(1)}$ and we have that:

(6)
\begin{align} \quad x_1^{(2)} = \frac{1 + 2\frac{1}{5}}{5} = 0.28 \\ \quad x_2^{(2)} = \frac{2 + \frac{2}{5} + \frac{1}{5}}{4} = 0.65 \\ \quad x_3^{(2)} = \frac{3 + 2 \frac{2}{5}}{5} = 0.76 \end{align}

For the third iteration $x^{(3)}$ we use the values of $x^{(2)}$ and we have that:

(7)
\begin{align} \quad x_1^{(3)} = \frac{1 - 0.65 - 2(0.76)}{5} = -0.234 \\ \quad x_2^{(3)} = \frac{2 - 0.28 - 0.76}{4} = 0.24 \\ \quad x_3^{(3)} = \frac{3 - 2(0.28) - 2(0.65)}{5} = 0.228 \end{align}

Indeed, the Jacobi Iteration method will converge since this matrix is diagonally dominating.