Tridiagonal Matrix Algorithm
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.
Consider a tridiagonal system of N equations with N unknowns, 11, u2, 3, --- uy as given below:
boa uy d,
a, by tr U2 a,
a3 bs ca 43 ds
= : a)
ay-1 by-1 en-a uy-1 dy
ay by uN dy
A standard method for solving a system of linear, algebraic equations is gaussian elimination
Thomas’ algorithm, also called TriDiagonal Matrix Algorithm (TDMA) is essentially the result
of applying gaussian elimination to the tridiagonal system of equations.
The i” equation in the system may be written as
au + Buu; + Cian = di Q)
where a1 =0 and cy = 0. Looking at the system of equations, we see that #” unknown can be
expressed as a function of (i+ 1)"" unknown. That is
ur = Print + Qi @)
Pius + Qin @)
uit
where 2; and Qj are constants. Note that if all the equations in the system are expressed in this
fashion, the coefficient matrix of the system would transform to a an upper triangular matrix.
To determine the constants P; and Q;, we plug equation (4) in (2) to yield
aj PiU; + ai Qin + Bis + cis d
(bi + ai Padua + crus, = di — aiQi-n
=<; di — a,Qi-1
OS Beata train
(3)Comparing equations (3) and (5), we obtain
-ci
di = GQi-1
Re, owe
bi + ajPint
b+ aiPim bs
These are the recurring relations for the constants P and Q. It shows that P. can be calculated
if P_1 is known. To start the computation, we use the fact that a1 = 0. Now, Pi and Qi can
be easily calculated because terms involving Fy and Qo vanish. Therefore,
=e dy
Bi Oe
A= a
Once the values of P; and Q; are known, we can use the recurring expressions for P; and Q; for
all values of i
Now, to start the back substitution, we use the fact that cy = 0. As a consequence, from
equation (6), we have Py =0, which results in uy = Qy. Once the value of uy is known we
use equation (3) to obtain uy—1, uy—2, --- U1.