PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_dgeesx (f08pb)
Purpose
nag_lapack_dgeesx (f08pb) computes the eigenvalues, the real Schur form , and, optionally, the matrix of Schur vectors for an by real nonsymmetric matrix .
Syntax
[
a,
sdim,
wr,
wi,
vs,
rconde,
rcondv,
info] = f08pb(
jobvs,
sort,
select,
sense,
a, 'n',
n)
[
a,
sdim,
wr,
wi,
vs,
rconde,
rcondv,
info] = nag_lapack_dgeesx(
jobvs,
sort,
select,
sense,
a, 'n',
n)
Description
The real Schur factorization of
is given by
where
, the matrix of Schur vectors, is orthogonal and
is the real Schur form. A matrix is in real Schur form if it is upper quasi-triangular with
by
and
by
blocks.
by
blocks will be standardized in the form
where
. The eigenvalues of such a block are
.
Optionally,
nag_lapack_dgeesx (f08pb) also orders the eigenvalues on the diagonal of the real Schur form so that selected eigenvalues are at the top left; computes a reciprocal condition number for the average of the selected eigenvalues (
rconde); and computes a reciprocal condition number for the right invariant subspace corresponding to the selected eigenvalues (
rcondv). The leading columns of
form an orthonormal basis for this invariant subspace.
For further explanation of the reciprocal condition numbers
rconde and
rcondv, see Section 4.8 of
Anderson et al. (1999) (where these quantities are called
and
respectively).
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
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)
-
If
, Schur vectors are not computed.
If , Schur vectors are computed.
Constraint:
or .
- 2:
– string (length ≥ 1)
-
Specifies whether or not to order the eigenvalues on the diagonal of the Schur form.
- Eigenvalues are not ordered.
- Eigenvalues are ordered (see select).
Constraint:
or .
- 3:
– function handle or string containing name of m-file
-
If
,
select is used to select eigenvalues to sort to the top left of the Schur form.
If
,
select is not referenced and
nag_lapack_dgeesx (f08pb) may be called with the string
'f08paz'.
An eigenvalue
is selected if
is
true. If either one of a complex conjugate pair of eigenvalues is selected, then both are. Note that a selected complex eigenvalue may no longer satisfy
after ordering, since ordering may change the value of complex eigenvalues (especially if the eigenvalue is ill-conditioned); in this case
info is set to
(see
info below).
[result] = select(wr, wi)
Input Parameters
- 1:
– double scalar
- 2:
– double scalar
-
The real and imaginary parts of the eigenvalue.
Output Parameters
- 1:
– logical scalar
-
for selected eigenvalues.
- 4:
– string (length ≥ 1)
-
Determines which reciprocal condition numbers are computed.
- None are computed.
- Computed for average of selected eigenvalues only.
- Computed for selected right invariant subspace only.
- Computed for both.
If , or , .
Constraint:
, , or .
- 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 by matrix .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the array
a and the second dimension of the array
a. (An error is raised if these dimensions are not equal.)
, the order of the matrix .
Constraint:
.
Output Parameters
- 1:
– double array
-
The first dimension of the array
a will be
.
The second dimension of the array
a will be
.
a stores its real Schur form
.
- 2:
– int64int32nag_int scalar
-
If
,
.
If
,
number of eigenvalues (after sorting) for which
select is
true. (Complex conjugate pairs for which
select is
true for either eigenvalue count as
.)
- 3:
– double array
-
The dimension of the array
wr will be
See the description of
wi.
- 4:
– double array
-
The dimension of the array
wi will be
wr and
wi contain the real and imaginary parts, respectively, of the computed eigenvalues in the same order that they appear on the diagonal of the output Schur form
. Complex conjugate pairs of eigenvalues will appear consecutively with the eigenvalue having the positive imaginary part first.
- 5:
– double array
-
The first dimension,
, of the array
vs will be
- if , ;
- otherwise .
The second dimension of the array
vs will be
if
and
otherwise.
If
,
vs contains the orthogonal matrix
of Schur vectors.
If
,
vs is not referenced.
- 6:
– double scalar
-
If
or
, contains the reciprocal condition number for the average of the selected eigenvalues.
If
or
,
rconde is not referenced.
- 7:
– double scalar
-
If
or
,
rcondv contains the reciprocal condition number for the selected right invariant subspace.
If
or
,
rcondv is not referenced.
- 8:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Cases prefixed with W are classified as warnings and
do not generate an error of type NAG:error_n. See nag_issue_warnings.
-
If , parameter had an illegal value on entry. The parameters are numbered as follows:
1:
jobvs, 2:
sort, 3:
select, 4:
sense, 5:
n, 6:
a, 7:
lda, 8:
sdim, 9:
wr, 10:
wi, 11:
vs, 12:
ldvs, 13:
rconde, 14:
rcondv, 15:
work, 16:
lwork, 17:
iwork, 18:
liwork, 19:
bwork, 20:
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.
-
-
If and , the algorithm failed to compute all the eigenvalues.
- W
-
The eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned).
- W
-
After reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfy . This could also be caused by underflow due to scaling.
Accuracy
The computed Schur factorization satisfies
where
and
is the
machine precision. See Section 4.8 of
Anderson et al. (1999) for further details.
Further Comments
The total number of floating-point operations is proportional to .
The complex analogue of this function is
nag_lapack_zgeesx (f08pp).
Example
This example finds the Schur factorization of the matrix
such that the real positive eigenvalues of
are the top left diagonal elements of the Schur form,
. Estimates of the condition numbers for the selected eigenvalue cluster and corresponding invariant subspace are also returned.
Note that the block size (NB) of assumed in this example is not realistic for such a small problem, but should be suitable for large problems.
Open in the MATLAB editor:
f08pb_example
function f08pb_example
fprintf('f08pb example results\n\n');
a = [ 0.35, 0.45, -0.14, -0.17;
0.09, 0.07, -0.54, 0.35;
-0.44, -0.33, -0.03, 0.17;
0.25, -0.32, -0.13, 0.11];
jobvs = 'Vectors (Schur)';
sortp = 'Sort';
select = @(wr, wi) (wr > 0 && wi == 0);
sense = 'Both reciprocal condition numbers';
[~, sdim, wr, wi, vs, rconde, rcondv, info] = ...
f08pb( ...
jobvs, sortp, select, sense, a);
fprintf('Number of eigenvalues for which SELECT is true = %3d\n',sdim);
fprintf(' (dimension of invariant subspace)\n\n');
disp('Selected eigenvalues');
disp(wr(1:sdim) + i*wi(1:sdim));
fprintf('%s\n%61s = %9.1e\n\n', ...
'Reciprocal of projection norm onto the invariant subspace', ...
'rconde', rconde);
fprintf('%s\n%61s = %9.1e\n\n', ...
'Reciprocal condition number for the invariant subspace', ...
'rcondv', rcondv);
anorm = norm(a);
erbde = x02aj*anorm/rconde;
erbdv = x02aj*anorm/rcondv;
fprintf('%-61s = %9.1e\n', ...
'Approximate asymptotic error bound for selected eigenvalues', erbde);
fprintf('%-61s = %9.1e\n', ...
'Approximate asymptotic error bound for the invariant subspace', ...
erbdv);
f08pb example results
Number of eigenvalues for which SELECT is true = 1
(dimension of invariant subspace)
Selected eigenvalues
0.7995
Reciprocal of projection norm onto the invariant subspace
rconde = 9.9e-01
Reciprocal condition number for the invariant subspace
rcondv = 8.2e-01
Approximate asymptotic error bound for selected eigenvalues = 9.3e-17
Approximate asymptotic error bound for the invariant subspace = 1.1e-16
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015