nag_real_general_eigensystem (f02bjc) calculates all the eigenvalues and, if required, all the eigenvectors of the generalized eigenproblem where and are real, square matrices, using the algorithm.
All the eigenvalues and, if required, all the eigenvectors of the generalized eigenproblem
where
and
are real, square matrices, are determined using the
algorithm. The
algorithm consists of four stages:
(a) |
is reduced to upper Hessenberg form and at the same time is reduced to upper triangular form. |
(b) |
is further reduced to quasi-triangular form while the triangular form of is maintained. |
(c) |
The quasi-triangular form of is reduced to triangular form and the eigenvalues extracted. |
(d) |
This function does not actually produce the eigenvalues , but instead returns and such that
.
The division by becomes the responsibility of your program, since may be zero indicating an infinite eigenvalue. Pairs of complex eigenvalues occur with and complex conjugates, even though and are not conjugate.
|
(e) |
If the eigenvectors are required (), they are obtained from the triangular matrices and then transformed back into the original coordinate system. |
Moler C B and Stewart G W (1973) An algorithm for generalized matrix eigenproblems SIAM J. Numer. Anal. 10 241–256
- 1:
– IntegerInput
-
On entry: , the order of the matrices and .
Constraint:
.
- 2:
– doubleInput/Output
-
Note: the th element of the matrix is stored in .
On entry: the by matrix .
On exit:
a is overwritten.
- 3:
– IntegerInput
-
On entry: the stride separating matrix column elements in the array
a.
Constraint:
.
- 4:
– doubleInput/Output
-
Note: the th element of the matrix is stored in .
On entry: the by matrix .
On exit:
b is overwritten.
- 5:
– IntegerInput
-
On entry: the stride separating matrix column elements in the array
b.
Constraint:
.
- 6:
– doubleInput
-
On entry: the tolerance used to determine negligible elements.
- An element will be considered negligible if it is less than tol times the norm of its matrix.
- machine precision is used in place of tol.
A value of
tol greater than
machine precision may result in faster execution but less accurate results.
- 7:
– ComplexOutput
-
On exit: , for .
- 8:
– doubleOutput
-
On exit: , for .
- 9:
– Nag_BooleanInput
-
On entry:
wantv must be set to Nag_TRUE if the eigenvectors are required. If
wantv is set to Nag_FALSE then the array
v is not referenced.
- 10:
– doubleOutput
-
Note: the th element of the th vector is stored in .
On exit: if
, then
(i) |
if the th eigenvalue is real, the th column of v contains its eigenvector; |
(ii) |
if the th and th eigenvalues form a complex pair, the th and th columns of v contain the real and imaginary parts of the eigenvector associated with the first eigenvalue of the pair. The conjugate of this vector is the eigenvector for the conjugate eigenvalue. |
Each eigenvector is normalized so that the component of largest modulus is real and the sum of squares of the moduli equal one.
If
,
v is not referenced and may be
NULL.
- 11:
– IntegerInput
-
On entry: the stride separating matrix column elements in the array
v.
Constraint:
if ,
- 12:
– IntegerOutput
-
On exit: contains the number of iterations needed to obtain the th eigenvalue. Note that the eigenvalues are obtained in reverse order, starting with the th.
- 13:
– NagError *Input/Output
-
The NAG error argument (see
Section 3.6 in the Essential Introduction).
The computed eigenvalues are always exact for a problem
where
and
are both of the order of
,
tol being defined as in
Section 5 and
being the
machine precision.
Note: interpretation of results obtained with the
algorithm often requires a clear understanding of the effects of small changes in the original data. These effects are reviewed in
Wilkinson (1979), in relation to the significance of small values of
and
. It should be noted that if
and
are
both small for any
, it may be that no reliance can be placed on
any of the computed eigenvalues
. You are recommended to study
Wilkinson (1979) and, if in difficulty, to seek expert advice on determining the sensitivity of the eigenvalues to perturbations in the data.
Not applicable.
The time taken by nag_real_general_eigensystem (f02bjc) is approximately proportional to
and also depends on the value chosen for argument
tol.
To find all the eigenvalues and eigenvectors of
where