PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_ztrsen (f08qu)
Purpose
nag_lapack_ztrsen (f08qu) 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 function also optionally computes the reciprocal condition numbers of the cluster of eigenvalues and/or the invariant subspace.
Syntax
[
t,
q,
w,
m,
s,
sep,
info] = f08qu(
job,
compq,
select,
t,
q, 'n',
n)
[
t,
q,
w,
m,
s,
sep,
info] = nag_lapack_ztrsen(
job,
compq,
select,
t,
q, 'n',
n)
Description
nag_lapack_ztrsen (f08qu) 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 function also computes estimates of the reciprocal condition numbers of the average of the cluster of eigenvalues and of the invariant subspace.
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Parameters
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
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:
– string (length ≥ 1)
-
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:
– logical array
-
The dimension of the array
select
must be at least
Specifies the eigenvalues in the selected cluster. To select a complex eigenvalue , must be set true.
- 4:
– complex array
-
The first dimension of the array
t must be at least
.
The second dimension of the array
t must be at least
.
The
by
upper triangular matrix
, as returned by
nag_lapack_zhseqr (f08ps).
- 5:
– complex array
-
The first dimension,
, of the array
q must satisfy
- if , ;
- if , .
The second dimension of the array
q must be at least
if
and at least
if
.
If
,
q must contain the
by
unitary matrix
of Schur vectors, as returned by
nag_lapack_zhseqr (f08ps).
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the array
t and the second dimension of the array
t. (An error is raised if these dimensions are not equal.)
, the order of the matrix .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The first dimension of the array
t will be
.
The second dimension of the array
t will be
.
t stores the updated matrix
.
- 2:
– complex array
-
The first dimension,
, of the array
q will be
- if , ;
- if , .
The second dimension of the array
q will be
if
and at least
if
.
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.
- 3:
– complex array
-
The dimension of the array
w will be
The reordered eigenvalues of . The eigenvalues are stored in the same order as on the diagonal of .
- 4:
– int64int32nag_int scalar
-
, the dimension of the specified invariant subspace, which is the same as the number of selected eigenvalues (see
select);
.
- 5:
– double scalar
-
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.
- 6:
– double scalar
-
If
or
,
sep is the estimated reciprocal condition number of the specified invariant subspace. If
,
.
If
or
,
sep is not referenced.
- 7:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
-
If , parameter had an illegal value on entry. The parameters are numbered as follows:
1:
job, 2:
compq, 3:
select, 4:
n, 5:
t, 6:
ldt, 7:
q, 8:
ldq, 9:
w, 10:
m, 11:
s, 12:
sep, 13:
work, 14:
lwork, 15:
info.
It is possible that
info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.
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.
Further Comments
The real analogue of this function is
nag_lapack_dtrsen (f08qg).
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
Example in
nag_lapack_zunghr (f08nt).
Open in the MATLAB editor:
f08qu_example
function f08qu_example
fprintf('f08qu example results\n\n');
ilo = int64(1);
ihi = int64(4);
a = [ -3.97 - 5.04i, -4.11 + 3.70i, -0.34 + 1.01i, 1.29 - 0.86i;
0.34 - 1.50i, 1.52 - 0.43i, 1.88 - 5.38i, 3.36 + 0.65i;
3.31 - 3.85i, 2.50 + 3.45i, 0.88 - 1.08i, 0.64 - 1.48i;
-1.10 + 0.82i, 1.81 - 1.59i, 3.25 + 1.33i, 1.57 - 3.44i];
[H, tau, info] = f08ns( ...
ilo, ihi, a);
[Q, info] = f08nt( ...
ilo, ihi, H, tau);
job = 'Schur form';
compz = 'Vectors';
[T, w, Z, info] = f08ps( ...
job, compz, ilo, ihi, H, Q);
job = 'Both';
compq = 'Vectors';
select = [true; false; false; true];
[T, Q, w, m, s, sep, info] = f08qu( ...
job, compq, select, T, Z);
disp('selected eigenvalues:');
disp(w(1:m));
fprintf('Condition number estimate for selected eigenvalues = %7.4f\n',1/s);
fprintf('Condition number estimate for specified subspace = %7.4f\n',1/sep);
f08qu example results
selected eigenvalues:
-6.0004 - 6.9998i
3.0023 - 3.9998i
Condition number estimate for selected eigenvalues = 1.0196
Condition number estimate for specified subspace = 0.1822
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015