# On Fast Algorithms for Triangular and Dense Matrix Inversion

Chapter
Part of the Lecture Notes in Electrical Engineering book series (LNEE, volume 229)

## Abstract

We first propose in this paper a recursive algorithm for triangular matrix inversion (TMI) based on the ‘Divide and Conquer’ (D&C) paradigm. Different versions of an original sequential algorithm are presented. A theoretical performance study permits to establish an accurate comparison between the designed algorithms. Our implementation is designed to be used in place of dtrtri, the level 3 BLAS TMI. Afterwards, we generalize our approach for dense matrix inversion (DMI) based on LU factorization (LUF). This latter is used in Mathematical software libraries such as LAPACK xGETRI and MATLAB inv. $$\mathrm{{A}}=\mathrm{{LU}}$$ being the input dense matrix, xGETRI consists, once the factors L and U are known, in inverting U then solving the triangular matrix system $$\mathrm{{XL}}=\mathrm{{U}}^{-1}$$ (i.e. $${\mathrm{{L}}}^{\mathrm{{T}}}{\mathrm{{X}}}^{\mathrm{{T}}}=({\mathrm{{U}}}^{-1})^\mathrm{{T}}$$, thus $$\mathrm{{X}}={\mathrm{{A}}}^{-1})$$. Two other alternatives may be derived here (L and U being known) : (i) first invert L, then solve the matrix system $$\mathrm{{UX}}=\mathrm{{L}}^{-1}$$ for X ; (ii) invert both L and U, then compute the product $$\mathrm{{X}}={\mathrm{{U}}}^{-1}{\mathrm{{L}}}^{-1}$$. Each of these three procedures involves at least one triangular matrix inversion (TMI). Our DMI implementation aims to be used in place of the level 3 BLAS TMI-DMI. Efficient results could be obtained through an experimental study achieved on a set of large sized randomly generated matrices.

## Keywords

Dense matrix inversion Divide and conquer Level 3 BLAS LU factorization Recursive algorithm Triangular matrix inversion

## References

1. 1.
Quarteroni A, Sacco R, Saleri F (2007) Méthodes numériques. Algorithmes, analyse et applications, Springer, MilanGoogle Scholar
2. 2.
Heller D (1978) A survey of parallel algorithms in numerical linear algebra. SIAM Rev 20:740–777
3. 3.
Nasri W, Mahjoub Z (2002) Design and implementation of a general parallel divide and conquer algorithm for triangular matrix inversion. Int J Parallel Distrib Syst Netw 5(1):35–42Google Scholar
4. 4.
Aho AV, Hopcroft JE, Ullman JD (1975) The design and analysis of computer algorithms. Addison-Wesley, ReadingGoogle Scholar
5. 5.
Mahfoudhi R (2012) A fast triangular matrix inversion. Lecture notes in engineering and computer science: Proceedings of the world congress on engineering 2012, WCE 2012, London, UK, 4–6 July 2012, pp 100–102Google Scholar
6. 6.
Steven H, Elaine M, Jeremy R, Anna T, Thomas T (1996) Implementation of Strassen’s algorithm for matrix multiplication. In: Supercomputing ’96 proceedings ACM/IEEE conference on supercomputing (CDROM)Google Scholar
7. 7.
Strassen V (1969) Gaussian elimination is not optimal. Numer Math 13:354–356
8. 8.
Andersen BS, Gustavson F, Karaivanov A, Wasniewski J, Yalamov PY (2000) LAWRA—Linear algebra with recursive algorithms. Lecture notes in computer science, vol 1823/2000, pp 629–632Google Scholar
9. 9.
Dumas JG, Pernet C, Roch JL (2006) Adaptive triangular system solving. In: Proceedings of the challenges in symbolic computation softwareGoogle Scholar
10. 10.
Mahfoudhi R, Mahjoub Z (2012) A fast recursive blocked algorithm for dense matrix inversion. In: Proceedings of the 12th international conference on computational and mathematical methods in science and engineering, cmmse 2012, La Manga, SpainGoogle Scholar
11. 11.
Aho AV, Hopcroft JE, Ullman JD (1974) The design and analysis of computer algorithms. Addison-Wesley, ReadingGoogle Scholar