Contents
ALGORITHMS
Site map
Links
Site and author
News
About the site
FAQ
Contact
TERMS OF USE
Contents - Systems of linear equations - Symmetric matrices - Symmetric indefinite matrix

Solution of the system with symmetric indefinite matrix

It is often required to solve systems of linear equations with a symmetric coefficient matrix. Of course, these systems could be solved by using algorithm on the basis of the LU decomposition as systems with a general matrix. However, taking into account the matrix properties, we can use not the LU decomposition but LDLT decomposition.

Both algorithms find the same solution. However the algorithm at the basis of the LDLT decomposition is faster, so in case of a symmetric coefficient matrix, it is reasonable to save time by using a specialized algorithm.

Note #1
Algorithm of a symmetric matrix condition number estimate can be used to estimate the matrix condition number.

Subroutine description

As for the algorithm which is based on the LU decomposition, there are two subroutines for the algorithm. The first subroutine, SMatrixSolve, solves a system of linear equations with a symmetric matrix which is given by its upper or lower triangle. This subroutine calls the SMatrixLDLT subroutine to perform the LDLT decomposition, and then solves the obtained system by using the same method as when performing the LU decomposition.

The second subroutine, SMatrixLDLTSolve, is used to solve systems of linear equations whose LDLT decomposition has already been performed. As with the LU decomposition, it is possible to solve a set of systems of linear equations with different right sides but with the same coefficient matrices because the LDLT decomposition requires O(N 3) operations, and solving a system of linear equations with a coefficient matrix given by the LDLT decomposition requires O(N 2) operations.

This algorithm is transferred from the LAPACK library.

Report a bug

Source codes

C#

C# 1.0 source.
ssolve.csharp.zip - Solution of the system with symmetric indefinite matrix


C++

C++ source.
ssolve.cpp.zip - Solution of the system with symmetric indefinite 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.
ssolve.mpfr.zip - Solution of the system with symmetric indefinite matrix
mpfr.zip - precompiled Win32 MPFR/GMP binaries


Delphi

Delphi source.
Can be compiled under FPC (in Delphi compatibility mode).
ssolve.delphi.zip - Solution of the system with symmetric indefinite matrix


Visual Basic 6

Visual Basic 6 source.
ssolve.vb6.zip - Solution of the system with symmetric indefinite matrix


Zonnon beta

Zonnon source.
Zonnon is an experimental language developed at ETH Zurich.
See www.zonnon.ethz.ch for more information.
ssolve.zonnon.zip - Solution of the system with symmetric indefinite matrix



 
 
Sergey Bochkanov, Vladimir Bystritsky
Copyright © 1999-2008