eigenvalues_general_matrixEigenvaluesGeneralMatrixEigenvaluesGeneralMatrixeigenvalues_general_matrixT_eigenvalues_general_matrix
Short description
eigenvalues_general_matrixEigenvaluesGeneralMatrixEigenvaluesGeneralMatrixeigenvalues_general_matrixT_eigenvalues_general_matrix โ Compute the eigenvalues and optionally the eigenvectors of a general
matrix.
Signature
eigenvalues_general_matrix( matrix MatrixID, string ComputeEigenvectors, out matrix EigenvaluesRealID, out matrix EigenvaluesImagID, out matrix EigenvectorsRealID, out matrix EigenvectorsImagID )void EigenvaluesGeneralMatrix( const HTuple& MatrixID, const HTuple& ComputeEigenvectors, HTuple* EigenvaluesRealID, HTuple* EigenvaluesImagID, HTuple* EigenvectorsRealID, HTuple* EigenvectorsImagID )static void HOperatorSet.EigenvaluesGeneralMatrix( HTuple matrixID, HTuple computeEigenvectors, out HTuple eigenvaluesRealID, out HTuple eigenvaluesImagID, out HTuple eigenvectorsRealID, out HTuple eigenvectorsImagID )def eigenvalues_general_matrix( matrix_id: HHandle, compute_eigenvectors: str ) -> Tuple[HHandle, HHandle, HHandle, HHandle]
Herror T_eigenvalues_general_matrix( const Htuple MatrixID, const Htuple ComputeEigenvectors, Htuple* EigenvaluesRealID, Htuple* EigenvaluesImagID, Htuple* EigenvectorsRealID, Htuple* EigenvectorsImagID )
void HMatrix::EigenvaluesGeneralMatrix( const HString& ComputeEigenvectors, HMatrix* EigenvaluesRealID, HMatrix* EigenvaluesImagID, HMatrix* EigenvectorsRealID, HMatrix* EigenvectorsImagID ) const
void HMatrix::EigenvaluesGeneralMatrix( const char* ComputeEigenvectors, HMatrix* EigenvaluesRealID, HMatrix* EigenvaluesImagID, HMatrix* EigenvectorsRealID, HMatrix* EigenvectorsImagID ) const
void HMatrix::EigenvaluesGeneralMatrix( const wchar_t* ComputeEigenvectors, HMatrix* EigenvaluesRealID, HMatrix* EigenvaluesImagID, HMatrix* EigenvectorsRealID, HMatrix* EigenvectorsImagID ) const (Windows only)
void HMatrix.EigenvaluesGeneralMatrix( string computeEigenvectors, out HMatrix eigenvaluesRealID, out HMatrix eigenvaluesImagID, out HMatrix eigenvectorsRealID, out HMatrix eigenvectorsImagID )
Description
The operator eigenvalues_general_matrixEigenvaluesGeneralMatrix computes all
eigenvalues and, optionally, the left or right eigenvectors of a
square, general Matrix. The matrix is defined by the
matrix handle MatrixIDmatrixIDmatrix_id. 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 of the input Matrix.
In contrast to the operator eigenvalues_symmetric_matrixEigenvaluesSymmetricMatrix,
the order of the eigenvalues is not defined.
The operator returns the matrix handles EigenvaluesRealIDeigenvaluesRealIDeigenvalues_real_id
and EigenvaluesImagIDeigenvaluesImagIDeigenvalues_imag_id. If desired, the real and imaginary
parts of the computed eigenvectors are stored in the new matrices
EigenvectorsReal and EigenvectorsImag. For
this, the operator returns valid matrix handles
EigenvectorsRealIDeigenvectorsRealIDeigenvectors_real_id and EigenvectorsImagIDeigenvectorsImagIDeigenvectors_imag_id.
Access to the elements of the matrix is possible e.g., with the
operator get_full_matrixGetFullMatrix.
The computation type of eigenvectors can be selected via the
parameter ComputeEigenvectorscomputeEigenvectorscompute_eigenvectors. If
ComputeEigenvectorscomputeEigenvectorscompute_eigenvectors = 'none'"none", no eigenvectors are
computed. If 'left'"left" is selected, the left eigenvalues are
computed. If 'right'"right" is selected, the right eigenvalues are
computed.
Example:
ComputeEigenvectorscomputeEigenvectorscompute_eigenvectors = 'right'"right"
\[\begin{eqnarray*}
\texttt{Matrix} =
\left[ \begin{array}{rrr}
6.0 & 4.0 & -8.0 \\
5.0 & 7.0 & 3.0 \\
4.0 & -1.0 & 4.0
\end{array} \right]
\end{eqnarray*}\]
\[\begin{eqnarray*}
\to \qquad
\texttt{EigenvaluesReal} &=&
\left[ \begin{array}{r}
3.3110 \\
3.3110 \\
10.3781
\end{array} \right]\\
\texttt{EigenvaluesImag} &=&
\left[ \begin{array}{r}
5.4143 \\
-5.4143 \\
0.0
\end{array} \right]\\
\texttt{EigenvectorsReal} &=&
\left[ \begin{array}{rrr}
0.6353 & 0.6353 & 0.4813 \\
-0.4764 & -0.4764 & 0.8605 \\
-0.0246 & -0.0246 & 0.1669
\end{array} \right]\\
\texttt{EigenvectorsImag} &=&
\left[ \begin{array}{rrr}
0.0 & 0.0 \quad & \quad 0.0 \\
-0.2485 & 0.2485 \quad & \quad 0.0 \\
-0.5542 & 0.5542 \quad & \quad 0.0
\end{array} \right]
\end{eqnarray*}\]
Execution information
-
Multithreading type: reentrant (runs in parallel with non-exclusive operators).
-
Multithreading scope: global (may be called from any thread).
-
Processed without parallelization.
Parameters
MatrixIDmatrixIDmatrix_id (input_control) matrix โ (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)
Matrix handle of the input matrix.
ComputeEigenvectorscomputeEigenvectorscompute_eigenvectors (input_control) string โ (string)HTuple (HString)HTuple (string)strHtuple (char*)
Computation of the eigenvectors.
Default: 'none'"none"
List of values: 'left', 'none', 'right'"left", "none", "right"
EigenvaluesRealIDeigenvaluesRealIDeigenvalues_real_id (output_control) matrix โ (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)
Matrix handle with the real parts of the
eigenvalues.
EigenvaluesImagIDeigenvaluesImagIDeigenvalues_imag_id (output_control) matrix โ (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)
Matrix handle with the imaginary parts of the
eigenvalues.
EigenvectorsRealIDeigenvectorsRealIDeigenvectors_real_id (output_control) matrix โ (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)
Matrix handle with the real parts of the
eigenvectors.
EigenvectorsImagIDeigenvectorsImagIDeigenvectors_imag_id (output_control) matrix โ (handle)HTuple (HHandle)HMatrix, HTuple (IntPtr)HHandleHtuple (handle)
Matrix handle with the imaginary parts of the
eigenvectors.
Result
If the parameters are valid, the operator
eigenvalues_general_matrixEigenvaluesGeneralMatrix returns the value 2 (H_MSG_TRUE). If
necessary, an exception is raised.
Combinations with other operators
Combinations
Possible predecessors
create_matrixCreateMatrix
Possible successors
get_full_matrixGetFullMatrix, get_value_matrixGetValueMatrix, get_diagonal_matrixGetDiagonalMatrix
See also
eigenvalues_symmetric_matrixEigenvaluesSymmetricMatrix, generalized_eigenvalues_symmetric_matrixGeneralizedEigenvaluesSymmetricMatrix, generalized_eigenvalues_general_matrixGeneralizedEigenvaluesGeneralMatrix
References
David Poole: โLinear Algebra: A Modern Introductionโ; Thomson;
Belmont; 2006.
Gene H. Golub, Charles F. van Loan: โMatrix Computationsโ; The
Johns Hopkins University Press; Baltimore and London; 1996.
Module
Foundation