PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_zstein (f08jx)
Purpose
nag_lapack_zstein (f08jx) computes the eigenvectors of a real symmetric tridiagonal matrix corresponding to specified eigenvalues, by inverse iteration, storing the eigenvectors in a complex array.
Syntax
Description
nag_lapack_zstein (f08jx) computes the eigenvectors of a real symmetric tridiagonal matrix
corresponding to specified eigenvalues, by inverse iteration (see
Jessup and Ipsen (1992)). It is designed to be used in particular after the specified eigenvalues have been computed by
nag_lapack_dstebz (f08jj) with
, but may also be used when the eigenvalues have been computed by other functions in
Chapters F02 or
F08.
The eigenvectors of
are real, but are stored by this function in a complex array. If
has been formed by reduction of a full complex Hermitian matrix
to tridiagonal form, then eigenvectors of
may be transformed to (complex) eigenvectors of
by a call to
nag_lapack_zunmtr (f08fu) or
nag_lapack_zupmtr (f08gu).
nag_lapack_dstebz (f08jj) determines whether the matrix
splits into block diagonal form:
and passes details of the block structure to this function in the arrays
iblock and
isplit. This function can then take advantage of the block structure by performing inverse iteration on each block
separately, which is more efficient than using the whole matrix.
References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Jessup E and Ipsen I C F (1992) Improving the accuracy of inverse iteration SIAM J. Sci. Statist. Comput. 13 550–572
Parameters
Compulsory Input Parameters
- 1:
– double array
-
The dimension of the array
d
must be at least
The diagonal elements of the tridiagonal matrix .
- 2:
– double array
-
The dimension of the array
e
must be at least
The off-diagonal elements of the tridiagonal matrix .
- 3:
– int64int32nag_int scalar
-
, the number of eigenvectors to be returned.
Constraint:
.
- 4:
– double array
-
The dimension of the array
w
must be at least
The eigenvalues of the tridiagonal matrix
stored in
to
, as returned by
nag_lapack_dstebz (f08jj) with
. Eigenvalues associated with the first sub-matrix must be supplied first, in nondecreasing order; then those associated with the second sub-matrix, again in nondecreasing order; and so on.
Constraint:
if , , for .
- 5:
– int64int32nag_int array
-
The dimension of the array
iblock
must be at least
The first
elements must contain the sub-matrix indices associated with the specified eigenvalues, as returned by
nag_lapack_dstebz (f08jj) with
. If the eigenvalues were not computed by
nag_lapack_dstebz (f08jj) with
, set
to
, for
.
Constraint:
, for .
- 6:
– int64int32nag_int array
-
The dimension of the array
isplit
must be at least
The points at which
breaks up into sub-matrices, as returned by
nag_lapack_dstebz (f08jj) with
. If the eigenvalues were not computed by
nag_lapack_dstebz (f08jj) with
, set
to
n.
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the array
d and the second dimension of the array
d. (An error is raised if these dimensions are not equal.)
, the order of the matrix .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The first dimension of the array
z will be
.
The second dimension of the array
z will be
.
The
eigenvectors, stored as columns of
; the
th column corresponds to the
th specified eigenvalue, unless
(in which case see
Error Indicators and Warnings).
- 2:
– int64int32nag_int array
-
If
, the first
elements of
ifailv contain the indices of any eigenvectors which have failed to converge. The rest of the first
m elements of
ifailv are set to
.
- 3:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
Cases prefixed with W are classified as warnings and
do not generate an error of type NAG:error_n. See nag_issue_warnings.
-
If , parameter had an illegal value on entry. The parameters are numbered as follows:
1:
n, 2:
d, 3:
e, 4:
m, 5:
w, 6:
iblock, 7:
isplit, 8:
z, 9:
ldz, 10:
work, 11:
iwork, 12:
ifailv, 13:
info.
It is possible that
info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.
- W
-
If
, then
eigenvectors (as indicated by the argument
ifailv above) each failed to converge in five iterations. The current iterate after five iterations is stored in the corresponding column of
z.
Accuracy
Each computed eigenvector
is the exact eigenvector of a nearby matrix
, such that
where
is the
machine precision. Hence the residual is small:
However, a set of eigenvectors computed by this function may not be orthogonal to so high a degree of accuracy as those computed by
nag_lapack_zsteqr (f08js).
Further Comments
The real analogue of this function is
nag_lapack_dstein (f08jk).
Example
See
Example in
nag_lapack_zunmtr (f08fu).
Open in the MATLAB editor:
f08jx_example
function f08jx_example
fprintf('f08jx example results\n\n');
uplo = 'L';
a = [-2.28 + 0.00i, 0.00 + 0i, 0 + 0i, 0 + 0i;
1.78 + 2.03i, -1.12 + 0i, 0 + 0i, 0 + 0i;
2.26 - 0.10i, 0.01 - 0.43i, -0.37 + 0i, 0 + 0i;
-0.12 - 2.53i, -1.07 - 0.86i, 2.31 + 0.92i, -0.73 + 0i];
[aq, d, e, tau, info] = f08fs( ...
uplo, a);
range = 'Indices';
order = 'Block';
vl = 0;
vu = 0;
il = int64(1);
iu = int64(2);
abstol = 0;
[m, nsplit, w, iblock, isplit, info] = ...
f08jj( ...
range, order, vl, vu, il, iu, abstol, d, e);
[tz, ifailv, info] = f08jx( ...
d, e, m, w, iblock, isplit);
trans = 'No transpose';
side = 'Left';
[z, info] = f08fu( ...
side, uplo, trans, aq, tau, tz);
for i = 1:m
[~,k] = max(abs(real(z(:,i)))+abs(imag(z(:,i))));
z(:,i) = z(:,i)*conj(z(k,i))/abs(z(k,i));
end
disp(' Selected eigenvalues of A:');
disp(w(1:m));
disp(' Corresponding eigenvectors:');
disp(z);
f08jx example results
Selected eigenvalues of A:
-6.0002
-3.0030
Corresponding eigenvectors:
0.7299 + 0.0000i -0.2120 + 0.1497i
-0.1663 - 0.2061i 0.7307 + 0.0000i
-0.4165 - 0.1417i -0.3291 + 0.0479i
0.1743 + 0.4162i 0.5200 + 0.1329i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015