NAG FL Interface
f08quf (ztrsen)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f08quf reorders the Schur factorization of a complex general matrix so that a selected cluster of eigenvalues appears in the leading elements on the diagonal of the Schur form. The routine also optionally computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.

2 Specification

Fortran Interface
Subroutine f08quf ( job, compq, select, n, t, ldt, q, ldq, w, m, s, sep, work, lwork, info)
Integer, Intent (In) :: n, ldt, ldq, lwork
Integer, Intent (Out) :: m, info
Real (Kind=nag_wp), Intent (Out) :: s, sep
Complex (Kind=nag_wp), Intent (Inout) :: t(ldt,*), q(ldq,*), w(*)
Complex (Kind=nag_wp), Intent (Out) :: work(max(1,lwork))
Logical, Intent (In) :: select(*)
Character (1), Intent (In) :: job, compq
C Header Interface
#include <nag.h>
void  f08quf_ (const char *job, const char *compq, const logical sel[], const Integer *n, Complex t[], const Integer *ldt, Complex q[], const Integer *ldq, Complex w[], Integer *m, double *s, double *sep, Complex work[], const Integer *lwork, Integer *info, const Charlen length_job, const Charlen length_compq)
The routine may be called by the names f08quf, nagf_lapackeig_ztrsen or its LAPACK name ztrsen.

3 Description

f08quf reorders the Schur factorization of a complex general matrix A=QTQH, so that a selected cluster of eigenvalues appears in the leading diagonal elements of the Schur form.
The reordered Schur form T~ is computed by a unitary similarity transformation: T~=ZHTZ. Optionally the updated matrix Q~ of Schur vectors is computed as Q~=QZ, giving A=Q~T~Q~H.
Let T~= ( T11 T12 0 T22 ) , where the selected eigenvalues are precisely the eigenvalues of the leading m×m sub-matrix T11. Let Q~ be correspondingly partitioned as ( Q1 Q2 ) where Q1 consists of the first m columns of Q. Then AQ1=Q1T11, and so the m columns of Q1 form an orthonormal basis for the invariant subspace corresponding to the selected cluster of eigenvalues.
Optionally the routine also computes estimates of the reciprocal condition numbers of the average of the cluster of eigenvalues and of the invariant subspace.

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 the cluster of eigenvalues and/or the invariant subspace.
job='N'
No condition numbers are required.
job='E'
Only the condition number for the cluster of eigenvalues is computed.
job='V'
Only the condition number for the invariant subspace is computed.
job='B'
Condition numbers for both the cluster of eigenvalues and the invariant subspace are computed.
Constraint: job='N', 'E', 'V' or 'B'.
2: compq Character(1) Input
On entry: indicates whether the matrix Q of Schur vectors is to be updated.
compq='V'
The matrix Q of Schur vectors is updated.
compq='N'
No Schur vectors are updated.
Constraint: compq='V' or 'N'.
3: select(*) Logical array Input
Note: the dimension of the array select must be at least max(1,n).
On entry: specifies the eigenvalues in the selected cluster. To select a complex eigenvalue λj, select(j) must be set .TRUE..
4: n Integer Input
On entry: n, the order of the matrix T.
Constraint: n0.
5: t(ldt,*) Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array t must be at least max(1,n).
On entry: the n×n upper triangular matrix T, as returned by f08psf.
On exit: t is overwritten by the updated matrix T~.
6: ldt Integer Input
On entry: the first dimension of the array t as declared in the (sub)program from which f08quf is called.
Constraint: ldt max(1,n) .
7: q(ldq,*) Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array q must be at least max(1,n) if compq='V' and at least 1 if compq='N'.
On entry: if compq='V', q must contain the n×n unitary matrix Q of Schur vectors, as returned by f08psf.
On exit: if compq='V', q contains the updated matrix of Schur vectors; the first m columns of Q form an orthonormal basis for the specified invariant subspace.
If compq='N', q is not referenced.
8: ldq Integer Input
On entry: the first dimension of the array q as declared in the (sub)program from which f08quf is called.
Constraints:
  • if compq='V', ldq max(1,n) ;
  • if compq='N', ldq1.
9: w(*) Complex (Kind=nag_wp) array Output
Note: the dimension of the array w must be at least max(1,n).
On exit: the reordered eigenvalues of T~. The eigenvalues are stored in the same order as on the diagonal of T~.
10: m Integer Output
On exit: m, the dimension of the specified invariant subspace, which is the same as the number of selected eigenvalues (see select); 0mn.
11: s Real (Kind=nag_wp) Output
On exit: if job='E' or 'B', s is a lower bound on the reciprocal condition number of the average of the selected cluster of eigenvalues. If m=0 or n, s=1.
If job='N' or 'V', s is not referenced.
12: sep Real (Kind=nag_wp) Output
On exit: if job='V' or 'B', sep is the estimated reciprocal condition number of the specified invariant subspace. If m=0 or n, sep=T.
If job='N' or 'E', sep is not referenced.
13: work(max(1,lwork)) Complex (Kind=nag_wp) array Workspace
On exit: if info=0, the real part of work(1) contains the minimum value of lwork required for optimal performance.
14: lwork Integer Input
On entry: the dimension of the array work as declared in the (sub)program from which f08quf is called, unless lwork=−1, in which case a workspace query is assumed and the routine only calculates the minimum dimension of work.
Constraints:
  • if job='N', lwork1 or lwork=−1;
  • if job='E', lworkmax(1,m×(n-m)) or lwork=−1;
  • if job='V' or 'B', lworkmax(1,2m×(n-m)) or lwork=−1.
The actual amount of workspace required cannot exceed n2/4 if job='E' or n2/2 if job='V' or 'B'.
15: 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 matrix T~ is similar to a matrix (T+E), where
E2 = O(ε) T2 ,  
and ε is the machine precision.
s cannot underestimate the true reciprocal condition number by more than a factor of min(m,n-m). sep may differ from the true value by m(n-m). The angle between the computed invariant subspace and the true subspace is O(ε)A2sep .
The values of the eigenvalues are never changed by the reordering.

8 Parallelism and Performance

f08quf 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

The real analogue of this routine is f08qgf.

10 Example

This example reorders the Schur factorization of the matrix A=QTQH such that the eigenvalues stored in elements t11 and t44 appear as the leading elements on the diagonal of the reordered 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 )  
and
Q = ( -0.8347-0.1364i -0.0628+0.3806i 0.2765-0.0846i 0.0633-0.2199i 0.0664-0.2968i 0.2365+0.5240i -0.5877-0.4208i 0.0835+0.2183i -0.0362-0.3215i 0.3143-0.5473i 0.0576-0.5736i 0.0057-0.4058i 0.0086+0.2958i -0.3416-0.0757i -0.1900-0.1600i 0.8327-0.1868i ) .  
The original matrix A is given in f08ntf.

10.1 Program Text

Program Text (f08qufe.f90)

10.2 Program Data

Program Data (f08qufe.d)

10.3 Program Results

Program Results (f08qufe.r)