Home > Matrix & Vector > Solving Systems of linear equations > Solving tridiagonal matrix system of equations using Thomas algorithm method example

11. Thomas algorithm method example ( Enter your problem )
  1. Example `2x1+3x2=8,x1+2x2-x3=2,x2+2x3=8`
  2. Example `3x1-x2=5,2x1-3x2+2x3=5,x2+2x3+5x4=10,x3-x4=1`
  3. Example `4x1+8x2=8,8x1+18x2+2x3=18,2x2+5x3+1.5x4=0.5,1.5x3+1.75x4=1.75`
  4. Example `2.04x1-x2=48.8,-x1+2.04x2-x3=0.8,-x2+2.04x3=0.8`

2. Example `3x1-x2=5,2x1-3x2+2x3=5,x2+2x3+5x4=10,x3-x4=1`





Solve Equations 3x1-x2=5;2x1-3x2+2x3=5;x2+2x3+5x4=10;x3-x4=1 using Thomas algorithm method

Solution:
Solving tridiagonal matrix system of equations using Thomas algorithm method
Total Equations are `4`

`3x1-x2+0x3+0x4=5 -> (1)`

`2x1-3x2+2x3+0x4=5 -> (2)`

`0x1+x2+2x3+5x4=10 -> (3)`

`0x1+0x2+x3-x4=1 -> (4)`

Converting given equations into matrix form
`3``-1``0``0``5`
`2``-3``2``0``5`
`0``1``2``5``10`
`0``0``1``-1``1`


Identify each number above with Thomas algorithm notation
`b_1``c_1``0``0``d_1`
`a_2``b_2``c_2``0``d_2`
`0``a_3``b_3``c_3``d_3`
`0``0``a_4``b_4``d_4`


Sub diagonal values are
`a_2=2,a_3=1,a_4=1`

Main diagonal values are
`b_1=3,b_2=-3,b_3=2,b_4=-1`

Super diagonal values are
`c_1=-1,c_2=2,c_3=5`

Right-hand side values are
`d_1=5,d_2=5,d_3=10,d_4=1`

Step-1 :
`y_i=b_i-(a_i * c_(i-1))/(y_(i-1)), i=2,3,4`

`y_1=b_1``=3`

`y_2=b_2-(a_2 * c_1)/(y_1)`

`=-3-(2 * -1)/(3)`

`=-3+0.6667`

`=-2.3333`

`y_3=b_3-(a_3 * c_2)/(y_2)`

`=2-(1 * 2)/(-2.3333)`

`=2+0.8571`

`=2.8571`

`y_4=b_4-(a_4 * c_3)/(y_3)`

`=-1-(1 * 5)/(2.8571)`

`=-1-1.75`

`=-2.75`

Step-2 :
`z_i=(d_i-a_i*z_(i-1))/(y_i), i=2,3,4`

`z_1=d_1/y_1``=5/3=1.6667`

`z_2=(d_2-a_2*z_1)/(y_2)`

`=(5 - 2 * 1.6667)/(-2.3333)`

`=(1.6667)/(-2.3333)`

`=-0.7143`

`z_3=(d_3-a_3*z_2)/(y_3)`

`=(10 - 1 * (-0.7143))/(2.8571)`

`=(10.7143)/(2.8571)`

`=3.75`

`z_4=(d_4-a_4*z_3)/(y_4)`

`=(1 - 1 * 3.75)/(-2.75)`

`=(-2.75)/(-2.75)`

`=1`

Step-3 :
`x_i=z_i-(c_i*x_(i+1))/(y_i), i=3,2,1`

`x_4=z_4``=1`

`x_3=z_3-(c_3*x_4)/(y_3)`

`=3.75-(5 * 1)/(2.8571)`

`=3.75-1.75`

`=2`

`x_2=z_2-(c_2*x_3)/(y_2)`

`=-0.7143-(2 * 2)/(-2.3333)`

`=-0.7143+1.7143`

`=1`

`x_1=z_1-(c_1*x_2)/(y_1)`

`=1.6667-((-1) * 1)/(3)`

`=1.6667+0.3333`

`=2`

Solution is
`x_1=2`

`x_2=1`

`x_3=2`

`x_4=1`




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





Share this solution or page with your friends.
 
 
Copyright © 2026. All rights reserved. Terms, Privacy
 
 

.