NAG FL Interface
f08qlf (dtrsna)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f08qlf estimates condition numbers for specified eigenvalues and/or right eigenvectors of a real upper quasi-triangular matrix.

2 Specification

Fortran Interface
Subroutine f08qlf ( job, howmny, select, n, t, ldt, vl, ldvl, vr, ldvr, s, sep, mm, m, work, ldwork, iwork, info)
Integer, Intent (In) :: n, ldt, ldvl, ldvr, mm, ldwork
Integer, Intent (Inout) :: iwork(*)
Integer, Intent (Out) :: m, info
Real (Kind=nag_wp), Intent (In) :: t(ldt,*), vl(ldvl,*), vr(ldvr,*)
Real (Kind=nag_wp), Intent (Inout) :: s(*), sep(*), work(ldwork,*)
Logical, Intent (In) :: select(*)
Character (1), Intent (In) :: job, howmny
C Header Interface
#include <nag.h>
void  f08qlf_ (const char *job, const char *howmny, const logical sel[], const Integer *n, const double t[], const Integer *ldt, const double vl[], const Integer *ldvl, const double vr[], const Integer *ldvr, double s[], double sep[], const Integer *mm, Integer *m, double work[], const Integer *ldwork, Integer iwork[], Integer *info, const Charlen length_job, const Charlen length_howmny)
The routine may be called by the names f08qlf, nagf_lapackeig_dtrsna or its LAPACK name dtrsna.

3 Description

f08qlf 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 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 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 Arguments

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 array Input
Note: the dimension of the array select must be at least max(1,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, select(j) must be set .TRUE.. To select condition numbers corresponding to a complex conjugate pair of eigenvalues λj and λj+1, select(j) and/or select(j+1) must be set to .TRUE..
If howmny='A', select is not referenced.
4: n Integer Input
On entry: n, the order of the matrix T.
Constraint: n0.
5: t(ldt,*) Real (Kind=nag_wp) array Input
Note: the second dimension of the array t must be at least max(1,n).
On entry: the n×n upper quasi-triangular matrix T in canonical Schur form, as returned by f08pef.
6: ldt Integer Input
On entry: the first dimension of the array t as declared in the (sub)program from which f08qlf is called.
Constraint: ldt max(1,n) .
7: vl(ldvl,*) Real (Kind=nag_wp) array Input
Note: the second dimension of the array vl must be at least max(1,mm) if job='E' or 'B'.
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 or f08qkf.
If job='V', vl is not referenced.
8: ldvl Integer Input
On entry: the first dimension of the array vl as declared in the (sub)program from which f08qlf is called.
Constraints:
  • if job='E' or 'B', ldvl max(1,n) ;
  • if job='V', ldvl1.
9: vr(ldvr,*) Real (Kind=nag_wp) array Input
Note: the second dimension of the array vr must be at least max(1,mm) if job='E' or 'B'.
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 or f08qkf.
If job='V', vr is not referenced.
10: ldvr Integer Input
On entry: the first dimension of the array vr as declared in the (sub)program from which f08qlf is called.
Constraints:
  • if job='E' or 'B', ldvr max(1,n) ;
  • if job='V', ldvr1.
11: s(*) Real (Kind=nag_wp) array Output
Note: the dimension of the array s must be at least max(1,mm) if job='E' or 'B'.
On exit: the reciprocal condition numbers of the selected eigenvalues if job='E' or 'B', stored in consecutive elements of the array. Thus s(j), sep(j) 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.
If job='V', s is not referenced.
12: sep(*) Real (Kind=nag_wp) array Output
Note: the dimension of the array sep must be at least max(1,mm) if job='V' or 'B', and at least 1 otherwise.
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 sep(j), sep(j) 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 Integer Input
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 Integer Output
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) array Workspace
Note: the second dimension of the array work must be at least max(1,n+6) if job='V' or 'B' and at least 1 if job='E'.
If job='E', work is not referenced.
16: ldwork Integer Input
On entry: the first dimension of the array work as declared in the (sub)program from which f08qlf is called.
Constraints:
  • if job='V' or 'B', ldwork max(1,n) ;
  • if job='E', ldwork1.
17: iwork(*) Integer array Workspace
Note: the dimension of the array iwork must be at least max(1,2×(n-1)).
18: info Integer Output
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 Parallelism and Performance

f08qlf 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

For a description of canonical Schur form, see the document for f08pef.
The complex analogue of this routine is f08qyf.

10 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 ) .  

10.1 Program Text

Program Text (f08qlfe.f90)

10.2 Program Data

Program Data (f08qlfe.d)

10.3 Program Results

Program Results (f08qlfe.r)