NAG FL Interface
f08hef (dsbtrd)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f08hef reduces a real symmetric band matrix to tridiagonal form.

2 Specification

Fortran Interface
Subroutine f08hef ( vect, uplo, n, kd, ab, ldab, d, e, q, ldq, work, info)
Integer, Intent (In) :: n, kd, ldab, ldq
Integer, Intent (Out) :: info
Real (Kind=nag_wp), Intent (Inout) :: ab(ldab,*), e(*), q(ldq,*)
Real (Kind=nag_wp), Intent (Out) :: d(n), work(n)
Character (1), Intent (In) :: vect, uplo
C Header Interface
#include <nag.h>
void  f08hef_ (const char *vect, const char *uplo, const Integer *n, const Integer *kd, double ab[], const Integer *ldab, double d[], double e[], double q[], const Integer *ldq, double work[], Integer *info, const Charlen length_vect, const Charlen length_uplo)
The routine may be called by the names f08hef, nagf_lapackeig_dsbtrd or its LAPACK name dsbtrd.

3 Description

f08hef reduces a symmetric band matrix A to symmetric tridiagonal form T by an orthogonal similarity transformation:
T = QT A Q .  
The orthogonal matrix Q 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 Arguments

1: vect Character(1) Input
On entry: indicates whether Q is to be returned.
vect='V'
Q is returned.
vect='U'
Q is updated (and the array q must contain a matrix on entry).
vect='N'
Q is not required.
Constraint: vect='V', 'U' or 'N'.
2: uplo Character(1) Input
On entry: indicates whether the upper or lower triangular part of A is stored.
uplo='U'
The upper triangular part of A is stored.
uplo='L'
The lower triangular part of A is stored.
Constraint: uplo='U' or 'L'.
3: n Integer Input
On entry: n, the order of the matrix A.
Constraint: n0.
4: kd Integer Input
On entry: if uplo='U', the number of superdiagonals, kd, of the matrix A.
If uplo='L', the number of subdiagonals, kd, of the matrix A.
Constraint: kd0.
5: ab(ldab,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array ab must be at least max(1,n).
On entry: the upper or lower triangle of the n×n symmetric band matrix A.
The matrix is stored in rows 1 to kd+1, more precisely,
  • if uplo='U', the elements of the upper triangle of A within the band must be stored with element Aij in ab(kd+1+i-j,j)​ for ​max(1,j-kd)ij;
  • if uplo='L', the elements of the lower triangle of A within the band must be stored with element Aij in ab(1+i-j,j)​ for ​jimin(n,j+kd).
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 T are returned in ab using the same storage format as described above.
6: ldab Integer Input
On entry: the first dimension of the array ab as declared in the (sub)program from which f08hef is called.
Constraint: ldab max(1,kd+1) .
7: d(n) Real (Kind=nag_wp) array Output
On exit: the diagonal elements of the tridiagonal matrix T.
8: e(*) Real (Kind=nag_wp) array Output
Note: the dimension of the array e must be at least max(1,n-1).
On exit: the off-diagonal elements of the tridiagonal matrix T.
9: q(ldq,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array q must be at least max(1,n) if vect='V' or 'U' and at least 1 if vect='N'.
On entry: if vect='U', 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 vect='V' or 'U', the n×n matrix Q.
If vect='N', q is not referenced.
10: ldq Integer Input
On entry: the first dimension of the array q as declared in the (sub)program from which f08hef is called.
Constraints:
  • if vect='V' or 'U', ldq max(1,n) ;
  • if vect='N', ldq1.
11: work(n) Real (Kind=nag_wp) array Workspace
12: info Integer Output
On exit: info=0 unless the routine detects an error (see Section 6).

6 Error Indicators and Warnings

info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.

7 Accuracy

The computed tridiagonal matrix T is exactly similar to a nearby matrix (A+E), where
E2 c (n) ε A2 ,  
c(n) is a modestly increasing function of n, and ε is the machine precision.
The elements of T themselves may be sensitive to small perturbations in A or to rounding errors in the computation, but this does not affect the stability of the eigenvalues and eigenvectors.
The computed matrix Q differs from an exactly orthogonal matrix by a matrix E such that
E2 = O(ε) ,  
where ε is the machine precision.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f08hef is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08hef 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 implementation-specific information.

9 Further Comments

The total number of floating-point operations is approximately 6n2k if vect='N' with 3n3(k-1)/k additional operations if vect='V'.
The complex analogue of this routine is f08hsf.

10 Example

This example computes all the eigenvalues and eigenvectors of the matrix A, where
A = ( 4.99 0.04 0.22 0.00 0.04 1.05 -0.79 1.04 0.22 -0.79 -2.31 -1.30 0.00 1.04 -1.30 -0.43 ) .  
Here A is symmetric and is treated as a band matrix. The program first calls f08hef to reduce A to tridiagonal form T, and to form the orthogonal matrix Q; the results are then passed to f08jef which computes the eigenvalues and eigenvectors of A.

10.1 Program Text

Program Text (f08hefe.f90)

10.2 Program Data

Program Data (f08hefe.d)

10.3 Program Results

Program Results (f08hefe.r)