NAG Library Routine Document
F08QLF (DTRSNA)
1 Purpose
F08QLF (DTRSNA) estimates condition numbers for specified eigenvalues and/or right eigenvectors of a real upper quasi-triangular matrix.
2 Specification
SUBROUTINE F08QLF ( |
JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK, INFO) |
INTEGER |
N, LDT, LDVL, LDVR, MM, M, LDWORK, IWORK(*), INFO |
REAL (KIND=nag_wp) |
T(LDT,*), VL(LDVL,*), VR(LDVR,*), S(*), SEP(*), WORK(LDWORK,*) |
LOGICAL |
SELECT(*) |
CHARACTER(1) |
JOB, HOWMNY |
|
The routine may be called by its
LAPACK
name dtrsna.
3 Description
F08QLF (DTRSNA) estimates condition numbers for specified eigenvalues and/or right eigenvectors of a real upper quasi-triangular matrix in canonical Schur form. These are the same as the condition numbers of the eigenvalues and right eigenvectors of an original matrix (with orthogonal ), from which may have been derived.
F08QLF (DTRSNA) computes the reciprocal of the condition number of an eigenvalue
as
where
and
are the right and left eigenvectors of
, respectively, corresponding to
. This reciprocal condition number always lies between zero (i.e., ill-conditioned) and one (i.e., well-conditioned).
An approximate error estimate for a computed eigenvalue
is then given by
where
is the
machine precision.
To estimate the reciprocal of the condition number of the right eigenvector corresponding to
, the routine first calls
F08QFF (DTREXC) to reorder the eigenvalues so that
is in the leading position:
The reciprocal condition number of the eigenvector is then estimated as
, the smallest singular value of the matrix
. This number ranges from zero (i.e., ill-conditioned) to very large (i.e., well-conditioned).
An approximate error estimate for a computed right eigenvector
corresponding to
is then given by
4 References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5 Parameters
- 1: – CHARACTER(1)Input
-
On entry: indicates whether condition numbers are required for eigenvalues and/or eigenvectors.
- Condition numbers for eigenvalues only are computed.
- Condition numbers for eigenvectors only are computed.
- Condition numbers for both eigenvalues and eigenvectors are computed.
Constraint:
, or .
- 2: – CHARACTER(1)Input
-
On entry: indicates how many condition numbers are to be computed.
- Condition numbers for all eigenpairs are computed.
- Condition numbers for selected eigenpairs (as specified by SELECT) are computed.
Constraint:
or .
- 3: – LOGICAL arrayInput
-
Note: the dimension of the array
SELECT
must be at least
if
, and at least
otherwise.
On entry: specifies the eigenpairs for which condition numbers are to be computed if
. To select condition numbers for the eigenpair corresponding to the real eigenvalue
,
must be set .TRUE.. To select condition numbers corresponding to a complex conjugate pair of eigenvalues
and
,
and/or
must be set to .TRUE..
If
,
SELECT is not referenced.
- 4: – INTEGERInput
-
On entry: , the order of the matrix .
Constraint:
.
- 5: – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
T
must be at least
.
On entry: the
by
upper quasi-triangular matrix
in canonical Schur form, as returned by
F08PEF (DHSEQR).
- 6: – INTEGERInput
-
On entry: the first dimension of the array
T as declared in the (sub)program from which F08QLF (DTRSNA) is called.
Constraint:
.
- 7: – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
VL
must be at least
if
or
and at least
if
.
On entry: if
or
,
VL must contain the left eigenvectors of
(or of any matrix
with
orthogonal) corresponding to the eigenpairs specified by
HOWMNY and
SELECT. The eigenvectors
must be stored in consecutive columns of
VL, as returned by
F08PKF (DHSEIN) or
F08QKF (DTREVC).
If
,
VL is not referenced.
- 8: – INTEGERInput
-
On entry: the first dimension of the array
VL as declared in the (sub)program from which F08QLF (DTRSNA) is called.
Constraints:
- if or , ;
- if , .
- 9: – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
VR
must be at least
if
or
and at least
if
.
On entry: if
or
,
VR must contain the right eigenvectors of
(or of any matrix
with
orthogonal) corresponding to the eigenpairs specified by
HOWMNY and
SELECT. The eigenvectors
must be stored in consecutive columns of
VR, as returned by
F08PKF (DHSEIN) or
F08QKF (DTREVC).
If
,
VR is not referenced.
- 10: – INTEGERInput
-
On entry: the first dimension of the array
VR as declared in the (sub)program from which F08QLF (DTRSNA) is called.
Constraints:
- if or , ;
- if , .
- 11: – REAL (KIND=nag_wp) arrayOutput
-
Note: the dimension of the array
S
must be at least
if
or
, and at least
otherwise.
On exit: the reciprocal condition numbers of the selected eigenvalues if
or
, stored in consecutive elements of the array. Thus
,
and the
th columns of
VL and
VR all correspond to the same eigenpair (but not in general the
th eigenpair unless all eigenpairs have been selected). For a complex conjugate pair of eigenvalues, two consecutive elements of
S are set to the same value.
If
,
S is not referenced.
- 12: – REAL (KIND=nag_wp) arrayOutput
-
Note: the dimension of the array
SEP
must be at least
if
or
, and at least
otherwise.
On exit: the estimated reciprocal condition numbers of the selected right eigenvectors if
or
, stored in consecutive elements of the array. For a complex eigenvector, two consecutive elements of
SEP are set to the same value. If the eigenvalues cannot be reordered to compute
, then
is set to zero; this can only occur when the true value would be very small anyway.
If
,
SEP is not referenced.
- 13: – INTEGERInput
-
On entry: the number of elements in the arrays
S and
SEP, and the number of columns in the arrays
VL and
VR (if used). The precise number required,
, is
if
; if
,
is obtained by counting
for each selected real eigenvalue, and
for each selected complex conjugate pair of eigenvalues (see
SELECT), in which case
.
Constraint:
.
- 14: – INTEGEROutput
-
On exit:
, the number of elements of
S and/or
SEP actually used to store the estimated condition numbers. If
,
M is set to
.
- 15: – REAL (KIND=nag_wp) arrayWorkspace
-
Note: the second dimension of the array
WORK
must be at least
if
or
and at least
if
.
If
,
WORK is not referenced.
- 16: – INTEGERInput
-
On entry: the first dimension of the array
WORK as declared in the (sub)program from which F08QLF (DTRSNA) is called.
Constraints:
- if or , ;
- if , .
- 17: – INTEGER arrayWorkspace
-
Note: the dimension of the array
IWORK
must be at least
.
- 18: – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
-
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
7 Accuracy
The computed values may over estimate the true value, but seldom by a factor of more than .
8 Parallelism and Performance
F08QLF (DTRSNA) is not threaded by NAG in any implementation.
F08QLF (DTRSNA) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
For a description of canonical Schur form, see the document for
F08PEF (DHSEQR).
The complex analogue of this routine is
F08QYF (ZTRSNA).
10 Example
This example computes approximate error estimates for all the eigenvalues and right eigenvectors of the matrix
, where
10.1 Program Text
Program Text (f08qlfe.f90)
10.2 Program Data
Program Data (f08qlfe.d)
10.3 Program Results
Program Results (f08qlfe.r)