NAG Library Routine Document
F08QUF (ZTRSEN)
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 , so that a selected cluster of eigenvalues appears in the leading diagonal elements of the Schur form.
The reordered Schur form is computed by a unitary similarity transformation: . Optionally the updated matrix of Schur vectors is computed as , giving .
Let , where the selected eigenvalues are precisely the eigenvalues of the leading by sub-matrix . Let be correspondingly partitioned as where consists of the first columns of . Then , and so the columns of 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.
- No condition numbers are required.
- Only the condition number for the cluster of eigenvalues is computed.
- Only the condition number for the invariant subspace is computed.
- Condition numbers for both the cluster of eigenvalues and the invariant subspace are computed.
Constraint:
, , or .
- 2: COMPQ – CHARACTER(1)Input
On entry: indicates whether the matrix
of Schur vectors is to be updated.
- The matrix of Schur vectors is updated.
- No Schur vectors are updated.
Constraint:
or .
- 3: SELECT() – LOGICAL arrayInput
-
Note: the dimension of the array
SELECT
must be at least
.
On entry: specifies the eigenvalues in the selected cluster. To select a complex eigenvalue , must be set .TRUE..
- 4: N – INTEGERInput
On entry: , the order of the matrix .
Constraint:
.
- 5: T(LDT,) – COMPLEX (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
T
must be at least
.
On entry: the
by
upper triangular matrix
, as returned by
F08PSF (ZHSEQR).
On exit:
T is overwritten by the updated matrix
.
- 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:
.
- 7: Q(LDQ,) – COMPLEX (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
Q
must be at least
if
and at least
if
.
On entry: if
,
Q must contain the
by
unitary matrix
of Schur vectors, as returned by
F08PSF (ZHSEQR).
On exit: if
,
Q contains the updated matrix of Schur vectors; the first
columns of
form an orthonormal basis for the specified invariant subspace.
If
,
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 , ;
- if , .
- 9: W() – COMPLEX (KIND=nag_wp) arrayOutput
-
Note: the dimension of the array
W
must be at least
.
On exit: the reordered eigenvalues of . The eigenvalues are stored in the same order as on the diagonal of .
- 10: M – INTEGEROutput
On exit:
, the dimension of the specified invariant subspace, which is the same as the number of selected eigenvalues (see
SELECT);
.
- 11: S – REAL (KIND=nag_wp)Output
On exit: if
or
,
S is a lower bound on the reciprocal condition number of the average of the selected cluster of eigenvalues. If
,
.
If
or
,
S is not referenced.
- 12: SEP – REAL (KIND=nag_wp)Output
On exit: if
or
,
SEP is the estimated reciprocal condition number of the specified invariant subspace. If
,
.
If
or
,
SEP is not referenced.
- 13: WORK() – COMPLEX (KIND=nag_wp) arrayWorkspace
On exit: if
, the real part of
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
, in which case a workspace query is assumed and the routine only calculates the minimum dimension of
WORK.
Constraints:
- if , or ;
- if , or ;
- if or , or .
The actual amount of workspace required cannot exceed if or if or .
- 15: INFO – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
Errors or warnings detected by the routine:
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
7 Accuracy
The computed matrix
is similar to a matrix
, where
and
is the
machine precision.
S cannot underestimate the true reciprocal condition number by more than a factor of
.
SEP may differ from the true value by
. The angle between the computed invariant subspace and the true subspace is
.
The values of the eigenvalues are never changed by the reordering.
The real analogue of this routine is
F08QGF (DTRSEN).
9 Example
This example reorders the Schur factorization of the matrix
such that the eigenvalues stored in elements
and
appear as the leading elements on the diagonal of the reordered matrix
, where
and
The original matrix
is given in
Section 9 in F08NTF (ZUNGHR).
9.1 Program Text
Program Text (f08qufe.f90)
9.2 Program Data
Program Data (f08qufe.d)
9.3 Program Results
Program Results (f08qufe.r)