nag_real_symm_general_eigensystem (f02aec) calculates all the eigenvalues and eigenvectors of , where is a real symmetric matrix and is a real symmetric positive definite matrix.
The problem is reduced to the standard symmetric eigenproblem using Cholesky's method to decompose into triangular matrices , where is lower triangular. Then implies ; hence the eigenvalues of are those of , where is the symmetric matrix . Householder's method is used to tridiagonalise the matrix and the eigenvalues are found using the algorithm. An eigenvector of the derived problem is related to an eigenvector of the original problem by . The eigenvectors are determined using the algorithm and are normalized so that ; the eigenvectors of the original problem are then determined by solving , and are normalized so that .
4 References
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag
5 Arguments
1:
n – IntegerInput
On entry: , the order of the matrices and .
Constraint:
.
2:
a[] – doubleInput/Output
Note: the th element of the matrix is stored in .
On entry: the upper triangle of the by symmetric matrix . The elements of the array below the diagonal need not be set.
On exit: the lower triangle of the array is overwritten. The rest of the array is unchanged. See also Section 9
3:
tda – IntegerInput
On entry: the stride separating matrix column elements in the array a.
Constraint:
.
4:
b[] – doubleInput/Output
Note: the th element of the matrix is stored in .
On entry: the upper triangle of the by symmetric positive definite matrix . The elements of the array below the diagonal need not be set.
On exit: the elements below the diagonal are overwritten. The rest of the array is unchanged.
5:
tdb – IntegerInput
On entry: the stride separating matrix column elements in the array b.
On exit: the normalized eigenvectors, stored by columns; the th column corresponds to the th eigenvalue. The eigenvectors are normalized so that . See also Section 9
8:
tdv – IntegerInput
On entry: the stride separating matrix column elements in the array v.
Constraint:
.
9:
fail – NagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).
6 Error Indicators and Warnings
NE_2_INT_ARG_LT
On entry, while . These arguments must satisfy .
On entry, while . These arguments must satisfy .
On entry, while . These arguments must satisfy .
NE_ALLOC_FAIL
Dynamic memory allocation failed.
NE_INT_ARG_LT
On entry, .
Constraint: .
NE_NOT_POS_DEF
The matrix is not positive definite, possibly due to rounding errors.
NE_TOO_MANY_ITERATIONS
More than iterations are required to isolate all the eigenvalues.
7 Accuracy
In general this function is very accurate. However, if is ill-conditioned with respect to inversion, the eigenvectors could be inaccurately determined. For a detailed error analysis see pages 310, 222 and 235 of Wilkinson and Reinsch (1971).
8 Parallelism and Performance
Not applicable.
9 Further Comments
The time taken by nag_real_symm_general_eigensystem (f02aec) is approximately proportional to .
The function may be called with the same actual array supplied for arguments a and v, in which case the eigenvectors will overwrite the original matrix .
10 Example
To calculate all the eigenvalues and eigenvectors of the general symmetric eigenproblem where is the symmetric matrix