F07CRF (ZGTTRF) uses Gaussian elimination with partial pivoting and row interchanges to factorize the matrix
A
as
where
P
is a permutation matrix,
L
is unit lower triangular with at most one nonzero subdiagonal element in each column, and
U
is an upper triangular band matrix, with two superdiagonals.
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999)
LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia
http://www.netlib.org/lapack/lug- 1: N – INTEGERInput
On entry: n, the order of the matrix A.
Constraint:
N≥0.
- 2: DL(*) – COMPLEX (KIND=nag_wp) arrayInput/Output
-
Note: the dimension of the array
DL
must be at least
max1,N-1.
On entry: must contain the n-1 subdiagonal elements of the matrix A.
On exit: is overwritten by the n-1 multipliers that define the matrix L of the LU factorization of A.
- 3: D(*) – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the dimension of the array
D
must be at least
max1,N.
On entry: must contain the n diagonal elements of the matrix A.
On exit: is overwritten by the n diagonal elements of the upper triangular matrix U from the LU factorization of A.
- 4: DU(*) – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the dimension of the array
DU
must be at least
max1,N-1.
On entry: must contain the n-1 superdiagonal elements of the matrix A.
On exit: is overwritten by the n-1 elements of the first superdiagonal of U.
- 5: DU2(N-2) – COMPLEX (KIND=nag_wp) arrayOutput
On exit: contains the n-2 elements of the second superdiagonal of U.
- 6: IPIV(N) – INTEGER arrayOutput
On exit: contains the n pivot indices that define the permutation matrix P. At the ith step, row i of the matrix was interchanged with row IPIVi. IPIVi will always be either i or i+1, IPIVi=i indicating that a row interchange was not performed.
- 7: INFO – INTEGEROutput
On exit:
INFO=0 unless the routine detects an error (see
Section 6).
The computed factorization satisfies an equation of the form
where
and
ε
is the
machine precision.
Following the use of this routine,
F07CSF (ZGTTRS) can be used to solve systems of equations
AX=B
or
ATX=B
or
AHX=B
, and
F07CUF (ZGTCON) can be used to estimate the condition number of
A
.
The real analogue of this routine is
F07CDF (DGTTRF).
This example factorizes the tridiagonal matrix
A
given by