Home > Matrix & Vector calculators > Solving systems of linear equations using Gauss Seidel method example

5. Gauss Seidel method example ( Enter your problem )
  1. Example `2x+y=8,x+2y=1`
  2. Example `2x+5y=16,3x+y=11`
  3. Example `2x+y+z=5,3x+5y+2z=15,2x+y+4z=8`
  4. Example `x+y+z=7,x+2y+2z=13,x+3y+z=13`
Other related methods
  1. Inverse Matrix method
  2. Cramer's Rule method
  3. Gauss-Jordan Elimination method
  4. Gauss Elimination Back Substitution method
  5. Gauss Seidel method
  6. Gauss Jacobi method
  7. Elimination method
  8. LU decomposition using Gauss Elimination method
  9. LU decomposition using Doolittle's method
  10. LU decomposition using Crout's method
  11. Cholesky decomposition method
  12. SOR (Successive over-relaxation) method
  13. Relaxation method

3. Example `2x+y+z=5,3x+5y+2z=15,2x+y+4z=8`
(Previous example)
6. Gauss Jacobi method
(Next method)

4. Example `x+y+z=7,x+2y+2z=13,x+3y+z=13`





Solve Equations x+y+z=7,x+2y+2z=13,x+3y+z=13 using Gauss Seidel method

Solution:
Total Equations are `3`

`x+y+z=7`

`x+2y+2z=13`

`x+3y+z=13`


The coefficient matrix of the given system is not diagonally dominant.
Hence, we re-arrange the equations as follows, such that the elements in the coefficient matrix are diagonally dominant.
`x+y+z=7`

`x+3y+z=13`

`x+2y+2z=13`


From the above equations
`x_(k+1)=1/1(7-y_(k)-z_(k))`

`y_(k+1)=1/3(13-x_(k+1)-z_(k))`

`z_(k+1)=1/2(13-x_(k+1)-2y_(k+1))`

Initial gauss `(x,y,z) = (0,0,0)`

Solution steps are
`1^(st)` Approximation

`x_1=1/1[7-(0)-(0)]=1/1[7]=7`

`y_1=1/3[13-(7)-(0)]=1/3[6]=2`

`z_1=1/2[13-(7)-2(2)]=1/2[2]=1`

`2^(nd)` Approximation

`x_2=1/1[7-(2)-(1)]=1/1[4]=4`

`y_2=1/3[13-(4)-(1)]=1/3[8]=2.6667`

`z_2=1/2[13-(4)-2(2.6667)]=1/2[3.6667]=1.8333`

`3^(rd)` Approximation

`x_3=1/1[7-(2.6667)-(1.8333)]=1/1[2.5]=2.5`

`y_3=1/3[13-(2.5)-(1.8333)]=1/3[8.6667]=2.8889`

`z_3=1/2[13-(2.5)-2(2.8889)]=1/2[4.7222]=2.3611`

`4^(th)` Approximation

`x_4=1/1[7-(2.8889)-(2.3611)]=1/1[1.75]=1.75`

`y_4=1/3[13-(1.75)-(2.3611)]=1/3[8.8889]=2.963`

`z_4=1/2[13-(1.75)-2(2.963)]=1/2[5.3241]=2.662`

`5^(th)` Approximation

`x_5=1/1[7-(2.963)-(2.662)]=1/1[1.375]=1.375`

`y_5=1/3[13-(1.375)-(2.662)]=1/3[8.963]=2.9877`

`z_5=1/2[13-(1.375)-2(2.9877)]=1/2[5.6497]=2.8248`

`6^(th)` Approximation

`x_6=1/1[7-(2.9877)-(2.8248)]=1/1[1.1875]=1.1875`

`y_6=1/3[13-(1.1875)-(2.8248)]=1/3[8.9877]=2.9959`

`z_6=1/2[13-(1.1875)-2(2.9959)]=1/2[5.8207]=2.9104`

`7^(th)` Approximation

`x_7=1/1[7-(2.9959)-(2.9104)]=1/1[1.0938]=1.0938`

`y_7=1/3[13-(1.0938)-(2.9104)]=1/3[8.9959]=2.9986`

`z_7=1/2[13-(1.0938)-2(2.9986)]=1/2[5.909]=2.9545`

`8^(th)` Approximation

`x_8=1/1[7-(2.9986)-(2.9545)]=1/1[1.0469]=1.0469`

`y_8=1/3[13-(1.0469)-(2.9545)]=1/3[8.9986]=2.9995`

`z_8=1/2[13-(1.0469)-2(2.9995)]=1/2[5.954]=2.977`

`9^(th)` Approximation

`x_9=1/1[7-(2.9995)-(2.977)]=1/1[1.0234]=1.0234`

`y_9=1/3[13-(1.0234)-(2.977)]=1/3[8.9995]=2.9998`

`z_9=1/2[13-(1.0234)-2(2.9998)]=1/2[5.9769]=2.9884`

`10^(th)` Approximation

`x_10=1/1[7-(2.9998)-(2.9884)]=1/1[1.0117]=1.0117`

`y_10=1/3[13-(1.0117)-(2.9884)]=1/3[8.9998]=2.9999`

`z_10=1/2[13-(1.0117)-2(2.9999)]=1/2[5.9884]=2.9942`

`11^(th)` Approximation

`x_11=1/1[7-(2.9999)-(2.9942)]=1/1[1.0059]=1.0059`

`y_11=1/3[13-(1.0059)-(2.9942)]=1/3[8.9999]=3`

`z_11=1/2[13-(1.0059)-2(3)]=1/2[5.9942]=2.9971`

`12^(th)` Approximation

`x_12=1/1[7-(3)-(2.9971)]=1/1[1.0029]=1.0029`

`y_12=1/3[13-(1.0029)-(2.9971)]=1/3[9]=3`

`z_12=1/2[13-(1.0029)-2(3)]=1/2[5.9971]=2.9985`

`13^(th)` Approximation

`x_13=1/1[7-(3)-(2.9985)]=1/1[1.0015]=1.0015`

`y_13=1/3[13-(1.0015)-(2.9985)]=1/3[9]=3`

`z_13=1/2[13-(1.0015)-2(3)]=1/2[5.9985]=2.9993`

`14^(th)` Approximation

`x_14=1/1[7-(3)-(2.9993)]=1/1[1.0007]=1.0007`

`y_14=1/3[13-(1.0007)-(2.9993)]=1/3[9]=3`

`z_14=1/2[13-(1.0007)-2(3)]=1/2[5.9993]=2.9996`


Solution By Gauss Seidel Method.
`x=1.0007~=1`

`y=3~=3`

`z=2.9996~=3`

Iterations are tabulated as below
Iterationxyz
1721
242.66671.8333
32.52.88892.3611
41.752.9632.662
51.3752.98772.8248
61.18752.99592.9104
71.09382.99862.9545
81.04692.99952.977
91.02342.99982.9884
101.01172.99992.9942
111.005932.9971
121.002932.9985
131.001532.9993
141.000732.9996



This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here



3. Example `2x+y+z=5,3x+5y+2z=15,2x+y+4z=8`
(Previous example)
6. Gauss Jacobi method
(Next method)





Share this solution or page with your friends.


 
Copyright © 2023. All rights reserved. Terms, Privacy
 
 

.