F08QLF (DTRSNA) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08QLF (DTRSNA)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

+ Contents

    1  Purpose
    7  Accuracy

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 T in canonical Schur form. These are the same as the condition numbers of the eigenvalues and right eigenvectors of an original matrix A=ZTZT (with orthogonal Z), from which T may have been derived.
F08QLF (DTRSNA) computes the reciprocal of the condition number of an eigenvalue λi as
si = vHu uEvE ,
where u and v are the right and left eigenvectors of T, respectively, corresponding to λi. 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 λi is then given by
εT si ,
where ε is the machine precision.
To estimate the reciprocal of the condition number of the right eigenvector corresponding to λi, the routine first calls F08QFF (DTREXC) to reorder the eigenvalues so that λi is in the leading position:
T =Q λi cT 0 T22 QT.
The reciprocal condition number of the eigenvector is then estimated as sepi, the smallest singular value of the matrix T22-λiI. 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 u corresponding to λi is then given by
εT sepi .

4  References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

5  Parameters

1:     JOB – CHARACTER(1)Input
On entry: indicates whether condition numbers are required for eigenvalues and/or eigenvectors.
JOB='E'
Condition numbers for eigenvalues only are computed.
JOB='V'
Condition numbers for eigenvectors only are computed.
JOB='B'
Condition numbers for both eigenvalues and eigenvectors are computed.
Constraint: JOB='E', 'V' or 'B'.
2:     HOWMNY – CHARACTER(1)Input
On entry: indicates how many condition numbers are to be computed.
HOWMNY='A'
Condition numbers for all eigenpairs are computed.
HOWMNY='S'
Condition numbers for selected eigenpairs (as specified by SELECT) are computed.
Constraint: HOWMNY='A' or 'S'.
3:     SELECT(*) – LOGICAL arrayInput
Note: the dimension of the array SELECT must be at least max1,N if HOWMNY='S', and at least 1 otherwise.
On entry: specifies the eigenpairs for which condition numbers are to be computed if HOWMNY='S'. To select condition numbers for the eigenpair corresponding to the real eigenvalue λj, SELECTj must be set .TRUE.. To select condition numbers corresponding to a complex conjugate pair of eigenvalues λj and λj+1, SELECTj and/or SELECTj+1 must be set to .TRUE..
If HOWMNY='A', SELECT is not referenced.
4:     N – INTEGERInput
On entry: n, the order of the matrix T.
Constraint: N0.
5:     T(LDT,*) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array T must be at least max1,N.
On entry: the n by n upper quasi-triangular matrix T in canonical Schur form, as returned by F08PEF (DHSEQR).
6:     LDT – INTEGERInput
On entry: the first dimension of the array T as declared in the (sub)program from which F08QLF (DTRSNA) is called.
Constraint: LDT max1,N .
7:     VL(LDVL,*) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array VL must be at least max1,MM if JOB='E' or 'B' and at least 1 if JOB='V'.
On entry: if JOB='E' or 'B', VL must contain the left eigenvectors of T (or of any matrix QTQT with Q 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 JOB='V', VL is not referenced.
8:     LDVL – INTEGERInput
On entry: the first dimension of the array VL as declared in the (sub)program from which F08QLF (DTRSNA) is called.
Constraints:
  • if JOB='E' or 'B', LDVL max1,N ;
  • if JOB='V', LDVL1.
9:     VR(LDVR,*) – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array VR must be at least max1,MM if JOB='E' or 'B' and at least 1 if JOB='V'.
On entry: if JOB='E' or 'B', VR must contain the right eigenvectors of T (or of any matrix QTQT with Q 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 JOB='V', VR is not referenced.
10:   LDVR – INTEGERInput
On entry: the first dimension of the array VR as declared in the (sub)program from which F08QLF (DTRSNA) is called.
Constraints:
  • if JOB='E' or 'B', LDVR max1,N ;
  • if JOB='V', LDVR1.
11:   S(*) – REAL (KIND=nag_wp) arrayOutput
Note: the dimension of the array S must be at least max1,MM if JOB='E' or 'B' and at least 1 if JOB='V'.
On exit: the reciprocal condition numbers of the selected eigenvalues if JOB='E' or 'B', stored in consecutive elements of the array. Thus Sj, SEPj and the jth columns of VL and VR all correspond to the same eigenpair (but not in general the jth 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.
S is not referenced if JOB='V'.
12:   SEP(*) – REAL (KIND=nag_wp) arrayOutput
Note: the dimension of the array SEP must be at least max1,MM if JOB='V' or 'B' and at least 1 if JOB='E'.
On exit: the estimated reciprocal condition numbers of the selected right eigenvectors if JOB='V' or 'B', 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 SEPj, then SEPj is set to zero; this can only occur when the true value would be very small anyway.
If JOB='E', SEP is not referenced.
13:   MM – 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, m, is n if HOWMNY='A'; if HOWMNY='S', m is obtained by counting 1 for each selected real eigenvalue, and 2 for each selected complex conjugate pair of eigenvalues (see SELECT), in which case 0mn.
Constraint: MMM.
14:   M – INTEGEROutput
On exit: m, the number of elements of S and/or SEP actually used to store the estimated condition numbers. If HOWMNY='A', M is set to n.
15:   WORK(LDWORK,*) – REAL (KIND=nag_wp) arrayWorkspace
Note: the second dimension of the array WORK must be at least max1,N+6 if JOB='V' or 'B' and at least 1 if JOB='E'.
If JOB='E', WORK is not referenced.
16:   LDWORK – INTEGERInput
On entry: the first dimension of the array WORK as declared in the (sub)program from which F08QLF (DTRSNA) is called.
Constraints:
  • if JOB='V' or 'B', LDWORK max1,N ;
  • if JOB='E', LDWORK1.
17:   IWORK(*) – INTEGER arrayWorkspace
Note: the dimension of the array IWORK must be at least max1,2×N-1.
18:   INFO – INTEGEROutput
On exit: INFO=0 unless the routine detects an error (see Section 6).

6  Error Indicators and Warnings

INFO<0
If INFO=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.

7  Accuracy

The computed values sepi may over estimate the true value, but seldom by a factor of more than 3.

8  Further Comments

For a description of canonical Schur form, see the document for F08PEF (DHSEQR).
The complex analogue of this routine is F08QYF (ZTRSNA).

9  Example

This example computes approximate error estimates for all the eigenvalues and right eigenvectors of the matrix T, where
T = 0.7995 -0.1144 0.0060 0.0336 0.0000 -0.0994 0.2478 0.3474 0.0000 -0.6483 -0.0994 0.2026 0.0000 0.0000 0.0000 -0.1007 .

9.1  Program Text

Program Text (f08qlfe.f90)

9.2  Program Data

Program Data (f08qlfe.d)

9.3  Program Results

Program Results (f08qlfe.r)


F08QLF (DTRSNA) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012