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`

1. Example `2x1+3x2=8,x1+2x2-x3=2,x2+2x3=8`





1. Solve Equations 2x1+3x2=8;x1+2x2-x3=2;x2+2x3=8 using Thomas algorithm method

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

`2x1+3x2+0x3=8 -> (1)`

`x1+2x2-x3=2 -> (2)`

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

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


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


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

Main diagonal values are
`b_1=2,b_2=2,b_3=2`

Super diagonal values are
`c_1=3,c_2=-1`

Right-hand side values are
`d_1=8,d_2=2,d_3=8`

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

`y_1=b_1``=2`

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

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

`=2-1.5`

`=0.5`

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

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

`=2+2`

`=4`

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

`z_1=d_1/y_1``=8/2=4`

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

`=(2 - 1 * 4)/(0.5)`

`=(-2)/(0.5)`

`=-4`

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

`=(8 - 1 * (-4))/(4)`

`=(12)/(4)`

`=3`

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

`x_3=z_3``=3`

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

`=-4-((-1) * 3)/(0.5)`

`=-4+6`

`=2`

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

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

`=4-3`

`=1`

Solution is
`x_1=1`

`x_2=2`

`x_3=3`




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
 
 

.