NAG Library Routine Document

f08sef (dsygst)

1
Purpose

f08sef (dsygst) reduces a real symmetric-definite generalized eigenproblem Az=λBz, ABz=λz or BAz=λz to the standard form Cy=λy, where A is a real symmetric matrix and B has been factorized by f07fdf (dpotrf).

2
Specification

Fortran Interface
Subroutine f08sef ( itype, uplo, n, a, lda, b, ldb, info)
Integer, Intent (In):: itype, n, lda, ldb
Integer, Intent (Out):: info
Real (Kind=nag_wp), Intent (In):: b(ldb,*)
Real (Kind=nag_wp), Intent (Inout):: a(lda,*)
Character (1), Intent (In):: uplo
C Header Interface
#include <nagmk26.h>
void  f08sef_ (const Integer *itype, const char *uplo, const Integer *n, double a[], const Integer *lda, const double b[], const Integer *ldb, Integer *info, const Charlen length_uplo)
The routine may be called by its LAPACK name dsygst.

3
Description

To reduce the real symmetric-definite generalized eigenproblem Az=λBz, ABz=λz or BAz=λz to the standard form Cy=λy, f08sef (dsygst) must be preceded by a call to f07fdf (dpotrf) which computes the Cholesky factorization of B; B must be positive definite.
The different problem types are specified by the argument itype, as indicated in the table below. The table shows how C is computed by the routine, and also how the eigenvectors z of the original problem can be recovered from the eigenvectors of the standard form.
itype Problem uplo B C z
1 Az=λBz 'U'
'L'
UTU 
LLT
U-TAU-1 
L-1AL-T
U-1y 
L-Ty
2 ABz=λz 'U'
'L'
UTU 
LLT
UAUT 
LTAL
U-1y 
L-Ty
3 BAz=λz 'U'
'L'
UTU 
LLT
UAUT 
LTAL
UTy 
Ly

4
References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

5
Arguments

1:     itype – IntegerInput
On entry: indicates how the standard form is computed.
itype=1
  • if uplo='U', C=U-TAU-1;
  • if uplo='L', C=L-1AL-T.
itype=2 or 3
  • if uplo='U', C=UAUT;
  • if uplo='L', C=LTAL.
Constraint: itype=1, 2 or 3.
2:     uplo – Character(1)Input
On entry: indicates whether the upper or lower triangular part of A is stored and how B has been factorized.
uplo='U'
The upper triangular part of A is stored and B=UTU.
uplo='L'
The lower triangular part of A is stored and B=LLT.
Constraint: uplo='U' or 'L'.
3:     n – IntegerInput
On entry: n, the order of the matrices A and B.
Constraint: n0.
4:     alda* – Real (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array a must be at least max1,n.
On entry: the n by n symmetric matrix A.
  • If uplo='U', the upper triangular part of A must be stored and the elements of the array below the diagonal are not referenced.
  • If uplo='L', the lower triangular part of A must be stored and the elements of the array above the diagonal are not referenced.
On exit: the upper or lower triangle of a is overwritten by the corresponding upper or lower triangle of C as specified by itype and uplo.
5:     lda – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f08sef (dsygst) is called.
Constraint: ldamax1,n.
6:     bldb* – Real (Kind=nag_wp) arrayInput
Note: the second dimension of the array b must be at least max1,n.
On entry: the Cholesky factor of B as specified by uplo and returned by f07fdf (dpotrf).
7:     ldb – IntegerInput
On entry: the first dimension of the array b as declared in the (sub)program from which f08sef (dsygst) is called.
Constraint: ldbmax1,n.
8:     info – IntegerOutput
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

Forming the reduced matrix C is a stable procedure. However it involves implicit multiplication by B-1 (if itype=1) or B (if itype=2 or 3). When f08sef (dsygst) is used as a step in the computation of eigenvalues and eigenvectors of the original problem, there may be a significant loss of accuracy if B is ill-conditioned with respect to inversion. See the document for f08saf (dsygv) for further details.

8
Parallelism and Performance

f08sef (dsygst) 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 n3.
The complex analogue of this routine is f08ssf (zhegst).

10
Example

This example computes all the eigenvalues of Az=λBz, where
A = 0.24 0.39 0.42 -0.16 0.39 -0.11 0.79 0.63 0.42 0.79 -0.25 0.48 -0.16 0.63 0.48 -0.03   and   B= 4.16 -3.12 0.56 -0.10 -3.12 5.03 -0.83 1.09 0.56 -0.83 0.76 0.34 -0.10 1.09 0.34 1.18 .  
Here B is symmetric positive definite and must first be factorized by f07fdf (dpotrf). The program calls f08sef (dsygst) to reduce the problem to the standard form Cy=λy; then f08fef (dsytrd) to reduce C to tridiagonal form, and f08jff (dsterf) to compute the eigenvalues.

10.1
Program Text

Program Text (f08sefe.f90)

10.2
Program Data

Program Data (f08sefe.d)

10.3
Program Results

Program Results (f08sefe.r)