Linear Equations

Next: Linear Least Squares Up: Driver Routines Previous: Driver Routines

## Linear Equations

Two types of driver routines are provided for solving systems of linear equations :

• a simple driver (name ending -SV) , which solves the system AX = B by factorizing A and overwriting B with the solution X;

• an expert driver (name ending -SVX) , which can also perform the following functions (some of them optionally):

• solve or (unless A is symmetric or Hermitian);

• estimate the condition number of A, check for near-singularity, and check for pivot growth;

• refine the solution and compute forward and backward error bounds;

• equilibrate  the system if A is poorly scaled.

The expert driver requires roughly twice as much storage as the simple driver in order to perform these extra functions.

Both types of driver routines can handle multiple right hand sides (the columns of B).

Different driver routines are provided to take advantage of special properties or storage schemes of the matrix A, as shown in Table 2.2.

These driver routines cover all the functionality of the computational routines for linear systems , except matrix inversion . It is seldom necessary to compute the inverse of a matrix explicitly, and it is certainly not recommended as a means of solving linear systems.

```--------------------------------------------------------------------------
Type of matrix                        Single precision    Double precision
and storage scheme    Operation       real     complex    real     complex
--------------------------------------------------------------------------
general               simple driver   SGESV    CGESV      DGESV    ZGESV
expert driver   SGESVX   CGESVX     DGESVX   ZGESVX
--------------------------------------------------------------------------
general band          simple driver   SGBSV    CGBSV      DGBSV    ZGBSV
expert driver   SGBSVX   CGBSVX     DGBSVX   ZGBSVX
--------------------------------------------------------------------------
general tridiagonal   simple driver   SGTSV    CGTSV      DGTSV    ZGTSV
expert driver   SGTSVX   CGTSVX     DGTSVX   ZGTSVX
--------------------------------------------------------------------------
symmetric/Hermitian   simple driver   SPOSV    CPOSV      DPOSV    ZPOSV
positive definite    expert driver   SPOSVX   CPOSVX     DPOSVX   ZPOSVX
--------------------------------------------------------------------------
symmetric/Hermitian   simple driver   SPPSV    CPPSV      DPPSV    ZPPSV
positive definite    expert driver   SPPSVX   CPPSVX     DPPSVX   ZPPSVX
(packed storage)
--------------------------------------------------------------------------
symmetric/Hermitian   simple driver   SPBSV    CPBSV      DPBSV    ZPBSV
positive definite    expert driver   SPBSVX   CPBSVX     DPBSVX   ZPBSVX
band
--------------------------------------------------------------------------
symmetric/Hermitian   simple driver   SPTSV    CPTSV      DPTSV    ZPTSV
positive definite    expert driver   SPTSVX   CPTSVX     DPTSVX   ZPTSVX
tridiagonal
--------------------------------------------------------------------------
symmetric/Hermitian   simple driver   SSYSV    CHESV      DSYSV    ZHESV
indefinite           expert driver   SSYSVX   CHESVX     DSYSVX   ZHESVX
--------------------------------------------------------------------------
complex symmetric     simple driver            CSYSV               ZSYSV
expert driver            CSYSVX              ZSYSVX
--------------------------------------------------------------------------
symmetric/Hermitian   simple driver   SSPSV    CHPSV      DSPSV    ZHPSV
indefinite (packed   expert driver   SSPSVX   CHPSVX     DSPSVX   ZHPSVX
storage)
--------------------------------------------------------------------------
complex symmetric     simple driver            CSPSV               ZSPSV
(packed storage)     expert driver            CSPSVX              ZSPSVX
--------------------------------------------------------------------------
```

Table 2.2: Driver routines for linear equations

Tue Nov 29 14:03:33 EST 1994