F08YLF (DTGSNA) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08YLF (DTGSNA)

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

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 n by n matrix pair S,T 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 S,T are in real generalized Schur form if S is block upper triangular with 1 by 1 and 2 by 2 diagonal blocks and T is upper triangular as returned, for example, by F08XAF (DGGES) or F08XBF (DGGESX), or F08XEF (DHGEQZ) with JOB='S'. The diagonal elements, or blocks, define the generalized eigenvalues αi,βi, for i=1,2,,n, of the pair S,T and the eigenvalues are given by
λi = αi / βi ,  
so that
βi S xi = αi T xi   or   S xi = λi T xi ,  
where xi is the corresponding (right) eigenvector.
If S and T are the result of a generalized Schur factorization of a matrix pair A,B 
A = QSZT ,   B = QTZT  
then the eigenvalues and condition numbers of the pair S,T are the same as those of the pair A,B.
Let α,β0,0 be a simple generalized eigenvalue of A,B. Then the reciprocal of the condition number of the eigenvalue λ=α/β is defined as
sλ= yTAx 2 + yTBx 2 1/2 x2 y2 ,  
where x and y are the right and left eigenvectors of A,B corresponding to λ. If both α and β are zero, then A,B is singular and sλ=-1 is returned.
The definition of the reciprocal of the estimated condition number of the right eigenvector x and the left eigenvector y 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 U and V are orthogonal transformations such that
UT A,B V= S,T = α * 0 S22 β * 0 T22 ,  
where S22 and T22 are n-1 by n-1 matrices, then the reciprocal condition number is given by
Difx Dify = Difα,β,S22,T22 = σmin Z ,  
where σminZ denotes the smallest singular value of the 2n-1 by 2n-1 matrix
Z = αI -1S22 βI -1T22  
and  is the Kronecker product.
If λ is part of a complex conjugate pair and U and V are orthogonal transformations such that
UT A,B V = S,T = S11 * 0 S22 T11 * 0 T22 ,  
where S11 and T11 are two by two matrices, S22 and T22 are n-2 by n-2 matrices, and S11,T11 corresponds to the complex conjugate eigenvalue pair λ, λ-, then there exist unitary matrices U1 and V1 such that
U1H S11 V1 = s11 s12 0 s22   and   U1H T11 V1 = t11 t12 0 t22 .  
The eigenvalues are given by λ=s11/t11 and λ-=s22/t22. Then the Frobenius norm-based, estimated reciprocal condition number is bounded by
Difx Dify mind1,max1, Res11 / Res22 ,d2  
where Rez denotes the real part of z, d1=Difs11,t11,s22,t22=σminZ1, Z1 is the complex two by two matrix
Z1 = s11 -s22 t11 -t22 ,  
and d2 is an upper bound on DifS11,T11,S22,T22; i.e., an upper bound on σminZ2, where Z2 is the 2n-2 by 2n-2 matrix
Z2 = S11TI -IS22 T11TI -IT22 .  
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.
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 pair S,T.
Constraint: N0.
5:     ALDA* – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array A must be at least max1,N.
On entry: the upper quasi-triangular matrix S.
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: LDAmax1,N.
7:     BLDB* – REAL (KIND=nag_wp) arrayInput
Note: the second dimension of the array B must be at least max1,N.
On entry: the upper triangular matrix T.
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: LDBmax1,N.
9:     VLLDVL* – 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 otherwise.
On entry: if JOB='E' or 'B', VL must contain left eigenvectors of S,T, 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 JOB='V', 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 JOB='E' or 'B', LDVL max1,N ;
  • otherwise LDVL1.
11:   VRLDVR* – 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 otherwise.
On entry: if JOB='E' or 'B', VR must contain right eigenvectors of S,T, 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 JOB='V', 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 JOB='E' or 'B', LDVR max1,N ;
  • otherwise LDVR1.
13:   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 otherwise.
On exit: if JOB='E' or 'B', 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 Sj, DIFj, and the jth columns of VL and VR all correspond to the same eigenpair (but not in general the jth eigenpair, unless all eigenpairs are selected).
If JOB='V', S is not referenced.
14:   DIF* – REAL (KIND=nag_wp) arrayOutput
Note: the dimension of the array DIF must be at least max1,MM if JOB='V' or 'B', and at least 1 otherwise.
On exit: if JOB='V' or 'B', 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 DIFj, DIFj is set to 0; this can only occur when the true value would be very small anyway.
If JOB='E', DIF is not referenced.
15:   MM – INTEGERInput
On entry: the number of elements in the arrays S and DIF.
Constraints:
  • if HOWMNY='A', MMN;
  • otherwise MMM.
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 HOWMNY='A', M is set to N.
17:   WORKmax1,LWORK – REAL (KIND=nag_wp) arrayWorkspace
On exit: if INFO=0, WORK1 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 LWORK=-1, 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 LWORK-1,
  • if JOB='V' or 'B', LWORK2×N×N+2+16;
  • otherwise LWORKmax1,N.
19:   IWORK* – INTEGER arrayWorkspace
Note: the dimension of the array IWORK must be at least N+6.
If JOB='E', IWORK is not referenced.
20:   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

None.

8  Parallelism and Performance

F08YLF (DTGSNA) is not threaded by NAG in any implementation.
F08YLF (DTGSNA) 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.

9  Further Comments

An approximate asymptotic error bound on the chordal distance between the computed eigenvalue λ~ and the corresponding exact eigenvalue λ is
χλ~,λ εA,BF / Sλ  
where ε is the machine precision.
An approximate asymptotic error bound for the right or left computed eigenvectors x~ or y~ corresponding to the right and left eigenvectors x and y is given by
θz~,z ε A,BF / Dif .  
The complex analogue of this routine is F08YYF (ZTGSNA).

10  Example

This example estimates condition numbers and approximate error estimates for all the eigenvalues and eigenvalues and right eigenvectors of the pair S,T given by
S = 4.0 1.0 1.0 2.0 0.0 3.0 -1.0 1.0 0.0 1.0 3.0 1.0 0.0 0.0 0.0 6.0   and   T= 2.0 1.0 1.0 3.0 0.0 1.0 0.0 1.0 0.0 0.0 1.0 1.0 0.0 0.0 0.0 2.0 .  
The eigenvalues and eigenvectors are computed by calling F08YKF (DTGEVC).

10.1  Program Text

Program Text (f08ylfe.f90)

10.2  Program Data

Program Data (f08ylfe.d)

10.3  Program Results

Program Results (f08ylfe.r)


F08YLF (DTGSNA) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

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