F08QUF (ZTRSEN) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08QUF (ZTRSEN)

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

F08QUF (ZTRSEN) 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

SUBROUTINE F08QUF ( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, W, M, S, SEP, WORK, LWORK, INFO)
INTEGER  N, LDT, LDQ, M, LWORK, INFO
REAL (KIND=nag_wp)  S, SEP
COMPLEX (KIND=nag_wp)  T(LDT,*), Q(LDQ,*), W(*), WORK(max(1,LWORK))
LOGICAL  SELECT(*)
CHARACTER(1)  JOB, COMPQ
The routine may be called by its LAPACK name ztrsen.

3  Description

F08QUF (ZTRSEN) 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 by 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  Parameters

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 arrayInput
Note: the dimension of the array SELECT must be at least max1,N.
On entry: specifies the eigenvalues in the selected cluster. To select a complex eigenvalue λj, SELECTj must be set .TRUE..
4:     N – INTEGERInput
On entry: n, the order of the matrix T.
Constraint: N0.
5:     TLDT* – COMPLEX (KIND=nag_wp) arrayInput/Output
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).
On exit: T is overwritten by the updated matrix T~.
6:     LDT – INTEGERInput
On entry: the first dimension of the array T as declared in the (sub)program from which F08QUF (ZTRSEN) is called.
Constraint: LDT max1,N .
7:     QLDQ* – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array Q must be at least max1,N if COMPQ='V' and at least 1 if COMPQ='N'.
On entry: if COMPQ='V', Q must contain the n by n unitary matrix Q of Schur vectors, as returned by F08PSF (ZHSEQR).
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 – INTEGERInput
On entry: the first dimension of the array Q as declared in the (sub)program from which F08QUF (ZTRSEN) is called.
Constraints:
  • if COMPQ='V', LDQ max1,N ;
  • if COMPQ='N', LDQ1.
9:     W* – COMPLEX (KIND=nag_wp) arrayOutput
Note: the dimension of the array W must be at least max1,N.
On exit: the reordered eigenvalues of T~. The eigenvalues are stored in the same order as on the diagonal of T~.
10:   M – INTEGEROutput
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:   WORKmax1,LWORK – COMPLEX (KIND=nag_wp) arrayWorkspace
On exit: if INFO=0, the real part of WORK1 contains the minimum value of LWORK required for optimal performance.
14:   LWORK – INTEGERInput
On entry: the dimension of the array WORK as declared in the (sub)program from which F08QUF (ZTRSEN) 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', LWORKmax1,m×N-m or LWORK=-1;
  • if JOB='V' or 'B', LWORKmax1,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 – 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 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 minm,n-m. SEP may differ from the true value by mn-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 (ZTRSEN) is not threaded by NAG in any implementation.
F08QUF (ZTRSEN) 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 (DTRSEN).

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 Section 10 in F08NTF (ZUNGHR).

10.1  Program Text

Program Text (f08qufe.f90)

10.2  Program Data

Program Data (f08qufe.d)

10.3  Program Results

Program Results (f08qufe.r)


F08QUF (ZTRSEN) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

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