Iterative Methods For Solving Systems of Linear Equations
Iterative Methods For Solving Systems of Linear Equations
Jacobi Method
The first iterative method for solving systems of linear equations. Such
method only properly if the resulting coefficient matrix is diagonally dominant.
For example:
12x+7y+3z=20
10x+24y-6z=10
8x+17y+27z=15
𝑎 ≥ |𝑏 + 𝑐|
𝑒 ≥ |𝑑 + 𝑓|
𝑖 ≥ |𝑔 + ℎ|
Following the arrangement, the resulting coefficient is diagonally
dominant, which means we can apply the Jacobi method without problem.
12 ≥ |7 + 3|
24 ≥ |10 − 6|
27 ≥ |8 + 17|
Steps:
1. Rearrange all equations as a function for each unknown variable
20 − 7𝑦 − 3𝑧
𝑥=
12
10 − 10𝑥 + 6𝑧
𝑦=
24
15 − 8𝑥 − 17𝑦
𝑧=
27
2. Assume an initial value per value. The safest value to assume per variable
is zero unless it is given by the problem. In case for MatLab, the assumed
value is one instead of zero.
3. Substitute the assumed value to the equation to get the next value.
20 − 7(0) − 3(0)
𝑥= = 1.6667
12
10 − 10(0) + 6(0)
𝑦= = 0.4167
24
15 − 8(0) − 17(0)
𝑧= = 0.5556
27
4. Use the resulting values for the next iteration.
The 17th iteration is closest value to the exact values for the unknown
variables. To determine the exact answer for the variables, use a calculator
(MODE-5-3-2). The closest answer can be determined if the difference between
the exact answer and approximated answer is close to zero.
Gauss-Seidel Method
It is somewhat the same with Jacobi Method but with a slight difference
in the approach. Its approach is much faster than the other method.
Steps.
1. The same with Jacobi Method
2. The same with Jacobi Method
3. Use the initial value of y and z to get the next value of x, then use resulting
value x and initial value of z to get the next value of y. Lastly, use the
resulting value of x and y to get the next value of z.
20 − 7(0) − 3(0)
𝑥= = 1.6667
12
10 − 10(1.6667) + 6(0)
𝑦= = −0.2778
24
15 − 8(1.6667) − 17(−0.2778)
𝑧= = 0.2366
27
4. Repeat step 3 until an acceptable answer is obtained