PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_dtgsen (f08yg)
Purpose
nag_lapack_dtgsen (f08yg) reorders the generalized Schur factorization of a matrix pair in real generalized Schur form, so that a selected cluster of eigenvalues appears in the leading elements, or blocks on the diagonal of the generalized Schur form. The function also, optionally, computes the reciprocal condition numbers of the cluster of eigenvalues and/or corresponding deflating subspaces.
Syntax
[
a,
b,
alphar,
alphai,
beta,
q,
z,
m,
pl,
pr,
dif,
info] = f08yg(
ijob,
wantq,
wantz,
select,
a,
b,
q,
z, 'n',
n)
[
a,
b,
alphar,
alphai,
beta,
q,
z,
m,
pl,
pr,
dif,
info] = nag_lapack_dtgsen(
ijob,
wantq,
wantz,
select,
a,
b,
q,
z, 'n',
n)
Description
nag_lapack_dtgsen (f08yg) factorizes the generalized real
by
matrix pair
in real generalized Schur form, using an orthogonal equivalence transformation as
where
are also in real generalized Schur form and have the selected eigenvalues as the leading diagonal elements, or diagonal blocks. The leading columns of
and
are the generalized Schur vectors corresponding to the selected eigenvalues and form orthonormal subspaces for the left and right eigenspaces (deflating subspaces) of the pair
.
The pair
are in real generalized Schur form if
is block upper triangular with
by
and
by
diagonal blocks and
is upper triangular as returned, for example, by
nag_lapack_dgges (f08xa), or
nag_lapack_dhgeqz (f08xe) with
. The diagonal elements, or blocks, define the generalized eigenvalues
, for
, of the pair
. The eigenvalues are given by
but are returned as the pair
in order to avoid possible overflow in computing
. Optionally, the function returns reciprocals of condition number estimates for the selected eigenvalue cluster,
and
, the right and left projection norms, and of deflating subspaces,
and
. For more information see Sections 2.4.8 and 4.11 of
Anderson et al. (1999).
If
and
are the result of a generalized Schur factorization of a matrix pair
then, optionally, the matrices
and
can be updated as
and
. Note that the condition numbers of the pair
are the same as those of the pair
.
References
Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999)
LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia
http://www.netlib.org/lapack/lug
Parameters
Compulsory Input Parameters
- 1:
– int64int32nag_int scalar
-
Specifies whether condition numbers are required for the cluster of eigenvalues (
and
) or the deflating subspaces (
and
).
- Only reorder with respect to select. No extras.
- Reciprocal of norms of ‘projections’ onto left and right eigenspaces with respect to the selected cluster ( and ).
- The upper bounds on and . -norm-based estimate ().
- Estimate of and . -norm-based estimate (). About five times as expensive as .
- Compute pl, pr and dif as in , and . Economic version to get it all.
- Compute pl, pr and dif as in , and .
Constraint:
.
- 2:
– logical scalar
-
If
, update the left transformation matrix
.
If , do not update .
- 3:
– logical scalar
-
If
, update the right transformation matrix
.
If , do not update .
- 4:
– logical array
-
Specifies the eigenvalues in the selected cluster. To select a real eigenvalue
,
must be set to
true.
To select a complex conjugate pair of eigenvalues and , corresponding to a by diagonal block, either or or both must be set to true; a complex conjugate pair of eigenvalues must be either both included in the cluster or both excluded.
- 5:
– double array
-
The first dimension of the array
a must be at least
.
The second dimension of the array
a must be at least
.
The matrix in the pair .
- 6:
– double array
-
The first dimension of the array
b must be at least
.
The second dimension of the array
b must be at least
.
The matrix , in the pair .
- 7:
– double array
-
The first dimension,
, of the array
q must satisfy
- if , ;
- otherwise .
The second dimension of the array
q must be at least
if
, and at least
otherwise.
If , the by matrix .
- 8:
– double array
-
The first dimension,
, of the array
z must satisfy
- if , ;
- otherwise .
The second dimension of the array
z must be at least
if
, and at least
otherwise.
If , the by matrix .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the dimension of the array
select and the first dimension of the arrays
a,
b and the second dimension of the arrays
a,
b. (An error is raised if these dimensions are not equal.)
, the order of the matrices and .
Constraint:
.
Output Parameters
- 1:
– double array
-
The first dimension of the array
a will be
.
The second dimension of the array
a will be
.
The updated matrix .
- 2:
– double array
-
The first dimension of the array
b will be
.
The second dimension of the array
b will be
.
The updated matrix
- 3:
– double array
-
See the description of
beta.
- 4:
– double array
-
See the description of
beta.
- 5:
– double array
-
and
are the real and imaginary parts respectively of the
th eigenvalue, for
.
If is zero, then the th eigenvalue is real; if positive then is negative, and the th and st eigenvalues are a complex conjugate pair.
Conjugate pairs of eigenvalues correspond to the
by
diagonal blocks of
. These
by
blocks can be reduced by applying complex unitary transformations to
to obtain the complex Schur form
, where
is triangular (and complex). In this form
and
beta are the diagonals of
and
respectively.
- 6:
– double array
-
The first dimension,
, of the array
q will be
- if , ;
- otherwise .
The second dimension of the array
q will be
if
and
otherwise.
If
, the updated matrix
.
If
,
q is not referenced.
- 7:
– double array
-
The first dimension,
, of the array
z will be
- if , ;
- otherwise .
The second dimension of the array
z will be
if
and
otherwise.
If
, the updated matrix
.
If
,
z is not referenced.
- 8:
– int64int32nag_int scalar
-
The dimension of the specified pair of left and right eigenspaces (deflating subspaces).
- 9:
– double scalar
- 10:
– double scalar
-
If
,
or
,
pl and
pr are lower bounds on the reciprocal of the norm of ‘projections’
and
onto left and right eigenspaces with respect to the selected cluster.
,
.
If or , .
If
,
or
,
pl and
pr are not referenced.
- 11:
– double array
-
The dimension of the array
dif will be
If
,
store the estimates of
and
.
If or , are -norm-based upper bounds on and .
If or , are -norm-based estimates of and .
If or , .
If
or
,
dif is not referenced.
- 12:
– 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:
ijob, 2:
wantq, 3:
wantz, 4:
select, 5:
n, 6:
a, 7:
lda, 8:
b, 9:
ldb, 10:
alphar, 11:
alphai, 12:
beta, 13:
q, 14:
ldq, 15:
z, 16:
ldz, 17:
m, 18:
pl, 19:
pr, 20:
dif, 21:
work, 22:
lwork, 23:
iwork, 24:
liwork, 25:
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.
-
-
Reordering of
failed because the transformed matrix pair
would be too far from generalized Schur form; the problem is very ill-conditioned.
may have been partially reordered. If requested,
is returned in
,
pl and
pr.
Accuracy
The computed generalized Schur form is nearly the exact generalized Schur form for nearby matrices
and
, where
and
is the
machine precision. See Section 4.11 of
Anderson et al. (1999) for further details of error bounds for the generalized nonsymmetric eigenproblem, and for information on the condition numbers returned.
Further Comments
The complex analogue of this function is
nag_lapack_ztgsen (f08yu).
Example
This example reorders the generalized Schur factors
and
and update the matrices
and
given by
selecting the first and fourth generalized eigenvalues to be moved to the leading positions. Bases for the left and right deflating subspaces, and estimates of the condition numbers for the eigenvalues and Frobenius norm based bounds on the condition numbers for the deflating subspaces are also output.
Open in the MATLAB editor:
f08yg_example
function f08yg_example
fprintf('f08yg example results\n\n');
n = 4;
S = [4, 1, 1, 2;
0, 3, 4, 1;
0, 1, 3, 1;
0, 0, 0, 6];
T = [2, 1, 1, 3;
0, 1, 2, 1;
0, 0, 1, 1;
0, 0, 0, 2];
wantq = true;
wantz = true;
Q = eye(n);
Z = Q;
select = [true; false; false; true];
ijob = int64(4);
[S, T, alphar, alphai, beta, Q, Z, m, pl, pr, dif, info] = ...
f08yg( ...
ijob, wantq, wantz, select, S, T, Q, Z);
fprintf('Number of selected eigenvalues = %4d\n\n', m);
eigs = alphar./beta + i*alphai./beta;
disp('Selected Generalized Eigenvalues')
disp(eigs(1:m));
fprintf('%s%s\n%10.2e\n', ...
'Norm estimate of projection onto left eigenspace ', ...
'for selected cluster', 1/pl);
fprintf('\n%s%s\n%10.2e\n', ...
'Norm estimate of projection onto right eigenspace ', ...
'for selected cluster', 1/pr);
fprintf('\nF-norm based upper bound on Difu\n%10.2e\n', dif(1));
fprintf('\nF-norm based upper bound on Difl\n%10.2e\n', dif(2));
f08yg example results
Number of selected eigenvalues = 2
Selected Generalized Eigenvalues
2.0000
3.0000
Norm estimate of projection onto left eigenspace for selected cluster
2.69e+00
Norm estimate of projection onto right eigenspace for selected cluster
1.50e+00
F-norm based upper bound on Difu
2.52e-01
F-norm based upper bound on Difl
2.45e-01
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015