# 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 with representing the th (complex) eigenvalue and represents the corresponding (complex) eigenvector.

If 'left' is selected, the left generalized eigenvalues are computed. The formula for the calculation of the result is with represents the conjugate-transposed of .

Example:

## Execution Information

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

## Parameters

`MatrixAID` (input_control)  matrix `→` (handle)

Matrix handle of the input matrix A.

`MatrixBID` (input_control)  matrix `→` (handle)

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 `→` (handle)

Matrix handle with the real parts of the eigenvalues.

`EigenvaluesImagID` (output_control)  matrix `→` (handle)

Matrix handle with the imaginary parts of the eigenvalues.

`EigenvectorsRealID` (output_control)  matrix `→` (handle)

Matrix handle with the real parts of the eigenvectors.

`EigenvectorsImagID` (output_control)  matrix `→` (handle)

Matrix handle with the imaginary parts of the eigenvectors.

## Result

If the parameters are valid, the operator `generalized_eigenvalues_general_matrix` returns the value TRUE. If necessary, an exception is raised.

## Possible Predecessors

`create_matrix`

## Possible Successors

`get_full_matrix`, `get_value_matrix`, `get_diagonal_matrix`

`generalized_eigenvalues_symmetric_matrix`, `eigenvalues_symmetric_matrix`, `eigenvalues_general_matrix`