GVCSP

Computes all of the eigenvalues and eigenvectors of the generalized real symmetric eigenvalue problem Az = λBz, with B symmetric positive definite.

Required Arguments

A — Real symmetric matrix of order N. (Input)

B — Positive definite symmetric matrix of order N. (Input)

EVAL — Vector of length N containing the eigenvalues in decreasing order of magnitude. (Output)

EVEC — Matrix of order N. (Output)

The J-th eigenvector, corresponding to EVAL(J), is stored in the J-th column. Each vector is normalized to have Euclidean length equal to the value one.

The J-th eigenvector, corresponding to EVAL(J), is stored in the J-th column. Each vector is normalized to have Euclidean length equal to the value one.

Optional Arguments

N — Order of the matrices A and B. (Input)

Default: N = SIZE (A,2).

Default: N = SIZE (A,2).

LDA — Leading dimension of A exactly as specified in the dimension statement in the calling program. (Input)

Default: LDA = SIZE (A,1).

Default: LDA = SIZE (A,1).

LDB — Leading dimension of B exactly as specified in the dimension statement in the calling program. (Input)

Default: LDB = SIZE (B,1).

Default: LDB = SIZE (B,1).

LDEVEC — Leading dimension of EVEC exactly as specified in the dimension statement of the calling program. (Input)

Default: LDEVEC = SIZE (EVEC,1).

Default: LDEVEC = SIZE (EVEC,1).

FORTRAN 90 Interface

Generic: CALL GVCSP (A, B, EVAL, EVEC [,…])

Specific: The specific interface names are S_GVCSP and D_GVCSP.

FORTRAN 77 Interface

Single: CALL GVCSP (N, A, LDA, B, LDB, EVAL, EVEC, LDEVEC)

Double: The double precision name is DGVCSP.

Description

Routine GVLSP computes the eigenvalues and eigenvectors of Az = λBz, with A symmetric and B symmetric positive definite. The Cholesky factorization B = RTR, with R a triangular matrix, is used to transform the equation Az = λBz, to

(R-T AR-1)(Rz) = λ (Rz)

The eigenvalues and eigenvectors of C = R-T AR-1 are then computed. The generalized eigenvectors of A are given by z = R-1 x, where x is an eigenvector of C. This development is found in Martin and Wilkinson (1968). The Cholesky factorization is computed based on IMSL routine LFTDS, see Chapter 1, “Linear Systems”. The eigenvalues and eigenvectors of C are computed based on routine EVCSF. Further discussion and some timing results are given Hanson et al. (1990).

Comments

1. Workspace may be explicitly provided, if desired, by use of G3CSP/DG3CSP. The reference is:

CALL G3CSP (N, A, LDA, B, LDB, EVAL, EVEC, LDEVEC, IWK, WK1, WK2)

The additional arguments are as follows:

IWK — Integer work array of length N.

WK1 — Work array of length 3N.

WK2 — Work array of length N2 + N.

2. Informational errors

Type | Code | Description |
---|---|---|

4 | 1 | The iteration for an eigenvalue failed to converge. |

4 | 2 | Matrix B is not positive definite. |

3. The success of this routine can be checked using GPISP.

Example

In this example, a DATA statement is used to set the matrices A and B. The eigenvalues, eigenvectors and performance index are computed and printed. For details on the performance index, see IMSL routine GPISP.

USE GVCSP_INT

USE GPISP_INT

USE UMACH_INT

USE WRRRN_INT

IMPLICIT NONE

! Declare variables

INTEGER LDA, LDB, LDEVEC, N

PARAMETER (N=3, LDA=N, LDB=N, LDEVEC=N)

!

INTEGER NOUT

REAL A(LDA,N), B(LDB,N), EVAL(N), EVEC(LDEVEC,N), PI

! Define values of A:

! A = ( 1.1 1.2 1.4 )

! ( 1.2 1.3 1.5 )

! ( 1.4 1.5 1.6 )

DATA A/1.1, 1.2, 1.4, 1.2, 1.3, 1.5, 1.4, 1.5, 1.6/

!

! Define values of B:

! B = ( 2.0 1.0 0.0 )

! ( 1.0 2.0 1.0 )

! ( 0.0 1.0 2.0 )

DATA B/2.0, 1.0, 0.0, 1.0, 2.0, 1.0, 0.0, 1.0, 2.0/

!

! Find eigenvalues and vectors

CALL GVCSP (A, B, EVAL, EVEC)

! Compute performance index

PI = GPISP(N,A,B,EVAL,EVEC)

! Print results

CALL UMACH (2, NOUT)

CALL WRRRN ('EVAL', EVAL)

CALL WRRRN ('EVEC', EVEC)

WRITE (NOUT,'(/,A,F6.3)') ' Performance index = ', PI

END

Output

EVAL

1 1.386

2 -0.058

3 -0.003

EVEC

1 2 3

1 0.6431 -0.1147 -0.6817

2 -0.0224 -0.6872 0.7266

3 0.7655 0.7174 -0.0858

Performance index = 0.417