PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_zptsv (f07jn)
Purpose
nag_lapack_zptsv (f07jn) computes the solution to a complex system of linear equations
where
is an
by
Hermitian positive definite tridiagonal matrix, and
and
are
by
matrices.
Syntax
Description
nag_lapack_zptsv (f07jn) factors as . The factored form of is then used to solve the system of equations.
References
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
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Parameters
Compulsory Input Parameters
- 1:
– double array
-
The dimension of the array
d
must be at least
The diagonal elements of the tridiagonal matrix .
- 2:
– complex array
-
The dimension of the array
e
must be at least
The subdiagonal elements of the tridiagonal matrix .
- 3:
– complex array
-
The first dimension of the array
b must be at least
.
The second dimension of the array
b must be at least
.
The by right-hand side matrix .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the array
b and the dimension of the array
d.
, the order of the matrix .
Constraint:
.
- 2:
– int64int32nag_int scalar
-
Default:
the second dimension of the array
b.
, the number of right-hand sides, i.e., the number of columns of the matrix .
Constraint:
.
Output Parameters
- 1:
– double array
-
The dimension of the array
d will be
The diagonal elements of the diagonal matrix from the factorization .
- 2:
– complex array
-
The dimension of the array
e will be
The
subdiagonal elements of the unit bidiagonal factor
from the
factorization of
. (
e can also be regarded as the superdiagonal of the unit bidiagonal factor
from the
factorization of
.)
- 3:
– complex array
-
The first dimension of the array
b will be
.
The second dimension of the array
b will be
.
If , the by solution matrix .
- 4:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
-
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
-
-
The leading minor of order is not positive definite,
and the solution has not been computed.
Accuracy
The computed solution for a single right-hand side,
, satisfies an equation of the form
where
and
is the
machine precision. An approximate error bound for the computed solution is given by
where
, the condition number of
with respect to the solution of the linear equations. See Section 4.4 of
Anderson et al. (1999) for further details.
nag_lapack_zptsvx (f07jp) is a comprehensive LAPACK driver that returns forward and backward error bounds and an estimate of the condition number. Alternatively,
nag_linsys_complex_posdef_tridiag_solve (f04cg) solves
and returns a forward error bound and condition estimate.
nag_linsys_complex_posdef_tridiag_solve (f04cg) calls
nag_lapack_zptsv (f07jn) to solve the equations.
Further Comments
The number of floating-point operations required for the factorization of is proportional to , and the number of floating-point operations required for the solution of the equations is proportional to , where is the number of right-hand sides.
The real analogue of this function is
nag_lapack_dptsv (f07ja).
Example
This example solves the equations
where
is the Hermitian positive definite tridiagonal matrix
and
Details of the factorization of are also output.
Open in the MATLAB editor:
f07jn_example
function f07jn_example
fprintf('f07jn example results\n\n');
d = [ 16 41 46 21];
e = [ 16 + 16i 18 - 9i 1 - 4i ];
%RHS
b = [ 64 + 16i;
93 + 62i;
78 - 80i;
14 - 27i];
%Solve
[df, ef, x, info] = f07jn( ...
d, e, b);
disp('Solution');
disp(x);
disp('Diagonal elements of the diagonal matrix D');
disp(df);
disp('Sub-diagonal elements of the Cholesky factor L');
disp(ef);
f07jn example results
Solution
2.0000 + 1.0000i
1.0000 + 1.0000i
1.0000 - 2.0000i
1.0000 - 1.0000i
Diagonal elements of the diagonal matrix D
16 9 1 4
Sub-diagonal elements of the Cholesky factor L
1.0000 + 1.0000i 2.0000 - 1.0000i 1.0000 - 4.0000i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015