Contents
ALGORITHMS
Site map
Links
Site and author
News
About the site
FAQ
Contact
TERMS OF USE
Contents - Matrix and vector operations - Operations on complex matrices - LU decomposition of a general complex matrix

LU decomposition of a general complex matrix

The subroutine performs the LU decomposition of a complex rectangular general matrix with partial pivoting (with row permutations).

LU decomposition

The LU decomposition of a complex rectangular matrix A of size MxN is a representation of matrix A as a product of permutation matrix P, lower triangular matrix L with unit diagonal (or lower trapezoid matrix, if M > N and upper triangular matrix U (or upper trapezoid matrix, if M > N):

PA = LU

This representation is often used when solving linear algebra problems, as well as when solving systems of linear equations, finding matrix condition numbers, inverting matrices and so on.

To perform a decomposition, the Crout algorithm with pivoting is used. It should be taken into account that not the matrix A is represented as the product of L and U but a certain permutation of A which is given by matrix P.

Subroutine description

Subroutine CMatrixLU gets matrix A as an input and returns its LU decomposition. In this case, the matrices L and U replace the matrix A as follows, and the permutation matrix is saved in Pivots array.

A11 A12 A13   =>    U11 U12 U13
A21 A22 A23   =>    L21 U22 U23
A31 A32 A33   =>    L31 L32 U33
A41 A42 A43   =>    L41 L42 L43

This algorithm is transferred from the LAPACK library.

Report a bug

Source codes

C#

C# 1.0 source.
clu.csharp.zip - LU decomposition of a general complex matrix


C++

C++ source.
clu.cpp.zip - LU decomposition of a general complex matrix
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.
clu.mpfr.zip - LU decomposition of a general complex matrix
mpfr.zip - precompiled Win32 MPFR/GMP binaries


Delphi

Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
clu.delphi.zip - LU decomposition of a general complex matrix


Visual Basic 6

Visual Basic 6 source.
clu.vb6.zip - LU decomposition of a general complex matrix


Zonnon beta

Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
clu.zonnon.zip - LU decomposition of a general complex matrix



 
 
Sergey Bochkanov, Vladimir Bystritsky
Copyright © 1999-2008