|
NAG[f08jsc] NAG[nag_zsteqr] - All eigenvalues and eigenvectors of real symmetric tridiagonal matrix, reduced from complex Hermitian matrix, using implicit or
|
|
Calling Sequence
f08jsc(compz, d, e, z, 'n'=n, 'fail'=fail)
nag_zsteqr(. . .)
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.
|
|
|
z - Matrix(1..dim1, 1..dim2, datatype=complex[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
On entry: if , z must contain the unitary matrix from the reduction to tridiagonal form.
|
|
If , z need not be set.
|
|
If , z is not referenced.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array d.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_zsteqr (f08jsc) computes all the eigenvalues and, optionally, all the eigenvectors of a complex Hermitian matrix which has been reduced to tridiagonal form.
|
|
Description
|
|
nag_zsteqr (f08jsc) 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 stores the real orthogonal matrix in a complex array, so that it may also be used to compute all the eigenvalues and eigenvectors of a complex Hermitian matrix which has been reduced to tridiagonal form :
In this case, the matrix must be formed explicitly and passed to nag_zsteqr (f08jsc), which must be called with . The functions which must be called to perform the reduction to tridiagonal form and form are:
nag_zsteqr (f08jsc) 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 complex factor of absolute value 1.
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 f08juc (nag_zpteqr).
|
|
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. In this case, d and e contain the diagonal and off-diagonal elements, respectively, of a tridiagonal matrix orthogonally similar to . off-diagonal elements have not converged to zero.
"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_UpdateZ":
n := 4:
d := Vector([-2.28, -0.1284569816493291, -0.1665932537524081, -1.924949764598262], datatype=float[8]):
d_orig := copy(d):
e := Vector([-4.33845594653213, -2.022594578622617, -1.802322978338736], datatype=float[8]):
e_orig := copy(e):
z := Matrix([[1 +0*I , 0 +0*I , 0 +0*I , 0 +0*I ], [0 +0*I , -0.4102842167667538 -0.4679084045148932*I , 0.06892965664061015 +0.1779918861910116*I , 0.658292153470164 +0.3780841414574354*I ], [0 +0*I , -0.5209226572431817 +0.02304967509925584*I , -0.2575502363844264 -0.7356001925994045*I , -0.231282326855171 +0.2591852914789428*I ], [0 +0*I , 0.027659610119107 +0.5831567800111723*I , 0.5955581080629657 -0.03792575895192868*I , 0.06573064825393168 +0.546548053242859*I ]], datatype=complex[8]):
z_orig := copy(z):
NAG:-f08jsc(compz, d, e, z, 'n' = n):
|
|
|
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.
|
|