|
NAG[f08jec] NAG[nag_dsteqr] - All eigenvalues and eigenvectors of real symmetric tridiagonal matrix, reduced from real symmetric matrix using implicit or
|
|
Calling Sequence
f08jec(compz, d, e, 'n'=n, 'z'=z, 'fail'=fail)
nag_dsteqr(. . .)
Parameters
|
compz - String;
|
|
|
On entry: indicates whether the eigenvectors are to be computed.
|
|
Only the eigenvalues are computed (and the array z is not referenced).
|
|
The eigenvalues and eigenvectors of are computed (and the array z is initialized by the function).
|
|
Constraint: "Nag_NotZ", "Nag_UpdateZ" or "Nag_InitZ". .
|
|
|
d - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array d must be at least .
|
|
On entry: the diagonal elements of the tridiagonal matrix .
|
|
|
e - Vector(1..dim, datatype=float[8]);
|
|
|
Note: the dimension, dim, of the array e must be at least .
|
|
On entry: the off-diagonal elements of the tridiagonal matrix .
|
|
On exit: the array is overwritten.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array d.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'z'=z - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order); (optional)
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
z is not changed if .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dsteqr (f08jec) computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix, or of a real symmetric matrix which has been reduced to tridiagonal form.
|
|
Description
|
|
nag_dsteqr (f08jec) computes all the eigenvalues and, optionally, all the eigenvectors of a real symmetric tridiagonal matrix . In other words, it can compute the spectral factorization of as
where is a diagonal matrix whose diagonal elements are the eigenvalues , and is the orthogonal matrix whose columns are the eigenvectors . Thus
The function may also be used to compute all the eigenvalues and eigenvectors of a real symmetric matrix which has been reduced to tridiagonal form :
In this case, the matrix must be formed explicitly and passed to nag_dsteqr (f08jec), which must be called with . The functions which must be called to perform the reduction to tridiagonal form and form are:
nag_dsteqr (f08jec) uses the implicitly shifted algorithm, switching between the and variants in order to handle graded matrices effectively (see Greenbaum and Dongarra (1980)). The eigenvectors are normalized so that , but are determined only to within a factor .
If only the eigenvalues of are required, it is more efficient to call f08jfc (nag_dsterf) instead. If is positive-definite, small eigenvalues can be computed more accurately by f08jgc (nag_dpteqr).
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_CONVERGENCE"
The algorithm has failed to find all the eigenvalues after a total of iterations; off-diagonal elements have not converged to zero. The arguments d and e contain the diagonal and off-diagonal elements, respectively, of a tridiagonal matrix orthogonally similar to .
"NE_INT"
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
|
|
Accuracy
|
|
The computed eigenvalues and eigenvectors are exact for a nearby matrix , where
and is the machine precision.
If is an exact eigenvalue and is the corresponding computed value, then
where is a modestly increasing function of .
If is the corresponding exact eigenvector, and is the corresponding computed eigenvector, then the angle between them is bounded as follows:
Thus the accuracy of a computed eigenvector depends on the gap between its eigenvalue and all the other eigenvalues.
|
|
|
Examples
|
|
>
|
compz := "Nag_InitZ":
n := 4:
d := Vector([-6.99, 7.92, 2.34, 0.32], datatype=float[8]):
e := Vector([-0.44, -2.63, -1.18], datatype=float[8]):
z := Matrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]], datatype=float[8]):
NAG:-f08jec(compz, d, e, 'n' = n, 'z' = z):
|
|
|
See Also
|
|
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Greenbaum A and Dongarra J J (1980) Experiments with QR/QL methods for the symmetric triangular eigenproblem LAPACK Working Note No. 17 (Technical Report CS-89-92) University of Tennessee, Knoxville
Parlett B N (1998) The Symmetric Eigenvalue Problem SIAM, Philadelphia
f08 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|