1. Thomas' algorithm, also called the tridiagonal matrix algorithm (TDMA), is used to solve systems of equations with a tridiagonal matrix structure.
2. It works by applying Gaussian elimination to convert the system of equations into an upper triangular system that can then be solved using backward substitution.
3. An example problem demonstrating the algorithm is worked through, showing the conversion to upper triangular form and solution via backward substitution.
2. Banded matrix
A band matrix is a sparse matrix whose non-zero entries are
confined to a diagonal band, comprising the main diagonal
and zero or more diagonals on either side.
1 0 0
0 2 0
0 0 3
1 4 0
6 2 5
0 7 3
3. The matrix can be symmetric, having
the same number of sub- and super-
diagonals. If a matrix has only one
sub- and one super-diagonal, we have
a tridiagonal matrix etc. The number
of super-diagonals is called the upper
bandwidth (two in the example), and
the number of sub-diagonals is the
lower bandwidth (three in the
example). The total number of
diagonals, six in the example, is the
bandwidth.
Banded matrix
4. What is a TriDiagonal Matrix…??
A tridiagonal matrix is a band matrix that has nonzero
elements only on the main diagonal, the first diagonal
below this, and the first diagonal above the main
diagonal.
Considering a 4 X 4 Matrix
1 4 0 0
3 4 1 0
0 2 3 4
0 0 1 3
𝑎1 𝑏1 0 0
𝑐2 𝑎2 𝑏2 0
0 𝑐3 𝑎3 𝑏3
0 0 𝑐4 𝑎4
5. Tridiagonal Matrix Algorithm
• Thomas’ algorithm, also called TriDiagonal Matrix Algorithm
(TDMA) is essentially the result of applying Gaussian
elimination to the tridiagonal system of equations.
• A system of simultaneous algebraic equations with nonzero
coefficients only on the main diagonal, the lower diagonal, and
the upper diagonal is called a tridiagonal system of equations.
7. Generalizing Tridiagonal Matrix
The Matrix can be written as
𝑎𝑖 𝑢𝑖−1 + 𝑏𝑖 𝑢𝑖 + 𝑐𝑖 𝑢𝑖+1 = 𝑑𝑖
Looking at the system of equations, we see that 𝑖 𝑡ℎ unknown can
be
expressed as a function of (𝑖 + 1) 𝑡ℎunknown. That is
𝑢𝑖 = 𝛾𝑖 𝑢𝑖+1 + 𝜌𝑖
𝑢𝑖−1 = 𝛾𝑖−1 𝑢𝑖 + 𝜌𝑖−1
𝑵𝒐𝒕𝒆: 𝑎1 = 0 & 𝑐 𝑁 = 0
8. Lets solve a problem for clear
understanding..!!
Let us consider the system of equations
3𝑥1 − 𝑥2 + 0𝑥3 = −1
−𝑥1 + 3𝑥2 − 𝑥3 = 7
0𝑥1 − 𝑥2 + 3𝑥3 = 7
Matrix form is
3 −1 0
−1 3 −1
0 −1 3
𝑥1
𝑥2
𝑥3
=
−1
7
7
9. STAGE I : Converting Mx = r into Ux=𝜌
• Row 1
𝟑𝒙𝒍 − 𝒙 𝟐 = −𝟏
Divide the Equation by 𝑎1, in this case 𝑎1= 3
⇒ 𝒙 𝟏 −
𝟏
𝟑
𝒙 𝟐 =
−𝟏
𝟑
Assuming the coefficient of 𝑥2 as 𝛾1 and the remaining constants as 𝜌1.
Now the equations converts to,
⇒ 𝒙 𝟏 + 𝜸 𝟏 𝒙 𝟐 = 𝝆 𝟏
⇒ 𝝆 𝟏 = −
𝟏
𝟑
, 𝜸 𝟏 = −
𝟏
𝟑
18. Why Thomas Algorithm is used ?
• This type of computation is quick.
• Tridiagonal system of equations are most
common.
• Even most of them convert the general system
of equations to tridiagonal system of
equations.
• It’s importance is clearly visible with a large
number of unknowns.
19. Limitations of Thomas Algorithm
• Algorithm is unstable when
𝑏𝑖 − 𝑎𝑖 𝛾𝑖−1 = 0
• This occurs if the tridiagonal matrix is
singular and in some cases non-singular also.
Singular
Matrix
(Determinant is Zero)
(*Square Matrix)
(It doesn’t have a
Inverse)
Non-Singular
Matrix
(Determinant is Non-Zero)
(*Square Matrix)
(It has a Inverse)
20. Condition for algorithm to be stable
𝑏𝑖 > 𝑎𝑖 + 𝐶𝑖 for every i.
What can be done when the algorithm is
numerically unstable..??
Pivoting of matrix