# Gauss-Seidel Method Example Problem

The Gauss-Seidel Method, also known as the Liebmann method or the method of successive displacement. Here is the Gauss-Seidel method example problem for that helps you in providing the calculation steps for finding the values X1, X2 and X3 using the method of successive displacement algorithm. This Liebmann's Method Example problem provides you the clear steps starting from finding a lower triangular component to A-1b which is the final step of iterative methods for solving Ax = b.

## Liebmann's Method Example

Given Equations are, 4x1 + x2 - x3 = 3 2x1 + 7x2 + x3 = 19 x1 - 3x2 + 12x3 = 32

#### In Matrix Form

A =
 4 1 -1 2 7 1 1 -3 12

#### Solution:

We must decompose A into the sum of a lower triangular component L* and a strict upper triangular component,

#### Lower Triangular Component L*

 4 0 0 2 7 0 1 -3 12

#### Upper Triangular Component U

 0 1 -1 0 0 1 0 0 0

#### Inverse of L*

 0.25 0 0 -0.0714 0.1429 0 -0.0387 0.0357 0.0833

#### Calculation of T

-
 0.25 0 0 -0.0714 0.1429 0 -0.0387 0.0357 0.0833
x
 0 1 -1 0 0 1 0 0 0
=
 0 -0.25 0.25 0 0.0714 -0.2143 0 0.0387 -0.0744

#### Calculation of C

 0.25 0 0 -0.0714 0.1429 0 -0.0387 0.0357 0.0833
x
 3 19 32
=
 0.75 2.5 3.2292

Now we have T and C, we can use them to obtain the vectors x iteratively.

#### Gauss Seidel Algorithm

Suppose
x(0) =
 0.75 2.5 3.2292
x(1) =
 0 -0.25 0.25 0 0.0714 -0.2143 0 0.0387 -0.0744
x
 0.75 2.5 3.2292
+
 0.75 2.5 3.2292
=
 0.9323 1.9865 3.0857
x(2) =
 0 -0.25 0.25 0 0.0714 -0.2143 0 0.0387 -0.0744
x
 0.9323 1.9865 3.0857
+
 0.75 2.5 3.2292
=
 1.0248 1.9806 3.0765
x(3) =
 0 -0.25 0.25 0 0.0714 -0.2143 0 0.0387 -0.0744
x
 1.0248 1.9806 3.0765
+
 0.75 2.5 3.2292
=
 1.024 1.9821 3.077
x(4) =
 0 -0.25 0.25 0 0.0714 -0.2143 0 0.0387 -0.0744
x
 1.024 1.9821 3.077
+
 0.75 2.5 3.2292
=
 1.0237 1.9821 3.077
x(5) =
 0 -0.25 0.25 0 0.0714 -0.2143 0 0.0387 -0.0744
x
 1.0237 1.9821 3.077
+
 0.75 2.5 3.2292
=
 1.0237 1.9821 3.077

As expected, the algorithm converges to the exact solution:

#### Result

x = A-1b =
 1.0237 1.9821 3.077
x1
1.0237
x2
1.9821
x3
3.077