Computes the eigenvectors corresponding to specified eigenvalues of a real symmetric tridiagonal matrix, using inverse iteration.

## Syntax

void sstein2 (MKL_INT *n , float *d , float *e , MKL_INT *m , float *w , MKL_INT *iblock , MKL_INT *isplit , float *orfac , float *z , MKL_INT *ldz , float *work , MKL_INT *iwork , MKL_INT *ifail , MKL_INT *info );

void dstein2 (MKL_INT *n , double *d , double *e , MKL_INT *m , double *w , MKL_INT *iblock , MKL_INT *isplit , double *orfac , double *z , MKL_INT *ldz , double *work , MKL_INT *iwork , MKL_INT *ifail , MKL_INT *info );

## Include Files

• mkl_scalapack.h

## Description

The ?stein2function is a modified LAPACK function ?stein. It computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, using inverse iteration.

The maximum number of iterations allowed for each eigenvector is specified by an internal parameter maxits (currently set to 5).

## Input Parameters

n

The order of the matrix T (n 0).

m

The number of eigenvectors to be found (0 m n).

d, e, w

Arrays:

d, of size n. The n diagonal elements of the tridiagonal matrix T.

e, of size n.

The (n-1) subdiagonal elements of the tridiagonal matrix T, in elements 1 to n-1. e[n-1] need not be set.

w, of size n.

The first m elements of w contain the eigenvalues for which eigenvectors are to be computed. The eigenvalues should be grouped by split-off block and ordered from smallest to largest within the block. (The output array w from ?stebz with ORDER = 'B' is expected here).

The size of w must be at least max(1, n).

iblock

Array of size n.

The submatrix indices associated with the corresponding eigenvalues in w;

iblock[i] = 1, if eigenvalue w[i] belongs to the first submatrix from the top,

iblock[i] = 2, if eigenvalue w[i] belongs to the second submatrix, etc. (The output array iblock from ?stebz is expected here).

isplit

Array of size n.

The splitting points, at which T breaks up into submatrices. The first submatrix consists of rows/columns 1 to isplit[0], the second submatrix consists of rows/columns isplit[0]+1 through isplit[1], etc. (The output array isplit from ?stebz is expected here).

orfac

orfac specifies which eigenvectors should be orthogonalized. Eigenvectors that correspond to eigenvalues which are within orfac*||T|| of each other are to be orthogonalized.

ldz

The leading dimension of the output array z; ldz max(1, n).

work

Workspace array of size 5n.

iwork

Workspace array of size n.

## Output Parameters

z

Array of size ldz * m.

The computed eigenvectors. The eigenvector associated with the eigenvalue w[i] is stored in the (i+1)-th column of the matrix Z represented by z, i=0, ..., m-1. Any vector that fails to converge is set to its current iterate after maxits iterations.

ifail

Array of size m.

On normal exit, all elements of ifail are zero. If one or more eigenvectors fail to converge after maxits iterations, then their indices are stored in the array ifail.

info

info = 0, the exit is successful.

info < 0: if info = -i, the i-th had an illegal value.

info > 0: if info = i, then i eigenvectors failed to converge in maxits iterations. Their indices are stored in the array ifail.