# solving system of equations by using the Gauss-Seidel method

I'm having problem solving this system of equations:

$$\begin{array}{lcl}x & -3y & 100z & = & 123 \\ 200x & -3y & 2z & = & 765 \\ x & -500y & 2z & = & 987\end{array}$$

I'm supposed to find the solution to the system of equations with accuracy of $$\epsilon=0.01$$ using the Gauss-Seidel method. $$(3.5;\;-2;\;1)$$ is the starting point. Also, the convergence needs to be guaranteed. I will appreciate any help. I hope everything I wrote is understandable.

• What is your question, more precisely ?
– user65203
Dec 5, 2019 at 19:55
• @Moo yes i am allowed to change the matrix Dec 5, 2019 at 20:59
• @YvesDaoust i am looking for x, y, z Dec 5, 2019 at 21:04

The Gauss-Seidel Method requires the matrix to be in diagonally dominant form.

This matrix is not diagonally dominant and G-S does not converge (sometimes it still may).

The first step is to put the matrix in D-D form so we have $$Ax = b$$ as

$$A = \begin{pmatrix}200 & -3 & 2 \\ 1 & -500 & 2 \\ 1 & -3 & 100 \\ \end{pmatrix}, b = \begin{pmatrix}765\\ 987 \\ 123 \\ \end{pmatrix}$$

You can figure out how many iterations you need to meet your accuracy requirement

\begin{align}x_0 &= (3.5,-2,1)\\ x_1 &= (3.785,-1.96243,1.1332771)\\ x_2 &= (3.784230779,-1.96189843,1.133300739)\\ x_3 &= (3.784238516,-1.96189832,1.133300665)\\ x_4 &= (3.784238519,-1.96189832,1.133300665)\end{align}

The exact results are

$$x = \begin{pmatrix} \dfrac{900785}{238036} \\ -\dfrac{3269017}{1666252} \\ \dfrac{3776729}{3332504} \\ \end{pmatrix} \approx \begin{pmatrix} 3.784238518543414\\-1.961898320302091\\1.133300665205503 \end{pmatrix}$$