F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentF08JJF (DSTEBZ)

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

## 1  Purpose

F08JJF (DSTEBZ) computes some (or all) of the eigenvalues of a real symmetric tridiagonal matrix, by bisection.

## 2  Specification

 SUBROUTINE F08JJF ( RANGE, ORDER, N, VL, VU, IL, IU, ABSTOL, D, E, M, NSPLIT, W, IBLOCK, ISPLIT, WORK, IWORK, INFO)
 INTEGER N, IL, IU, M, NSPLIT, IBLOCK(N), ISPLIT(N), IWORK(3*N), INFO REAL (KIND=nag_wp) VL, VU, ABSTOL, D(*), E(*), W(N), WORK(4*N) CHARACTER(1) RANGE, ORDER
The routine may be called by its LAPACK name dstebz.

## 3  Description

F08JJF (DSTEBZ) uses bisection to compute some or all of the eigenvalues of a real symmetric tridiagonal matrix $T$.
It searches for zero or negligible off-diagonal elements of $T$ to see if the matrix splits into block diagonal form:
 $T = T1 T2 . . . Tp .$
It performs bisection on each of the blocks ${T}_{i}$ and returns the block index of each computed eigenvalue, so that a subsequent call to F08JKF (DSTEIN) to compute eigenvectors can also take advantage of the block structure.

## 4  References

Kahan W (1966) Accurate eigenvalues of a symmetric tridiagonal matrix Report CS41 Stanford University

## 5  Parameters

1:     RANGE – CHARACTER(1)Input
On entry: indicates which eigenvalues are required.
${\mathbf{RANGE}}=\text{'A'}$
All the eigenvalues are required.
${\mathbf{RANGE}}=\text{'V'}$
All the eigenvalues in the half-open interval (VL,VU] are required.
${\mathbf{RANGE}}=\text{'I'}$
Eigenvalues with indices IL to IU are required.
Constraint: ${\mathbf{RANGE}}=\text{'A'}$, $\text{'V'}$ or $\text{'I'}$.
2:     ORDER – CHARACTER(1)Input
On entry: indicates the order in which the eigenvalues and their block numbers are to be stored.
${\mathbf{ORDER}}=\text{'B'}$
The eigenvalues are to be grouped by split-off block and ordered from smallest to largest within each block.
${\mathbf{ORDER}}=\text{'E'}$
The eigenvalues for the entire matrix are to be ordered from smallest to largest.
Constraint: ${\mathbf{ORDER}}=\text{'B'}$ or $\text{'E'}$.
3:     N – INTEGERInput
On entry: $n$, the order of the matrix $T$.
Constraint: ${\mathbf{N}}\ge 0$.
4:     VL – REAL (KIND=nag_wp)Input
5:     VU – REAL (KIND=nag_wp)Input
On entry: if ${\mathbf{RANGE}}=\text{'V'}$, the lower and upper bounds, respectively, of the half-open interval
(VL,VU] within which the required eigenvalues lie.
If ${\mathbf{RANGE}}=\text{'A'}$ or $\text{'I'}$, VL is not referenced.
Constraint: if ${\mathbf{RANGE}}=\text{'V'}$, ${\mathbf{VL}}<{\mathbf{VU}}$.
6:     IL – INTEGERInput
7:     IU – INTEGERInput
On entry: if ${\mathbf{RANGE}}=\text{'I'}$, the indices of the first and last eigenvalues, respectively, to be computed (assuming that the eigenvalues are in ascending order).
If ${\mathbf{RANGE}}=\text{'A'}$ or $\text{'V'}$, IL is not referenced.
Constraint: if ${\mathbf{RANGE}}=\text{'I'}$, $1\le {\mathbf{IL}}\le {\mathbf{IU}}\le {\mathbf{N}}$.
8:     ABSTOL – REAL (KIND=nag_wp)Input
On entry: the absolute tolerance to which each eigenvalue is required. An eigenvalue (or cluster) is considered to have converged if it lies in an interval of width $\text{}\le {\mathbf{ABSTOL}}$. If ${\mathbf{ABSTOL}}\le 0.0$, then the tolerance is taken as .
9:     D($*$) – 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$.
10:   E($*$) – 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 off-diagonal elements of the tridiagonal matrix $T$.
11:   M – INTEGEROutput
On exit: $m$, the actual number of eigenvalues found.
12:   NSPLIT – INTEGEROutput
On exit: the number of diagonal blocks which constitute the tridiagonal matrix $T$.
13:   W(N) – REAL (KIND=nag_wp) arrayOutput
On exit: the required eigenvalues of the tridiagonal matrix $T$ stored in ${\mathbf{W}}\left(1\right)$ to ${\mathbf{W}}\left(m\right)$.
14:   IBLOCK(N) – INTEGER arrayOutput
On exit: at each row/column $j$ where ${\mathbf{E}}\left(j\right)$ is zero or negligible, $T$ is considered to split into a block diagonal matrix and ${\mathbf{IBLOCK}}\left(\mathit{i}\right)$ contains the block number of the eigenvalue stored in ${\mathbf{W}}\left(\mathit{i}\right)$, for $\mathit{i}=1,2,\dots ,m$. Note that ${\mathbf{IBLOCK}}\left(\mathit{i}\right)<0$ for some $i$ whenever ${\mathbf{INFO}}={\mathbf{1}}$ or ${\mathbf{3}}$ (see Section 6) and ${\mathbf{RANGE}}=\text{'A'}$ or $\text{'V'}$.
15:   ISPLIT(N) – INTEGER arrayOutput
On exit: the leading NSPLIT elements contain the points at which $T$ splits up into sub-matrices as follows. The first sub-matrix consists of rows/columns $1$ to ${\mathbf{ISPLIT}}\left(1\right)$, the second sub-matrix consists of rows/columns ${\mathbf{ISPLIT}}\left(1\right)+1$ to ${\mathbf{ISPLIT}}\left(2\right)$, $\dots$, and the NSPLIT(th) sub-matrix consists of rows/columns ${\mathbf{ISPLIT}}\left({\mathbf{NSPLIT}}-1\right)+1$ to ${\mathbf{ISPLIT}}\left({\mathbf{NSPLIT}}\right)$ ($\text{}=n$).
16:   WORK($4×{\mathbf{N}}$) – REAL (KIND=nag_wp) arrayWorkspace
17:   IWORK($3×{\mathbf{N}}$) – INTEGER arrayWorkspace
18:   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}}=1$
If ${\mathbf{RANGE}}=\text{'A'}$ or $\text{'V'}$, the algorithm failed to compute some (or all) of the required eigenvalues to the required accuracy. More precisely, ${\mathbf{IBLOCK}}\left(i\right)<0$ indicates that eigenvalue $i$ (stored in ${\mathbf{W}}\left(i\right)$) failed to converge.
${\mathbf{INFO}}=2$
If ${\mathbf{RANGE}}=\text{'I'}$, the algorithm failed to compute some (or all) of the required eigenvalues. Try calling the routine again with ${\mathbf{RANGE}}=\text{'A'}$.
${\mathbf{INFO}}=3$
If ${\mathbf{RANGE}}=\text{'I'}$, see the description above for ${\mathbf{INFO}}=2$.
If ${\mathbf{RANGE}}=\text{'A'}$ or $\text{'V'}$, see the description above for ${\mathbf{INFO}}=1$.
${\mathbf{INFO}}=4$
No eigenvalues have been computed. The floating point arithmetic on the computer is not behaving as expected.
If failures with ${\mathbf{INFO}}\ge 1$ are causing persistent trouble and you have checked that the routine is being called correctly, please contact NAG.

## 7  Accuracy

The eigenvalues of $T$ are computed to high relative accuracy which means that if they vary widely in magnitude, then any small eigenvalues will be computed more accurately than, for example, with the standard $QR$ method. However, the reduction to tridiagonal form (prior to calling the routine) may exclude the possibility of obtaining high relative accuracy in the small eigenvalues of the original matrix if its eigenvalues vary widely in magnitude.