Operators

# generalized_eigenvalues_general_matrix (Operator)

## Name

generalized_eigenvalues_general_matrix — Compute the generalized eigenvalues and optionally the generalized eigenvectors of general matrices.

## Signature

generalized_eigenvalues_general_matrix( : : MatrixAID, MatrixBID, ComputeEigenvectors : EigenvaluesRealID, EigenvaluesImagID, EigenvectorsRealID, EigenvectorsImagID)

## Description

The operator generalized_eigenvalues_general_matrix computes all generalized eigenvalues and, optionally, the left or right generalized eigenvectors of the square, general matrices MatrixA and MatrixB. Both matrices must have identical dimensions. The matrices are defined by the matrix handles MatrixAID and MatrixBID. The computed eigenvectors have the norm 1.

The operator generates the new matrices EigenvaluesReal and EigenvaluesImag with the real and the imaginary parts of the computed eigenvalues. Each matrix has one column and n rows, where n is the number of rows or columns of the input matrices. In contrast to the operator generalized_eigenvalues_symmetric_matrix, the order of the generalized eigenvalues is not defined. The operator returns the matrix handles EigenvaluesRealID and EigenvaluesImagID. If desired, the real and imaginary parts of the respective eigenvectors are stored in the new matrices EigenvectorsReal and EigenvectorsImag. Here, the jth column of the matrices of eigenvectors contains the related eigenvector to the jth eigenvalue. For this, the operator returns additionally the matrix handles EigenvectorsRealID and EigenvectorsImagID. Access to the elements of the matrix is possible, e.g., with the operator get_full_matrix or get_sub_matrix.

The computation type of eigenvectors can be selected via the parameter ComputeEigenvectors. If ComputeEigenvectors = 'none', no eigenvectors are computed and the operator is faster. For this, the matrix handles EigenvectorsRealID and EigenvectorsImagID are invalid. If 'right' is selected, the right generalized eigenvalues are computed. The formula for the calculation of the result is

```  MatrixA * x  = lambda  * MatrixB * x  ,
j         j              j

with lambda  representing the jth (complex) eigenvalue and x
j                                                j

represents the corresponding (complex) eigenvector.
```

If 'left' is selected, the left generalized eigenvalues are computed. The formula for the calculation of the result is

```   H                         H
x   * MatrixA = lambda  * x  * MatrixB ,
j                         j

H
with x  represents the conugate-transposed of x  .
j                                        j
```

Example:

```
/  6.0  4.0 -8.0  \                /   3.0   1.0   2.0  \
MatrixA = |  5.0  7.0  3.0  |      MatrixB = |  -5.0   7.0   2.0  |
\  4.0 -1.0  4.0  /                \   9.0   4.0   1.0  /

ComputeEigenvectors = 'right'

/  0.5363 \                      /  0.4208  \
->   EigenvaluesReal = |  0.5363 |    EigenvaluesImag = | -0.4208  |
\ -6.1616 /                      \  0.0     /

/  0.3500   0.3500   0.0410  \
EigenvectorsReal = | -0.9565  -0.9565   0.3267  |
\ -0.2757  -0.2757  -1.0000  /

/ -0.4644   0.4644   0.0  \
EigenvectorsImag = |  0.0435  -0.0435   0.0  |
\ -0.1869i  0.1869   0.0  /
```

## Parallelization

• Multithreading type: reentrant (runs in parallel with non-exclusive operators).
• Processed without parallelization.

## Parameters

MatrixAID (input_control)  matrix (integer)

Matrix handle of the input matrix A.

MatrixBID (input_control)  matrix (integer)

Matrix handle of the input matrix B.

ComputeEigenvectors (input_control)  string (string)

Computation of the eigenvectors.

Default value: 'none'

List of values: 'left', 'none', 'right'

EigenvaluesRealID (output_control)  matrix (integer)

Matrix handle with the real parts of the eigenvalues.

EigenvaluesImagID (output_control)  matrix (integer)

Matrix handle with the imaginary parts of the eigenvalues.

EigenvectorsRealID (output_control)  matrix (integer)

Matrix handle with the real parts of the eigenvectors.

EigenvectorsImagID (output_control)  matrix (integer)

Matrix handle with the imaginary parts of the eigenvectors.

## Result

If the parameters are valid, the operator generalized_eigenvalues_general_matrix returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.