# Iterative Methods for Numerical Analysis

## Jacobi Iteration Method

For a system

$$ax_1 + bx_2 + cx_3 = A$$

Rearrange for each \( x \):

$$x_1 = \frac{1}{a}(A -bx_2 -cx_3)$$

$$x_2 = \frac{1}{b}(A -ax_1 -cx_3)$$

$$x_3 = \frac{1}{c}(A -ax_1 -bx_2)$$

Start with initial guess for \(x_1, x_2, x_3 \). eg \( x_1 = x_2 = x_3 = 0\) and evaluate the above three equations for the first iteration, \( x_{1,1}, x_{2,1}, x_{3,1}\), which is then evaluated the same way to obtain \( x_{1,2}, x_{2,2}, x_{3,2}\). This can be repeated for a finite number of iterations or until the difference between each iteration is negligible.

## Gauss-Seidel Method

In the previous example with the Jacobi method, values entered in the three equations are updated every iteration. Gauss-Seidel updates these values for every calculation. i.e. After calculating \( x_{1,1} \), the value used to calculate \( x_{2,1} \) is \( x_{1,1} \) instead of \( x_1 \). This also means that Gauss-Seidel cannot be calculated in parallel the way Jacobi can.

## Convergence Conditions

The system of equations must be **diagonally dominant**. The elements on the main diagonal must be equal or larger than the sum of all other elements on that row.