F07CNF (ZGTSV) computes the solution to a complex system of linear equations
where
A is an
n by
n tridiagonal matrix and
X and
B are
n by
r matrices.
F07CNF (ZGTSV) uses Gaussian elimination with partial pivoting and row interchanges to solve the equations
AX=B
. The matrix
A
is factorized as
A=PLU
, where
P
is a permutation matrix,
L
is unit lower triangular with at most one nonzero subdiagonal element per column, and
U
is an upper triangular band matrix, with two superdiagonals.
Note that the equations
ATX=B may be solved by interchanging the order of the arguments
DU and
DL.
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/lugThe computed solution for a single right-hand side,
x^
, satisfies an equation of the form
where
and
ε
is the
machine precision. An approximate error bound for the computed solution is given by
where
κA
=
A-11
A1
, the condition number of
A
with respect to the solution of the linear equations. See Section 4.4 of
Anderson et al. (1999) for further details.
Alternatives to F07CNF (ZGTSV), which return condition and error estimates are
F04CCF and
F07CPF (ZGTSVX).
The real analogue of this routine is
F07CAF (DGTSV).
This example solves the equations
where
A
is the tridiagonal matrix
and