0% found this document useful (0 votes)
330 views

Tridiagonal Matrix Algorithm - TDMA (Thomas Algorithm) - CFD-Wiki, The Free CFD Reference

The tridiagonal matrix algorithm (TDMA), also known as the Thomas algorithm, provides a simplified method to solve systems of tridiagonal equations in two steps. First, a forward elimination phase eliminates the subdiagonal elements, and then a backward substitution phase obtains the solution. TDMA can solve such systems, which commonly arise from discretization of 1D problems, in linear time instead of cubic time required by Gaussian elimination. The algorithm is applicable to diagonally dominant matrices where the magnitude of the diagonal elements exceed the sum of the off-diagonal elements.

Uploaded by

manish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
330 views

Tridiagonal Matrix Algorithm - TDMA (Thomas Algorithm) - CFD-Wiki, The Free CFD Reference

The tridiagonal matrix algorithm (TDMA), also known as the Thomas algorithm, provides a simplified method to solve systems of tridiagonal equations in two steps. First, a forward elimination phase eliminates the subdiagonal elements, and then a backward substitution phase obtains the solution. TDMA can solve such systems, which commonly arise from discretization of 1D problems, in linear time instead of cubic time required by Gaussian elimination. The algorithm is applicable to diagonally dominant matrices where the magnitude of the diagonal elements exceed the sum of the off-diagonal elements.

Uploaded by

manish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

5/13/2018 Tridiagonal matrix algorithm - TDMA (Thomas algorithm) -- CFD-Wiki, the free CFD reference

[Sponsors]

Home
News
Forums
Wiki
Links
Jobs
Books
Events
Tools
Feeds
About
Search

Home > Wiki > Tridiagonal matrix algorithm - TDMA (Thomas algorithm)

Tridiagonal matrix algorithm - TDMA (Thomas


algorithm)
From CFD-Wiki

Contents
1 Introduction
2 Algorithm
3 Assessments
4 Variants
5 References

Introduction
The tridiagonal matrix algorithm (TDMA), also known as the Thomas algorithm, is a simplified form of
Gaussian elimination that can be used to solve tridiagonal systems of equations. A tridiagonal system may be
written as

where and . In matrix form, this system is written as

file:///C:/Users/Binu/Downloads/Tridiagonal%20matrix%20algorithm%20-%20TDMA%20(Thomas%20algorithm)%20--%20CFD-Wiki,%20the%20free%20CFD%2
5/13/2018 Tridiagonal matrix algorithm - TDMA (Thomas algorithm) -- CFD-Wiki, the free CFD reference

For such systems, the solution can be obtained in operations instead of required by Gaussian
Elimination. A first sweep eliminates the 's, and then an (abbreviated) backward substitution produces the
solution. Example of such matrices commonly arise from the discretization of 1D problems (e.g. the 1D
Poisson problem).

Algorithm
The following algorithm performs the TDMA, overwriting the original arrays. In some situations this is not
desirable, so some prefer to copy the original arrays beforehand.

Forward elimination phase

for k = 2 step until n do

end loop (k)

Backward substitution phase

for k = n-1 stepdown until 1 do

end loop (k)

Assessments
This algorithm is only applicable to matrices that are diagonally dominant, which is to say

Variants
In some situations, particularly those involving periodic boundary conditions, a slightly perturbed form of the
tridiagonal system may need to be solved:

In matrix form, this is

file:///C:/Users/Binu/Downloads/Tridiagonal%20matrix%20algorithm%20-%20TDMA%20(Thomas%20algorithm)%20--%20CFD-Wiki,%20the%20free%20CFD%2
5/13/2018 Tridiagonal matrix algorithm - TDMA (Thomas algorithm) -- CFD-Wiki, the free CFD reference

In this case, we can make use of the Sherman-Morrison formula to avoid the additional operations of Gaussian
elimination and still use the Thomas algorithm. We are now solving a problem of the form

where

is a slightly different tridiagonal system than above, and the solution to the perturbed system is obtained by
solving

and compute as

In other situations, the system of equations may be block tridiagonal, with smaller submatrices arranged as the
individual elements in the above matrix system. Simplified forms of Gaussian elimination have been developed
for these situations.

References
1. Thomas, L.H. (1949), Elliptic Problems in Linear Differential Equations over a Network, Watson Sci.
Comput. Lab Report, Columbia University, New York..
2. Conte, S.D., and deBoor, C. (1972), Elementary Numerical Analysis, McGraw-Hill, New York..

Still TODO: Add more references, more on the variants, make things nicer looking, and maybe more
performance type info --Jasond 22:59, 7 April 2006 (MDT)

Retrieved from "https://www.cfd-online.com/Wiki/Tridiagonal_matrix_algorithm_-


_TDMA_(Thomas_algorithm)"

This page was last modified on 14 September 2016, at 22:58.


Content is available under GNU Free Documentation License 1.2.

file:///C:/Users/Binu/Downloads/Tridiagonal%20matrix%20algorithm%20-%20TDMA%20(Thomas%20algorithm)%20--%20CFD-Wiki,%20the%20free%20CFD%2

You might also like