PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_eigen_real_gen_quad (f02jc)
Purpose
nag_eigen_real_gen_quad (f02jc) solves the quadratic eigenvalue problem
where
,
and
are real
by
matrices.
The function returns the
eigenvalues,
, for
, and can optionally return the corresponding right eigenvectors,
and/or left eigenvectors,
as well as estimates of the condition numbers of the computed eigenvalues and backward errors of the computed right and left eigenvectors. A left eigenvector satisfies the equation
where
is the complex conjugate transpose of
.
is represented as the pair , such that . Note that the computation of may overflow and indeed may be zero.
Syntax
[
a,
b,
c,
alphar,
alphai,
beta,
vl,
vr,
s,
bevl,
bevr,
iwarn,
ifail] = f02jc(
scal,
jobvl,
jobvr,
sense,
tol,
a,
b,
c, 'n',
n)
[
a,
b,
c,
alphar,
alphai,
beta,
vl,
vr,
s,
bevl,
bevr,
iwarn,
ifail] = nag_eigen_real_gen_quad(
scal,
jobvl,
jobvr,
sense,
tol,
a,
b,
c, 'n',
n)
Description
The quadratic eigenvalue problem is solved by linearizing the problem and solving the resulting by generalized eigenvalue problem. The linearization is chosen to have favourable conditioning and backward stability properties. An initial preprocessing step is performed that reveals and deflates the zero and infinite eigenvalues contributed by singular leading and trailing matrices.
The algorithm is backward stable for problems that are not too heavily damped, that is .
Further details on the algorithm are given in
Hammarling et al. (2013).
References
Fan H -Y, Lin W.-W and Van Dooren P. (2004) Normwise scaling of second order polynomial matrices. SIAM J. Matrix Anal. Appl. 26, 1 252–256
Gaubert S and Sharify M (2009) Tropical scaling of polynomial matrices Lecture Notes in Control and Information Sciences Series 389 291–303 Springer–Verlag
Hammarling S, Munro C J and Tisseur F (2013) An algorithm for the complete solution of quadratic eigenvalue problems.
ACM Trans. Math. Software. 39(3):18:1–18:119
(http://eprints.ma.man.ac.uk/1815/)
Parameters
Compulsory Input Parameters
- 1:
– int64int32nag_int scalar
-
Determines the form of scaling to be performed on
,
and
.
- No scaling.
- (the recommended value)
- Fan, Lin and Van Dooren scaling if and no scaling otherwise where is the Frobenius norm of .
- Fan, Lin and Van Dooren scaling.
- Tropical scaling with largest root.
- Tropical scaling with smallest root.
Constraint:
, , , or .
- 2:
– string (length ≥ 1)
-
If
, do not compute left eigenvectors.
If , compute the left eigenvectors.
If
,
,
,
,
or
,
jobvl must be set to 'V'.
Constraint:
or .
- 3:
– string (length ≥ 1)
-
If
, do not compute right eigenvectors.
If , compute the right eigenvectors.
If
,
,
,
,
or
,
jobvr must be set to 'V'.
Constraint:
or .
- 4:
– int64int32nag_int scalar
-
Determines whether, or not, condition numbers and backward errors are computed.
- Do not compute condition numbers, or backward errors.
- Just compute condition numbers for the eigenvalues.
- Just compute backward errors for the left eigenpairs.
- Just compute backward errors for the right eigenpairs.
- Compute backward errors for the left and right eigenpairs.
- Compute condition numbers for the eigenvalues and backward errors for the left eigenpairs.
- Compute condition numbers for the eigenvalues and backward errors for the right eigenpairs.
- Compute condition numbers for the eigenvalues and backward errors for the left and right eigenpairs.
Constraint:
, , , , , , or .
- 5:
– double scalar
-
tol is used as the tolerance for making decisions on rank in the deflation procedure. If
tol is zero on entry then
is used in place of
tol, where
is the Frobenius norm of the (scaled) matrix
and
machine precision is as returned by function
nag_machine_precision (x02aj). If
tol is
on entry then no deflation is attempted. The recommended value for
tol is zero.
- 6:
– 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 .
- 7:
– 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 by matrix .
- 8:
– double array
-
The first dimension of the array
c must be at least
.
The second dimension of the array
c must be at least
.
The by matrix .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the second dimension of the arrays
a,
b,
c and the first dimension of the arrays
a,
b,
c. (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
.
a is used as internal workspace, but if
or
, then
a is restored on exit.
- 2:
– double array
-
The first dimension of the array
b will be
.
The second dimension of the array
b will be
.
b is used as internal workspace, but is restored on exit.
- 3:
– double array
-
The first dimension of the array
c will be
.
The second dimension of the array
c will be
.
c is used as internal workspace, but if
or
,
c is restored on exit.
- 4:
– double array
-
, for , contains the real part of for the th eigenvalue pair of the quadratic eigenvalue problem.
- 5:
– double array
-
, for , contains the imaginary part of for the th eigenvalue pair of the quadratic eigenvalue problem. If is zero then the th eigenvalue is real; if is positive then the th and th eigenvalues are a complex conjugate pair, with negative.
- 6:
– double array
-
, for , contains the second part of the th eigenvalue pair of the quadratic eigenvalue problem, with . Infinite eigenvalues have set to zero.
- 7:
– double array
-
The first dimension of the array
vl will be
.
The second dimension of the array
vl will be
if
.
If
, the left eigenvectors
are stored one after another in the columns of
vl, in the same order as the corresponding eigenvalues. If the
th eigenvalue is real, then
, the
th column of
vl. If the
th and
th eigenvalues form a complex conjugate pair, then
and
. Each eigenvector will be normalized with length unity and with the element of largest modulus real and positive.
If
,
vl is not referenced.
- 8:
– double array
-
The first dimension of the array
vr will be
.
The second dimension of the array
vr will be
if
.
If
, the right eigenvectors
are stored one after another in the columns of
vr, in the same order as the corresponding eigenvalues. If the
th eigenvalue is real, then
, the
th column of
vr. If the
th and
th eigenvalues form a complex conjugate pair, then
and
. Each eigenvector will be normalized with length unity and with the element of largest modulus real and positive.
If
,
vr is not referenced.
- 9:
– double array
-
The dimension of the array
s will be
if
,
,
or
Note: also: computing the condition numbers of the eigenvalues requires that both the left and right eigenvectors be computed.
If
,
,
or
,
contains the condition number estimate for the
th eigenvalue (large condition numbers imply that the problem is near one with multiple eigenvalues). Infinite condition numbers are returned as the largest model double number (
nag_machine_real_largest (x02al)).
If
,
,
or
,
s is not referenced.
- 10:
– double array
-
The dimension of the array
bevl will be
if
,
,
or
If
,
,
or
,
contains the backward error estimate for the computed left eigenpair
.
If
,
,
or
,
bevl is not referenced.
- 11:
– double array
-
The dimension of the array
bevr will be
if
,
,
or
If
,
,
or
,
contains the backward error estimate for the computed right eigenpair
.
If
,
,
or
,
bevr is not referenced.
- 12:
– int64int32nag_int scalar
-
iwarn will be positive if there are warnings, otherwise
iwarn will be
.
If
then:
- if then one, or both, of the matrices and is zero. In this case no scaling is performed, even if ;
- if then the matrices and are singular, or nearly singular, so the problem is potentially ill-posed;
- if then both the conditions for and above, apply.
If
,
iwarn returns the value of
info from
nag_lapack_dgges (f08xa).
If
,
iwarn returns the value of
info from
nag_lapack_dggev (f08wa).
- 13:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Errors or warnings detected by the function:
-
-
The quadratic matrix polynomial is nonregular (singular).
-
-
The
iteration failed in
nag_lapack_dgges (f08xa).
iwarn returns the value of
info returned by
nag_lapack_dgges (f08xa). This failure is unlikely to happen, but if it does, please contact
NAG.
-
-
The
iteration failed in
nag_lapack_dggev (f08wa).
iwarn returns the value of
info returned by
nag_lapack_dggev (f08wa). This failure is unlikely to happen, but if it does, please contact
NAG.
-
-
Constraint: , , , or .
-
-
Constraint: when , or ,
when , , , , , or .
On entry, .
Constraint: or .
-
-
Constraint: when , or ,
when , , , , , or .
On entry, .
Constraint: or .
-
-
Constraint: , , , , , , or .
-
-
Constraint: .
-
-
Constraint: .
-
-
Constraint: .
-
-
Constraint: .
-
-
Constraint: when , .
-
-
Constraint: when , .
-
An unexpected error has been triggered by this routine. Please
contact
NAG.
-
Your licence key may have expired or may not have been installed correctly.
-
Dynamic memory allocation failed.
Accuracy
The algorithm is backward stable for problems that are not too heavily damped, that is .
Further Comments
None.
Example
To solve the quadratic eigenvalue problem
where
The example also returns the left eigenvectors, condition numbers for the computed eigenvalues and backward errors of the computed right and left eigenpairs.
Open in the MATLAB editor:
f02jc_example
function f02jc_example
fprintf('f02jc example results\n\n');
a = [ 1 2 2;
3 1 1;
3 2 1];
b = [ 3 2 1;
2 1 3;
1 3 2];
c = [ 1 1 2;
2 3 1;
3 1 2];
scal = int64(1);
sense = int64(7);
tol = 0;
[a, b, c, alphar, alphai, beta, vl, vr, s, bevl, bevr, iwarn, ifail] = ...
f02jc(...
scal, 'V', 'V', sense, tol, a, b, c);
eigv = complex(alphar+alphai*i)./beta;
disp('Eigenvalues:');
disp(eigv);
[ifail] = x04ca('General', ' ', vr, 'Right eigenvectors:');
disp(' ');
[ifail] = x04ca('General', ' ', vl, 'Left eigenvectors:');
disp(' ');
disp('Eigenvalue condition numbers:');
disp(s);
fprintf('\nMaximum backward errors for eigenvalues and\n');
fprintf('%30s eigenvectors: %7.2e\n', 'right', max(bevr));
fprintf('%30s eigenvectors: %7.2e\n', 'left', max(bevl));
f02jc example results
Eigenvalues:
-3.8513 + 0.0000i
-0.5922 + 0.8028i
-0.5922 - 0.8028i
0.5233 + 0.6225i
0.5233 - 0.6225i
0.7891 + 0.0000i
Right eigenvectors:
1 2 3 4 5 6
1 -0.2108 0.3751 -0.1877 -0.6593 0.0424 -0.3478
2 0.7695 0.5020 -0.2433 0.0302 0.0197 0.8277
3 -0.6028 0.7162 0.0000 0.7498 0.0000 -0.4405
Left eigenvectors:
1 2 3 4 5 6
1 0.1052 0.7816 0.0000 0.8079 0.0000 0.0358
2 0.7381 0.5075 -0.1352 -0.1124 -0.0314 0.7072
3 -0.6664 0.3202 -0.1038 -0.5704 0.0913 -0.7061
Eigenvalue condition numbers:
2.3092
0.7027
0.7027
2.7013
2.7013
2.0144
Maximum backward errors for eigenvalues and
right eigenvectors: 4.85e-16
left eigenvectors: 5.18e-16
PDF version (NAG web site
, 64-bit version,
64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015