NAG Library Routine Document
F08JKF (DSTEIN)
1 Purpose
F08JKF (DSTEIN) computes the eigenvectors of a real symmetric tridiagonal matrix corresponding to specified eigenvalues, by inverse iteration.
2 Specification
SUBROUTINE F08JKF ( 
N, D, E, M, W, IBLOCK, ISPLIT, Z, LDZ, WORK, IWORK, IFAILV, INFO) 
INTEGER 
N, M, IBLOCK(*), ISPLIT(*), LDZ, IWORK(N), IFAILV(M), INFO 
REAL (KIND=nag_wp) 
D(*), E(*), W(*), Z(LDZ,*), WORK(5*N) 

The routine may be called by its
LAPACK
name dstein.
3 Description
F08JKF (DSTEIN) computes the eigenvectors of a real symmetric tridiagonal matrix
$T$ 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
F08JJF (DSTEBZ) with
${\mathbf{ORDER}}=\text{'B'}$, but may also be used when the eigenvalues have been computed by other routines in
Chapters F02 or
F08.
If
$T$ has been formed by reduction of a full real symmetric matrix
$A$ to tridiagonal form, then eigenvectors of
$T$ may be transformed to eigenvectors of
$A$ by a call to
F08FGF (DORMTR) or
F08GGF (DOPMTR).
F08JJF (DSTEBZ) determines whether the matrix
$T$ splits into block diagonal form:
and passes details of the block structure to this routine in the arrays
IBLOCK and
ISPLIT. This routine can then take advantage of the block structure by performing inverse iteration on each block
${T}_{i}$ separately, which is more efficient than using the whole matrix.
4 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
5 Arguments
 1: $\mathrm{N}$ – INTEGERInput

On entry: $n$, the order of the matrix $T$.
Constraint:
${\mathbf{N}}\ge 0$.
 2: $\mathrm{D}\left(*\right)$ – REAL (KIND=nag_wp) arrayInput

Note: the dimension of the array
D
must be at least
$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: the diagonal elements of the tridiagonal matrix $T$.
 3: $\mathrm{E}\left(*\right)$ – REAL (KIND=nag_wp) arrayInput

Note: the dimension of the array
E
must be at least
$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}1\right)$.
On entry: the offdiagonal elements of the tridiagonal matrix $T$.
 4: $\mathrm{M}$ – INTEGERInput

On entry: $m$, the number of eigenvectors to be returned.
Constraint:
$0\le {\mathbf{M}}\le {\mathbf{N}}$.
 5: $\mathrm{W}\left(*\right)$ – REAL (KIND=nag_wp) arrayInput

Note: the dimension of the array
W
must be at least
$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: the eigenvalues of the tridiagonal matrix
$T$ stored in
${\mathbf{W}}\left(1\right)$ to
${\mathbf{W}}\left(m\right)$, as returned by
F08JJF (DSTEBZ) with
${\mathbf{ORDER}}=\text{'B'}$. Eigenvalues associated with the first submatrix must be supplied first, in nondecreasing order; then those associated with the second submatrix, again in nondecreasing order; and so on.
Constraint:
if ${\mathbf{IBLOCK}}\left(\mathit{i}\right)={\mathbf{IBLOCK}}\left(\mathit{i}+1\right)$, ${\mathbf{W}}\left(\mathit{i}\right)\le {\mathbf{W}}\left(\mathit{i}+1\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{M}}1$.
 6: $\mathrm{IBLOCK}\left(*\right)$ – INTEGER arrayInput

Note: the dimension of the array
IBLOCK
must be at least
$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: the first
$m$ elements must contain the submatrix indices associated with the specified eigenvalues, as returned by
F08JJF (DSTEBZ) with
${\mathbf{ORDER}}=\text{'B'}$. If the eigenvalues were not computed by
F08JJF (DSTEBZ) with
${\mathbf{ORDER}}=\text{'B'}$, set
${\mathbf{IBLOCK}}\left(\mathit{i}\right)$ to
$1$, for
$\mathit{i}=1,2,\dots ,m$.
Constraint:
${\mathbf{IBLOCK}}\left(\mathit{i}\right)\le {\mathbf{IBLOCK}}\left(\mathit{i}+1\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{M}}1$.
 7: $\mathrm{ISPLIT}\left(*\right)$ – INTEGER arrayInput

Note: the dimension of the array
ISPLIT
must be at least
$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
On entry: the points at which
$T$ breaks up into submatrices, as returned by
F08JJF (DSTEBZ) with
${\mathbf{ORDER}}=\text{'B'}$. If the eigenvalues were not computed by
F08JJF (DSTEBZ) with
${\mathbf{ORDER}}=\text{'B'}$, set
${\mathbf{ISPLIT}}\left(1\right)$ to
N.
 8: $\mathrm{Z}\left({\mathbf{LDZ}},*\right)$ – REAL (KIND=nag_wp) arrayOutput

Note: the second dimension of the array
Z
must be at least
$\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{M}}\right)$.
On exit: the
$m$ eigenvectors, stored as columns of
$Z$; the
$i$th column corresponds to the
$i$th specified eigenvalue, unless
${\mathbf{INFO}}>{\mathbf{0}}$ (in which case see
Section 6).
 9: $\mathrm{LDZ}$ – INTEGERInput

On entry: the first dimension of the array
Z as declared in the (sub)program from which F08JKF (DSTEIN) is called.
Constraint:
${\mathbf{LDZ}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{N}}\right)$.
 10: $\mathrm{WORK}\left(5\times {\mathbf{N}}\right)$ – REAL (KIND=nag_wp) arrayWorkspace

 11: $\mathrm{IWORK}\left({\mathbf{N}}\right)$ – INTEGER arrayWorkspace

 12: $\mathrm{IFAILV}\left({\mathbf{M}}\right)$ – INTEGER arrayOutput

On exit: if
${\mathbf{INFO}}=i>0$, the first
$i$ 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
$0$.
 13: $\mathrm{INFO}$ – INTEGEROutput
On exit:
${\mathbf{INFO}}=0$ unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
 ${\mathbf{INFO}}<0$

If ${\mathbf{INFO}}=i$, argument $i$ had an illegal value. An explanatory message is output, and execution of the program is terminated.
 ${\mathbf{INFO}}>0$

If
${\mathbf{INFO}}=i$, then
$i$ 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.
7 Accuracy
Each computed eigenvector
${z}_{i}$ is the exact eigenvector of a nearby matrix
$A+{E}_{i}$, such that
where
$\epsilon $ is the
machine precision. Hence the residual is small:
However, a set of eigenvectors computed by this routine may not be orthogonal to so high a degree of accuracy as those computed by
F08JEF (DSTEQR).
8 Parallelism and Performance
F08JKF (DSTEIN) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
F08JKF (DSTEIN) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementationspecific information.
The complex analogue of this routine is
F08JXF (ZSTEIN).
10 Example
See
Section 10 in F08FGF (DORMTR).