PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_zgges (f08xn)
Purpose
nag_lapack_zgges (f08xn) computes the generalized eigenvalues, the generalized Schur form and, optionally, the left and/or right generalized Schur vectors for a pair of by complex nonsymmetric matrices .
Syntax
[
a,
b,
sdim,
alpha,
beta,
vsl,
vsr,
info] = f08xn(
jobvsl,
jobvsr,
sort,
selctg,
a,
b, 'n',
n)
[
a,
b,
sdim,
alpha,
beta,
vsl,
vsr,
info] = nag_lapack_zgges(
jobvsl,
jobvsr,
sort,
selctg,
a,
b, 'n',
n)
Description
The generalized Schur factorization for a pair of complex matrices
is given by
where
and
are unitary,
and
are upper triangular. The generalized eigenvalues,
, of
are computed from the diagonals of
and
and satisfy
where
is the corresponding generalized eigenvector.
is actually returned as the pair
such that
since
, or even both
and
can be zero. The columns of
and
are the left and right generalized Schur vectors of
.
Optionally, nag_lapack_zgges (f08xn) can order the generalized eigenvalues on the diagonals of so that selected eigenvalues are at the top left. The leading columns of and then form an orthonormal basis for the corresponding eigenspaces, the deflating subspaces.
nag_lapack_zgges (f08xn) computes to have real non-negative diagonal entries. The generalized Schur factorization, before reordering, is computed by the algorithm.
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
, do not compute the left Schur vectors.
If , compute the left Schur vectors.
Constraint:
or .
- 2:
– string (length ≥ 1)
-
If
, do not compute the right Schur vectors.
If , compute the right Schur vectors.
Constraint:
or .
- 3:
– string (length ≥ 1)
-
Specifies whether or not to order the eigenvalues on the diagonal of the generalized Schur form.
- Eigenvalues are not ordered.
- Eigenvalues are ordered (see selctg).
Constraint:
or .
- 4:
– function handle or string containing name of m-file
-
If
,
selctg is used to select generalized eigenvalues to the top left of the generalized Schur form.
If
,
selctg is not referenced by
nag_lapack_zgges (f08xn), and may be called with the string
'f08xnz'.
[result] = selctg(a, b)
Input Parameters
- 1:
– complex scalar
- 2:
– complex scalar
-
An eigenvalue
is selected if
is
true.
Note that in the ill-conditioned case, a selected generalized eigenvalue may no longer satisfy after ordering. in this case.
Output Parameters
- 1:
– logical scalar
-
for selected eigenvalues.
- 5:
– complex array
-
The first dimension of the array
a must be at least
.
The second dimension of the array
a must be at least
.
The first of the pair of matrices, .
- 6:
– complex array
-
The first dimension of the array
b must be at least
.
The second dimension of the array
b must be at least
.
The second of the pair of matrices, .
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.
, the order of the matrices and .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The first dimension of the array
a will be
.
The second dimension of the array
a will be
.
a stores its generalized Schur form
.
- 2:
– complex array
-
The first dimension of the array
b will be
.
The second dimension of the array
b will be
.
b stores its generalized Schur form
.
- 3:
– int64int32nag_int scalar
-
If
,
.
If
,
number of eigenvalues (after sorting) for which
selctg is
true.
- 4:
– complex array
-
See the description of
beta.
- 5:
– complex array
-
, for
, will be the generalized eigenvalues.
, for
and
, for
, are the diagonals of the complex Schur form
output by
nag_lapack_zgges (f08xn). The
will be non-negative real.
Note: the quotients
may easily overflow or underflow, and
may even be zero. Thus, you should avoid naively computing the ratio
. However,
alpha will always be less than and usually comparable with
in magnitude, and
beta will always be less than and usually comparable with
.
- 6:
– complex array
-
The first dimension,
, of the array
vsl will be
- if , ;
- otherwise .
The second dimension of the array
vsl will be
if
and
otherwise.
If
,
vsl will contain the left Schur vectors,
.
If
,
vsl is not referenced.
- 7:
– complex array
-
The first dimension,
, of the array
vsr will be
- if , ;
- otherwise .
The second dimension of the array
vsr will be
if
and
otherwise.
If
,
vsr will contain the right Schur vectors,
.
If
,
vsr 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:
jobvsl, 2:
jobvsr, 3:
sort, 4:
selctg, 5:
n, 6:
a, 7:
lda, 8:
b, 9:
ldb, 10:
sdim, 11:
alpha, 12:
beta, 13:
vsl, 14:
ldvsl, 15:
vsr, 16:
ldvsr, 17:
work, 18:
lwork, 19:
rwork, 20:
bwork, 21:
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.
- W
-
The iteration failed. are not in Schur form, but and should be correct for .
-
-
Unexpected error returned from
nag_lapack_zhgeqz (f08xs).
- W
-
After reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the generalized Schur form no longer satisfy . This could also be caused by underflow due to scaling.
- W
-
The eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned).
Accuracy
The computed generalized Schur factorization satisfies
where
and
is the
machine precision. See Section 4.11 of
Anderson et al. (1999) for further details.
Further Comments
The total number of floating-point operations is proportional to .
The real analogue of this function is
nag_lapack_dgges (f08xa).
Example
This example finds the generalized Schur factorization of the matrix pair
, where
and
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:
f08xn_example
function f08xn_example
fprintf('f08xn example results\n\n');
A = [ -21.10 - 22.50i, 53.5 - 50.5i, -34.5 + 127.5i, 7.5 + 0.5i;
-0.46 - 7.78i, -3.5 - 37.5i, -15.5 + 58.5i, -10.5 - 1.5i;
4.30 - 5.50i, 39.7 - 17.1i, -68.5 + 12.5i, -7.5 - 3.5i;
5.50 + 4.40i, 14.4 + 43.3i, -32.5 - 46i, -19.0 - 32.5i];
B = [ 1 - 5i, 1.6 + 1.2i, -3 + 0i, 0 - 1i;
0.8 - 0.6i, 3.0 - 5.0i, -4 + 3i, -2.4 - 3.2i;
1 + 0i, 2.4 + 1.8i, -4 - 5i, 0 - 3i;
0 + 1i, -1.8 + 2.4i, 0 - 4i, 4 - 5i];
jobvsl = 'Vectors (left)';
jobvsr = 'Vectors (right)';
sortp = 'No sort';
[S, T, sdim, alpha, beta, VSL, VSR, info] = ...
f08xn( ...
jobvsl, jobvsr, sortp, @selctg, A, B);
disp('Generalized eigenvalues')
eigs = alpha./beta;
disp(sort(eigs));
f08xn example results
Generalized eigenvalues
3.0000 - 1.0000i
2.0000 - 5.0000i
4.0000 - 5.0000i
3.0000 - 9.0000i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015