Thomas Algorithm
Thomas Algorithm
b1 c 1 0 x f1
[ a2 b2 c2 y = f 2
0 a3 b 3 z f3 ][ ] [ ]
Apply Gauss elimination algorithm for the solution of this system.
b 1 c1 0 f1
(
[ A /b ] = a2 b2 c 2 f 2
0 a3 b3 f 3|) [Set β 1=b 1]
β1 c 1 0 f 1
( a2 b2 c 2 f 2
0 a3 b 3 f 3 |) R1 →
R1
β1
c1 f1
( |)
1 0
β1 β1 f1
[Set γ 1= ]
a2 b2 c2 f 2 β1
0 a3 b3 f 3
c1
( |)
1 0 γ1
β1
f R2 → R2 −a2 R 1
a2 b2 c2 2
f
0 a3 b3 3
c1
( | )
1 0 γ1
β1 c1
f −a . γ β 2=b 2−a2
0 β2 c2 2 2 1 β1
f
0 a3 b3 3
c1
( |)
1 0
β1 γ1
f 2−a2 . γ 1
c2 γ2 γ 2=
0 1 β2
β2 f 3
0 a3 b3
c1
( | )
1 0
β1
γ1
c2
0 1 γ2 R3 → R3 −a3 R2
β2
f 3−a 3 γ 2
c2
0 0 b3−a3
β2
c1
( | )
1 0
β1 γ1
c2
c2 γ2 β 3=b 3−a3
0 1 β2
β 2 3 3 γ2
f −a
0 0 β3
c1
( |)
1 0
β1 γ1
R3 f 3−a3 γ 2
c 2 γ2 R3 → ; γ 3=
0 1 β3 β3
β 2 γ3
0 0 1
Consider the tridiagonal system of ‘n’ linear equations in ‘n’ unknowns of the form
a k x k 1 b k x k c k x k 1 f k ; k 1, 2,..., n
The Thomas Algorithm for the solution to this system is divided into two steps :
1 b1
f
1 1
1
c
k b k a k k 1 ; k 2,3,..., n
k 1
f a k k 1
k k ; k 2,3,..., n
k
xn n
c
x k k x k 1 k ; k (n 1), (n 2),..., 2,1
k
Problem(s)
4x1 x 2 1
x1 4x 2 x 3 2
x 2 4x 3 1