EIGSYMGEN Function
Computes the generalized eigenexpansion of a system Ax = λBx. The matrices A and B are real and symmetric, and B is positive definite.
Usage
result = EIGSYMGEN(a, b)
Input Parameters
a—Two-dimensional matrix containing symmetric coefficient matrix A.
b—Two-dimensional matrix containing the positive definite symmetric coefficient matrix B.
Returned Value
result—One-dimensional array containing the eigenvalues of the symmetric matrix.
Input Keywords
Double—If present and nonzero, double precision is used.
Output Keywords
Vectors—Compute eigenvectors of the problem. A two-dimensional array containing the eigenvectors is returned in the variable name specified by Vectors.
Discussion
Function EIGSYMGEN computes the eigenvalues of a symmetric, positive definite eigenvalue problem by a three-phase process (Martin and Wilkinson 1971). Matrix B is reduced to factored form using the Cholesky decomposition. These factors are used to form a congruence transformation that yields a symmetric real matrix whose eigenexpansion is obtained. The problem is then transformed back to the original coordinates. Eigenvectors are calculated and transformed as required.
Example 1
In this example, the generalized eigenexpansion of a system Ax = λBx, where A and B are 3-by-3 matrices, is computed.
; Define the matrix A.
RM, a, 3, 3
row 0: 1.1 1.2 1.4
row 1: 1.2 1.3 1.5
row 2: 1.4 1.5 1.6
; Define the matrix B.
RM, b, 3, 3
row 0: 2 1 0
row 1: 1 2 1
row 2: 0 1 2
; Call EIGSYMGEN to compute the eigenexpansion.
eigval = EIGSYMGEN(a, b)
; Output the results.
PM, eigval, Title = 'Eigenvalues'
; PV-WAVE prints the following:
; Eigenvalues
; 1.38644
; -0.0583479
; -0.00309042
Example 2
This example is a variation of the first example. Here, the eigenvectors are computed as well as the eigenvalues.
; Define the matrix A.
RM, a, 3, 3
row 0: 1.1 1.2 1.4
row 1: 1.2 1.3 1.5
row 2: 1.4 1.5 1.6
; Define the matrix B.
RM, b, 3, 3
row 0: 2 1 0
row 1: 1 2 1
row 2: 0 1 2
; Call EIGSYMGEN with keyword Vectors to specify the named
; variable in which the vectors are stored.
eigval = EIGSYMGEN(a, b, Vectors = eigvec)
; Output the eigenvalues.
PM, eigval, Title = 'Eigenvalues'
; PV-WAVE prints the following:
; Eigenvalues
; 1.38644
; -0.0583478
; -0.00309040
PM, eigvec, Title = 'Eigenvectors'
; Output the eigenvectors.
; PV-WAVE prints the following:
; Eigenvectors
; 0.643094     -0.114730    -0.681688
; -0.0223849    -0.687186     0.726597
; 0.765460      0.717365    -0.0857800
Warning Errors
MATH_SLOW_CONVERGENCE_SYM—Iteration for an eigenvalue failed to converge in 100 iterations before deflating.
Fatal Errors
MATH_SUBMATRIX_NOT_POS_DEFINITE—Leading submatrix of the input matrix is not positive definite.
MATH_MATRIX_B_NOT_POS_DEFINITE—Matrix B is not positive definite.