Suppose you need to solve equations in unknowns, but each equation involves only its immediate neighbors — the unknown just before and just after it. Write that as a matrix and you get a tridiagonal matrix: every entry is zero except on the main diagonal and the two adjacent diagonals.
Systems like this appear constantly in science and engineering. Discretize a heat equation, a beam deflection, or a fluid velocity profile on a grid and the resulting linear system is almost always tridiagonal. Solve thousands of such systems per second and you care deeply about cost.
Naive Gaussian elimination costs operations. But for a tridiagonal matrix almost all of those operations touch a zero and accomplish nothing. Lev Thomas (1949) noticed that the band structure lets you perform elimination in a single forward pass and recover the solution in a single backward pass — total, with a tiny constant.
The Thomas algorithm is exact (no approximations), numerically stable for diagonally dominant systems, and simple enough to fit on one page. It is one of the most practically important linear-time algorithms in numerical computing.
Comments
Loading comments...