PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_dtgsna (f08yl)
Purpose
nag_lapack_dtgsna (f08yl) estimates condition numbers for specified eigenvalues and/or eigenvectors of a matrix pair in generalized real Schur form.
Syntax
[
s,
dif,
m,
info] = f08yl(
job,
howmny,
select,
a,
b,
vl,
vr,
mm, 'n',
n)
[
s,
dif,
m,
info] = nag_lapack_dtgsna(
job,
howmny,
select,
a,
b,
vl,
vr,
mm, 'n',
n)
Description
nag_lapack_dtgsna (f08yl) estimates condition numbers for specified eigenvalues and/or right eigenvectors of an by matrix pair in real generalized Schur form. The function actually returns estimates of the reciprocals of the condition numbers in order to avoid possible overflow.
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_dggesx (f08xb), or
nag_lapack_dhgeqz (f08xe) with
. The diagonal elements, or blocks, define the generalized eigenvalues
, for
, of the pair
and the eigenvalues are given by
so that
where
is the corresponding (right) eigenvector.
If
and
are the result of a generalized Schur factorization of a matrix pair
then the eigenvalues and condition numbers of the pair
are the same as those of the pair
.
Let
be a simple generalized eigenvalue of
. Then the reciprocal of the condition number of the eigenvalue
is defined as
where
and
are the right and left eigenvectors of
corresponding to
. If both
and
are zero, then
is singular and
is returned.
The definition of the reciprocal of the estimated condition number of the right eigenvector and the left eigenvector corresponding to the simple eigenvalue depends upon whether is a real eigenvalue, or one of a complex conjugate pair.
If the eigenvalue
is real and
and
are orthogonal transformations such that
where
and
are
by
matrices, then the reciprocal condition number is given by
where
denotes the smallest singular value of the
by
matrix
and
is the Kronecker product.
If
is part of a complex conjugate pair and
and
are orthogonal transformations such that
where
and
are two by two matrices,
and
are
by
matrices, and
corresponds to the complex conjugate eigenvalue pair
,
, then there exist unitary matrices
and
such that
The eigenvalues are given by
and
. Then the Frobenius norm-based, estimated reciprocal condition number is bounded by
where
denotes the real part of
,
,
is the complex two by two matrix
and
is an upper bound on
; i.e., an upper bound on
, where
is the
by
matrix
See Sections 2.4.8 and 4.11 of
Anderson et al. (1999) and
Kågström and Poromaa (1996) for further details and information.
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
Kågström B and Poromaa P (1996) LAPACK-style algorithms and software for solving the generalized Sylvester equation and estimating the separation between regular matrix pairs ACM Trans. Math. Software 22 78–103
Parameters
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
Indicates whether condition numbers are required for eigenvalues and/or eigenvectors.
- Condition numbers for eigenvalues only are computed.
- Condition numbers for eigenvectors only are computed.
- Condition numbers for both eigenvalues and eigenvectors are computed.
Constraint:
, or .
- 2:
– string (length ≥ 1)
-
Indicates how many condition numbers are to be computed.
- Condition numbers for all eigenpairs are computed.
- Condition numbers for selected eigenpairs (as specified by select) are computed.
Constraint:
or .
- 3:
– logical array
-
The dimension of the array
select
must be at least
if
, and at least
otherwise
Specifies the eigenpairs for which condition numbers are to be computed if
. To select condition numbers for the eigenpair corresponding to the real eigenvalue
,
must be set
true. To select condition numbers corresponding to a complex conjugate pair of eigenvalues
and
,
and/or
must be set to
true.
If
,
select is not referenced.
- 4:
– 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 upper quasi-triangular matrix .
- 5:
– 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 upper triangular matrix .
- 6:
– double array
-
The first dimension,
, of the array
vl must satisfy
- if or , ;
- otherwise .
The second dimension of the array
vl must be at least
if
or
, and at least
otherwise.
If
or
,
vl must contain left eigenvectors of
, corresponding to the eigenpairs specified by
howmny and
select. The eigenvectors must be stored in consecutive columns of
vl, as returned by
nag_lapack_dggev (f08wa) or
nag_lapack_dtgevc (f08yk).
If
,
vl is not referenced.
- 7:
– double array
-
The first dimension,
, of the array
vr must satisfy
- if or , ;
- otherwise .
The second dimension of the array
vr must be at least
if
or
, and at least
otherwise.
If
or
,
vr must contain right eigenvectors of
, corresponding to the eigenpairs specified by
howmny and
select. The eigenvectors must be stored in consecutive columns of
vr, as returned by
nag_lapack_dggev (f08wa) or
nag_lapack_dtgevc (f08yk).
If
,
vr is not referenced.
- 8:
– int64int32nag_int scalar
-
The number of elements in the arrays
s and
dif.
Constraints:
- if , ;
- otherwise .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
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 matrix pair .
Constraint:
.
Output Parameters
- 1:
– double array
-
The dimension of the array
s will be
if
or
and
otherwise
If
or
, the reciprocal condition numbers of the selected eigenvalues, stored in consecutive elements of the array. For a complex conjugate pair of eigenvalues two consecutive elements of
s are set to the same value. Thus
,
, and the
th columns of
and
all correspond to the same eigenpair (but not in general the
th eigenpair, unless all eigenpairs are selected).
If
,
s is not referenced.
- 2:
– double array
-
The dimension of the array
dif will be
if
or
and
otherwise
If
or
, the estimated reciprocal condition numbers of the selected eigenvectors, stored in consecutive elements of the array. For a complex eigenvector two consecutive elements of
dif are set to the same value. If the eigenvalues cannot be reordered to compute
,
is set to
; this can only occur when the true value would be very small anyway.
If
,
dif is not referenced.
- 3:
– int64int32nag_int scalar
-
The number of elements of the arrays
s and
dif used to store the specified condition numbers; for each selected real eigenvalue one element is used, and for each selected complex conjugate pair of eigenvalues, two elements are used. If
,
m is set to
n.
- 4:
– 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:
howmny, 3:
select, 4:
n, 5:
a, 6:
lda, 7:
b, 8:
ldb, 9:
vl, 10:
ldvl, 11:
vr, 12:
ldvr, 13:
s, 14:
dif, 15:
mm, 16:
m, 17:
work, 18:
lwork, 19:
iwork, 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.
Accuracy
None.
Further Comments
An approximate asymptotic error bound on the chordal distance between the computed eigenvalue
and the corresponding exact eigenvalue
is
where
is the
machine precision.
An approximate asymptotic error bound for the right or left computed eigenvectors
or
corresponding to the right and left eigenvectors
and
is given by
The complex analogue of this function is
nag_lapack_ztgsna (f08yy).
Example
This example estimates condition numbers and approximate error estimates for all the eigenvalues and eigenvalues and right eigenvectors of the pair
given by
The eigenvalues and eigenvectors are computed by calling
nag_lapack_dtgevc (f08yk).
Open in the MATLAB editor:
f08yl_example
function f08yl_example
fprintf('f08yl example results\n\n');
n = int64(4);
S = [4, 1, 1, 2;
0, 3, -1, 1;
0, 1, 3, 1;
0, 0, 0, 6];
T = [2, 1, 1, 3;
0, 1, 0, 1;
0, 0, 1, 1;
0, 0, 0, 2];
job = 'Both';
howmny = 'All';
select = [false];
Q = eye(n);
Z = Q;
[VL, VR, m, info] = f08yk( ...
job, howmny, select, S, T, Q, Z, n);
[rconde, rcondv, m, info] = ...
f08yl ( ...
job, howmny, select, S, T, VL, VR, n);
disp('Reciprocal condition numbers for eigenvalues of (S,T)');
fprintf('%11.1e',rconde);
fprintf('\n\n');
disp('Reciprocal condition numbers for right eigenvectors of (S,T)');
fprintf('%11.1e',rcondv);
fprintf('\n\n');
snorm = norm(S,1);
tnorm = norm(T,1);
stnorm = sqrt(snorm^2 + tnorm^2);
disp('Approximate error estimates for eigenvalues of (S,T)')
erre = x02aj*stnorm./rconde;
fprintf('%11.1e',erre);
fprintf('\n\n');
disp('Approximate error estimates for right eigenvectors of (S,T)')
errv = x02aj*stnorm./rcondv;
fprintf('%11.1e',errv);
fprintf('\n');
f08yl example results
Reciprocal condition numbers for eigenvalues of (S,T)
1.6e+00 1.7e+00 1.7e+00 1.4e+00
Reciprocal condition numbers for right eigenvectors of (S,T)
5.4e-01 1.5e-01 1.5e-01 1.2e-01
Approximate error estimates for eigenvalues of (S,T)
8.7e-16 7.8e-16 7.8e-16 9.9e-16
Approximate error estimates for right eigenvectors of (S,T)
2.5e-15 9.0e-15 9.0e-15 1.1e-14
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015