Contents
ALGORITHMS
Site map
Links
Site and author
News
About the site
FAQ
Contact
TERMS OF USE

Triangular matrix inverse

The triangular matrix could be inverted by using both the general algorithm and the specialized algorithm which consider the form of the matrix. We can pick out the following types of triangular matrix:

  • upper triangular
  • upper triangular with unit diagonal
  • lower triangular
  • lower triangular with unit diagonal

When inverting an upper triangular matrix we get an upper triangular matrix. When inverting an upper triangular matrix unit diagonal we get an upper triangular matrix unit diagonal and so on. Therefore, the algorithm returns an inverse matrix in the same format. The elements below the main diagonal (for the upper triangular matrix, and similarly in other cases) are not modified by the algorithm.

It should be noted that the algorithm can invert matrices with a unit diagonal. Commonly, this diagonal isn't stored. Similarly, the inverse matrix will be the matrix with the unit diagonal stored in the same format.

The subroutine RMatrixTRInverse performs the inversion of matrices of all listed types. The parameters IsUpper and IsUnitTriangular define the type of matrix. The subroutine parameters are described in more detail in the program comments.

This algorithm is transferred from the LAPACK library.

Report a bug

Source codes

C#

C# 1.0 source.
trinverse.csharp.zip - Triangular matrix inverse


C++

C++ source.
trinverse.cpp.zip - Triangular matrix inverse
ablas.zip - optimized basic linear algebra subroutines with SSE2 support (for C++ sources only)


C++, multiple precision arithmetic

C++ source. MPFR/GMP is used.
GMP source is available from gmplib.org. MPFR source is available from www.mpfr.org.
trinverse.mpfr.zip - Triangular matrix inverse
mpfr.zip - precompiled Win32 MPFR/GMP binaries


Delphi

Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
trinverse.delphi.zip - Triangular matrix inverse


Visual Basic 6

Visual Basic 6 source.
trinverse.vb6.zip - Triangular matrix inverse


Zonnon beta

Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
trinverse.zonnon.zip - Triangular matrix inverse



 
 
Sergey Bochkanov, Vladimir Bystritsky
Copyright © 1999-2008