The Tridiagonal Matrix Algorithm (TDMA) is used to solve systems of tridiagonal linear algebraic equations. The equations are of the form:
aiXi-1 + biXi + ciXi+1 = di
Where ai, bi, ci are the coefficients on the sub-diagonal, diagonal and super-diagonal respectively.
TDMA solves the equations in forward and backward substitution steps. In the forward step, it expresses the solution at each node Xi in terms of the solution at the next node Xi+1. In the backward step, it substitutes these expressions back into the original equations to obtain an expression for the solution at each node in terms of the solutions of nodes with higher indices. This