F08QYF (ZTRSNA) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08QYF (ZTRSNA)

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

F08QYF (ZTRSNA) estimates condition numbers for specified eigenvalues and/or right eigenvectors of a complex upper triangular matrix.

2  Specification

SUBROUTINE F08QYF ( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, LDVR, S, SEP, MM, M, WORK, LDWORK, RWORK, INFO)
INTEGER  N, LDT, LDVL, LDVR, MM, M, LDWORK, INFO
REAL (KIND=nag_wp)  S(*), SEP(*), RWORK(*)
COMPLEX (KIND=nag_wp)  T(LDT,*), VL(LDVL,*), VR(LDVR,*), WORK(LDWORK,*)
LOGICAL  SELECT(*)
CHARACTER(1)  JOB, HOWMNY
The routine may be called by its LAPACK name ztrsna.

3  Description

F08QYF (ZTRSNA) estimates condition numbers for specified eigenvalues and/or right eigenvectors of a complex upper triangular matrix T. These are the same as the condition numbers of the eigenvalues and right eigenvectors of an original matrix A=ZTZH (with unitary Z), from which T may have been derived.
F08QYF (ZTRSNA) 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 F08QTF (ZTREXC) to reorder the eigenvalues so that λi is in the leading position:
T =Q λi cH 0 T22 QH.
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 eigenvalue λj, SELECTj 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,*) – COMPLEX (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 triangular matrix T, as returned by F08PSF (ZHSEQR).
6:     LDT – INTEGERInput
On entry: the first dimension of the array T as declared in the (sub)program from which F08QYF (ZTRSNA) is called.
Constraint: LDT max1,N .
7:     VL(LDVL,*) – COMPLEX (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 QTQH with Q unitary) corresponding to the eigenpairs specified by HOWMNY and SELECT. The eigenvectors must be stored in consecutive columns of VL, as returned by F08PXF (ZHSEIN) or F08QXF (ZTREVC).
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 F08QYF (ZTRSNA) is called.
Constraints:
  • if JOB='E' or 'B', LDVL max1,N ;
  • if JOB='V', LDVL1.
9:     VR(LDVR,*) – COMPLEX (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 QTQH with Q unitary) corresponding to the eigenpairs specified by HOWMNY and SELECT. The eigenvectors must be stored in consecutive columns of VR, as returned by F08PXF (ZHSEIN) or F08QXF (ZTREVC).
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 F08QYF (ZTRSNA) 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).
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.
If JOB='E', SEP is not referenced i.
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 the number of selected eigenpairs (see SELECT), in which case 0mn.
Constraint: MMm.
14:   M – INTEGEROutput
On exit: m, the number of selected eigenpairs. If HOWMNY='A', M is set to n.
15:   WORK(LDWORK,*) – COMPLEX (KIND=nag_wp) arrayWorkspace
Note: the second dimension of the array WORK must be at least max1,N+1 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 F08QYF (ZTRSNA) is called.
Constraints:
  • if JOB='V' or 'B', LDWORK max1,N ;
  • if JOB='E', LDWORK1.
17:   RWORK(*) – REAL (KIND=nag_wp) arrayWorkspace
Note: the dimension of the array RWORK must be at least max1,N.
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

The real analogue of this routine is F08QLF (DTRSNA).

9  Example

This example computes approximate error estimates for all the eigenvalues and right eigenvectors of the matrix T, where
T = -6.0004-6.9999i 0.3637-0.3656i -0.1880+0.4787i 0.8785-0.2539i 0.0000+0.0000i -5.0000+2.0060i -0.0307-0.7217i -0.2290+0.1313i 0.0000+0.0000i 0.0000+0.0000i 7.9982-0.9964i 0.9357+0.5359i 0.0000+0.0000i 0.0000+0.0000i 0.0000+0.0000i 3.0023-3.9998i .

9.1  Program Text

Program Text (f08qyfe.f90)

9.2  Program Data

Program Data (f08qyfe.d)

9.3  Program Results

Program Results (f08qyfe.r)


F08QYF (ZTRSNA) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

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