NAG Library Routine Document
F08YLF (DTGSNA)
1 Purpose
F08YLF (DTGSNA) estimates condition numbers for specified eigenvalues and/or eigenvectors of a matrix pair in generalized real Schur form.
2 Specification
SUBROUTINE F08YLF ( |
JOB, HOWMNY, SELECT, N, A, LDA, B, LDB, VL, LDVL, VR, LDVR, S, DIF, MM, M, WORK, LWORK, IWORK, INFO) |
INTEGER |
N, LDA, LDB, LDVL, LDVR, MM, M, LWORK, IWORK(*), INFO |
REAL (KIND=nag_wp) |
A(LDA,*), B(LDB,*), VL(LDVL,*), VR(LDVR,*), S(*), DIF(*), WORK(max(1,LWORK)) |
LOGICAL |
SELECT(*) |
CHARACTER(1) |
JOB, HOWMNY |
|
The routine may be called by its
LAPACK
name dtgsna.
3 Description
F08YLF (DTGSNA) estimates condition numbers for specified eigenvalues and/or right eigenvectors of an by matrix pair in real generalized Schur form. The routine actually returns estimates of the reciprocals of the condition numbers in order to avoid possible overflow.
The pair
are in real generalized Schur form if
is block upper triangular with
by
and
by
diagonal blocks and
is upper triangular as returned, for example, by
F08XAF (DGGES) or
F08XBF (DGGESX), or
F08XEF (DHGEQZ) with
. The diagonal elements, or blocks, define the generalized eigenvalues
, for
, of the pair
and the eigenvalues are given by
so that
where
is the corresponding (right) eigenvector.
If
and
are the result of a generalized Schur factorization of a matrix pair
then the eigenvalues and condition numbers of the pair
are the same as those of the pair
.
Let
be a simple generalized eigenvalue of
. Then the reciprocal of the condition number of the eigenvalue
is defined as
where
and
are the right and left eigenvectors of
corresponding to
. If both
and
are zero, then
is singular and
is returned.
The definition of the reciprocal of the estimated condition number of the right eigenvector and the left eigenvector corresponding to the simple eigenvalue depends upon whether is a real eigenvalue, or one of a complex conjugate pair.
If the eigenvalue
is real and
and
are orthogonal transformations such that
where
and
are
by
matrices, then the reciprocal condition number is given by
where
denotes the smallest singular value of the
by
matrix
and
is the Kronecker product.
If
is part of a complex conjugate pair and
and
are orthogonal transformations such that
where
and
are two by two matrices,
and
are
by
matrices, and
corresponds to the complex conjugate eigenvalue pair
,
, then there exist unitary matrices
and
such that
The eigenvalues are given by
and
. Then the Frobenius norm-based, estimated reciprocal condition number is bounded by
where
denotes the real part of
,
,
is the complex two by two matrix
and
is an upper bound on
; i.e., an upper bound on
, where
is the
by
matrix
See Sections 2.4.8 and 4.11 of
Anderson et al. (1999) and
Kågström and Poromaa (1996) for further details and information.
4 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
Kågström B and Poromaa P (1996) LAPACK-style algorithms and software for solving the generalized Sylvester equation and estimating the separation between regular matrix pairs ACM Trans. Math. Software 22 78–103
5 Parameters
- 1: JOB – 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: HOWMNY – 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: SELECT() – 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: N – INTEGERInput
On entry: , the order of the matrix pair .
Constraint:
.
- 5: A(LDA,) – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
A
must be at least
.
On entry: the upper quasi-triangular matrix .
- 6: LDA – INTEGERInput
On entry: the first dimension of the array
A as declared in the (sub)program from which F08YLF (DTGSNA) is called.
Constraint:
.
- 7: B(LDB,) – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
B
must be at least
.
On entry: the upper triangular matrix .
- 8: LDB – INTEGERInput
On entry: the first dimension of the array
B as declared in the (sub)program from which F08YLF (DTGSNA) is called.
Constraint:
.
- 9: VL(LDVL,) – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
VL
must be at least
if
or
, and at least
otherwise.
On entry: if
or
,
VL must contain left eigenvectors of
, corresponding to the eigenpairs specified by
HOWMNY and
SELECT. The eigenvectors must be stored in consecutive columns of
VL, as returned by
F08WAF (DGGEV) or
F08YKF (DTGEVC).
If
,
VL is not referenced.
- 10: LDVL – INTEGERInput
On entry: the first dimension of the array
VL as declared in the (sub)program from which F08YLF (DTGSNA) is called.
Constraints:
- if or , ;
- otherwise .
- 11: VR(LDVR,) – REAL (KIND=nag_wp) arrayInput
-
Note: the second dimension of the array
VR
must be at least
if
or
, and at least
otherwise.
On entry: if
or
,
VR must contain right eigenvectors of
, corresponding to the eigenpairs specified by
HOWMNY and
SELECT. The eigenvectors must be stored in consecutive columns of
VR, as returned by
F08WAF (DGGEV) or
F08YKF (DTGEVC).
If
,
VR is not referenced.
- 12: LDVR – INTEGERInput
On entry: the first dimension of the array
VR as declared in the (sub)program from which F08YLF (DTGSNA) is called.
Constraints:
- if or , ;
- otherwise .
- 13: S() – REAL (KIND=nag_wp) arrayOutput
-
Note: the dimension of the array
S
must be at least
.
On exit: if
or
, the reciprocal condition numbers of the selected eigenvalues, stored in consecutive elements of the array. For a complex conjugate pair of eigenvalues two consecutive elements of
S are set to the same value. Thus
,
, and the
th columns of
and
all correspond to the same eigenpair (but not in general the
th eigenpair, unless all eigenpairs are selected).
If
,
S is not referenced.
- 14: DIF() – REAL (KIND=nag_wp) arrayOutput
-
Note: the dimension of the array
DIF
must be at least
.
On exit: if
or
, the estimated reciprocal condition numbers of the selected eigenvectors, stored in consecutive elements of the array. For a complex eigenvector two consecutive elements of
DIF are set to the same value. If the eigenvalues cannot be reordered to compute
,
is set to
; this can only occur when the true value would be very small anyway.
If
,
DIF is not referenced.
- 15: MM – INTEGERInput
On entry: the number of elements in the arrays
S and
DIF.
Constraint:
.
- 16: M – INTEGEROutput
On exit: the number of elements of the arrays
S and
DIF used to store the specified condition numbers; for each selected real eigenvalue one element is used, and for each selected complex conjugate pair of eigenvalues, two elements are used. If
,
M is set to
N.
- 17: WORK() – REAL (KIND=nag_wp) arrayWorkspace
On exit: if
,
contains the minimum value of
LWORK required for optimal performance.
- 18: LWORK – INTEGERInput
On entry: the dimension of the array
WORK as declared in the (sub)program from which F08YLF (DTGSNA) is called.
If
, a workspace query is assumed; the routine only calculates the minimum size of the
WORK array, returns this value as the first entry of the
WORK array, and no error message related to
LWORK is issued.
Constraints:
if
,
- if or , ;
- otherwise .
- 19: IWORK() – INTEGER arrayWorkspace
-
Note: the dimension of the array
IWORK
must be at least
.
If
,
IWORK is not referenced.
- 20: INFO – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
Errors or warnings detected by the routine:
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
7 Accuracy
None.
An approximate asymptotic error bound on the chordal distance between the computed eigenvalue
and the corresponding exact eigenvalue
is
where
is the
machine precision.
An approximate asymptotic error bound for the right or left computed eigenvectors
or
corresponding to the right and left eigenvectors
and
is given by
The complex analogue of this routine is
F08YYF (ZTGSNA).
9 Example
This example estimates condition numbers and approximate error estimates for all the eigenvalues and eigenvalues and right eigenvectors of the pair
given by
The eigenvalues and eigenvectors are computed by calling
F08YKF (DTGEVC).
9.1 Program Text
Program Text (f08ylfe.f90)
9.2 Program Data
Program Data (f08ylfe.d)
9.3 Program Results
Program Results (f08ylfe.r)