Is there around a straightforward way to invert a triangular (upper or lower) matrix?

tunnuz picture tunnuz · Jan 7, 2009 · Viewed 30.7k times · Source

I'm trying to implement some basic linear algebra operations and one of these operations is the inversion of a triangular (upper and/or lower) matrix. Is there an easy and stable algorithm to do that?

Thank you.

Answer

jason picture jason · Jan 7, 2009

Yes, use back substitution. A standard algorithm to invert a matrix is to find its LU decomposition (decomposition into a lower-triangular and an upper-triangular matrix), use back subsitution on the triangular pieces, and then combine the results to obtain the inverse of the original matrix.