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)
\begin{align} x_1 = \frac{b_1 - \left [ a_{12}x_2 + a_{13}x_3 + ... + a_{1n}x_n \right ]}{a_{11}} \\ x_2 = \frac{b_2 - \left [ a_{21}x_1 + a_{23}x_3 + ... + a_{2n}x_n \right ]}{a_{22}} \\ \quad \quad \quad \quad\quad \quad \vdots \quad \quad \quad \quad \quad \quad \\ x_n = \frac{b_n - \left [ a_{n1}x_1 + a_{n2}x_2 + ... + a_{n,n-1}x_{n-1} \right ]}{a_{nn}} \end{align}

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

(2)
\begin{align} x_1^{(k)} = \frac{b_1 - \left [ a_{12}x_2^{(k-1)} + a_{13}x_3^{(k-1)} + ... + a_{1n}x_n^{(k-1)} \right ]}{a_{11}} \\ x_2^{(k)} = \frac{b_2 - \left [ a_{21}x_1^{(k-1)} + a_{23}x_3^{(k-1)} + ... + a_{2n}x_n^{(k-1)} \right ]}{a_{22}} \\ \quad \quad \quad \quad\quad \quad \vdots \quad \quad \quad \quad \quad \quad \\ x_n^{(k)} = \frac{b_n - \left [ a_{n1}x_1^{(k-1)} + a_{n2}x_2^{(k-1)} + ... + a_{n,n-1}x_{n-1}^{(k-1)} \right ]}{a_{nn}} \end{align}

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.