NAG Library Routine Document
F08HEF (DSBTRD)
1 Purpose
F08HEF (DSBTRD) reduces a real symmetric band matrix to tridiagonal form.
2 Specification
SUBROUTINE F08HEF ( |
VECT, UPLO, N, KD, AB, LDAB, D, E, Q, LDQ, WORK, INFO) |
INTEGER |
N, KD, LDAB, LDQ, INFO |
REAL (KIND=nag_wp) |
AB(LDAB,*), D(N), E(N-1), Q(LDQ,*), WORK(N) |
CHARACTER(1) |
VECT, UPLO |
|
The routine may be called by its
LAPACK
name dsbtrd.
3 Description
F08HEF (DSBTRD) reduces a symmetric band matrix
to symmetric tridiagonal form
by an orthogonal similarity transformation:
The orthogonal matrix is determined as a product of Givens rotation matrices, and may be formed explicitly by the routine if required.
The routine uses a vectorizable form of the reduction, due to
Kaufman (1984).
4 References
Kaufman L (1984) Banded eigenvalue solvers on vector machines ACM Trans. Math. Software 10 73–86
Parlett B N (1998) The Symmetric Eigenvalue Problem SIAM, Philadelphia
5 Parameters
- 1: VECT – CHARACTER(1)Input
On entry: indicates whether
is to be returned.
- is returned.
- is updated (and the array Q must contain a matrix on entry).
- is not required.
Constraint:
, or .
- 2: UPLO – CHARACTER(1)Input
On entry: indicates whether the upper or lower triangular part of
is stored.
- The upper triangular part of is stored.
- The lower triangular part of is stored.
Constraint:
or .
- 3: N – INTEGERInput
On entry: , the order of the matrix .
Constraint:
.
- 4: KD – INTEGERInput
On entry: if
, the number of superdiagonals,
, of the matrix
.
If , the number of subdiagonals, , of the matrix .
Constraint:
.
- 5: AB(LDAB,) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
AB
must be at least
.
On entry: the upper or lower triangle of the
by
symmetric band matrix
.
The matrix is stored in rows
to
, more precisely,
- if , the elements of the upper triangle of within the band must be stored with element in ;
- if , the elements of the lower triangle of within the band must be stored with element in
On exit:
AB is overwritten by values generated during the reduction to tridiagonal form.
The first superdiagonal or subdiagonal and the diagonal of the tridiagonal matrix
are returned in
AB using the same storage format as described above.
- 6: LDAB – INTEGERInput
On entry: the first dimension of the array
AB as declared in the (sub)program from which F08HEF (DSBTRD) is called.
Constraint:
.
- 7: D(N) – REAL (KIND=nag_wp) arrayOutput
On exit: the diagonal elements of the tridiagonal matrix .
- 8: E() – REAL (KIND=nag_wp) arrayOutput
On exit: the off-diagonal elements of the tridiagonal matrix .
- 9: Q(LDQ,) – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array
Q
must be at least
if
or
and at least
if
.
On entry: if
,
Q must contain the matrix formed in a previous stage of the reduction (for example, the reduction of a banded symmetric-definite generalized eigenproblem); otherwise
Q need not be set.
On exit: if
or
, the
by
matrix
.
If
,
Q is not referenced.
- 10: LDQ – INTEGERInput
On entry: the first dimension of the array
Q as declared in the (sub)program from which F08HEF (DSBTRD) is called.
Constraints:
- if or , ;
- if , .
- 11: WORK(N) – REAL (KIND=nag_wp) arrayWorkspace
- 12: INFO – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
Errors or warnings detected by the routine:
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
7 Accuracy
The computed tridiagonal matrix
is exactly similar to a nearby matrix
, where
is a modestly increasing function of
, and
is the
machine precision.
The elements of themselves may be sensitive to small perturbations in or to rounding errors in the computation, but this does not affect the stability of the eigenvalues and eigenvectors.
The computed matrix
differs from an exactly orthogonal matrix by a matrix
such that
where
is the
machine precision.
The total number of floating point operations is approximately if with additional operations if .
The complex analogue of this routine is
F08HSF (ZHBTRD).
9 Example
This example computes all the eigenvalues and eigenvectors of the matrix
, where
Here
is symmetric and is treated as a band matrix. The program first calls F08HEF (DSBTRD) to reduce
to tridiagonal form
, and to form the orthogonal matrix
; the results are then passed to
F08JEF (DSTEQR) which computes the eigenvalues and eigenvectors of
.
9.1 Program Text
Program Text (f08hefe.f90)
9.2 Program Data
Program Data (f08hefe.d)
9.3 Program Results
Program Results (f08hefe.r)