The function may be called by the names: f02ecc, nag_eigen_real_gen_eigsys or nag_real_eigensystem_sel.
3Description
f02ecc computes selected eigenvalues and the corresponding right eigenvectors of a real general matrix :
Eigenvalues may be selected either by modulus, satisfying:
or by real part, satisfying:
Note that even though is real, and may be complex. If is an eigenvector corresponding to a complex eigenvalue , then the complex conjugate vector is the eigenvector corresponding to the complex conjugate eigenvalue . The eigenvalues in a complex conjugate pair and are either both selected or both not selected.
4References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5Arguments
1: – Nag_Select_EigenvaluesInput
On entry: indicates the criterion for selecting eigenvalues:
if , then eigenvalues are selected according to their moduli: .
if , then eigenvalues are selected according to their real parts: .
Constraint:
or .
2: – IntegerInput
On entry: , the order of the matrix .
Constraint:
.
3: – doubleInput/Output
Note: the th element of the matrix is stored in .
On entry: the general matrix .
On exit: a contains the Hessenberg form of the balanced input matrix (see Section 9).
4: – IntegerInput
On entry: the stride separating matrix column elements in the array a.
Constraint:
.
5: – doubleInput
6: – doubleInput
On entry: and , the lower and upper bounds on the criterion for the selected eigenvalues.
Constraint:
.
7: – IntegerInput
On entry: mest must be an upper bound on , the number of eigenvalues and eigenvectors selected. No eigenvectors are computed if .
Constraint:
.
8: – Integer *Output
On exit: , the number of eigenvalues actually selected.
9: – ComplexOutput
On exit: the first m elements of w hold the values of the selected eigenvalues; elements from the index m to contain the other eigenvalues. Complex conjugate pairs of eigenvalues are stored in consecutive elements of the array, with the eigenvalue having the positive imaginary part first.
10: – ComplexOutput
Note: the th element of the matrix is stored in .
On exit: v contains the selected eigenvectors, with the th column holding the eigenvector associated with the eigenvalue (stored in ).
11: – IntegerInput
On entry: the stride separating matrix column elements in the array v.
Constraint:
.
12: – NagError *Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
Inverse iteration failed to compute all the specified eigenvectors. If an eigenvector failed to converge, the corresponding column of v is set to zero.
NE_INT_2
On entry, while .
Constraint: .
On entry, while .
Constraint: .
NE_INT_ARG_LT
On entry, .
Constraint: .
On entry, .
Constraint: .
NE_QR_FAIL
The QR algorithm failed to compute all the eigenvalues. No eigenvectors have been computed.
NE_REQD_EIGVAL
There are more than mest eigenvalues in the specified range. The actual number of eigenvalues in the range is returned in m. No eigenvectors have been computed.
Rerun with the second dimension of .
7Accuracy
If is an exact eigenvalue, and is the corresponding computed value, then
where is a modestly increasing function of , is the machine precision, and is the reciprocal condition number of ; is the balanced form of the original matrix , and .
If is the corresponding exact eigenvector, and is the corresponding computed eigenvector, then the angle between them is bounded as follows:
where is the reciprocal condition number of .
8Parallelism and Performance
Background information to multithreading can be found in the Multithreading documentation.
f02ecc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
9Further Comments
f02ecc first balances the matrix, using a diagonal similarity transformation to reduce its norm; and then reduces the balanced matrix to upper Hessenberg form , using an orthogonal similarity transformation: . The function uses the Hessenberg algorithm to compute all the eigenvalues of , which are the same as the eigenvalues of . It computes the eigenvectors of which correspond to the selected eigenvalues, using inverse iteration. It premultiplies the eigenvectors by to form the eigenvectors of ; and finally transforms the eigenvectors to those of the original matrix .
Each eigenvector (real or complex) is normalized so that , and the element of largest absolute value is real and positive.
The inverse iteration function may make a small perturbation to the real parts of close eigenvalues, and this may shift their moduli just outside the specified bounds. If you are relying on eigenvalues being within the bounds, you should test them on return from f02ecc.
The time taken by the function is approximately proportional to .
The function can be used to compute all eigenvalues and eigenvectors, by setting wl large and negative, and wu large and positive.
10Example
To compute those eigenvalues of the matrix whose moduli lie in the range , and their corresponding eigenvectors, where