Skip to content

determinant_matrixDeterminantMatrixDeterminantMatrixdeterminant_matrixT_determinant_matrix๐Ÿ”—

Short description๐Ÿ”—

determinant_matrixDeterminantMatrixDeterminantMatrixdeterminant_matrixT_determinant_matrix โ€” Compute the determinant of a matrix.

Signature๐Ÿ”—

determinant_matrix( matrix MatrixID, string MatrixType, out real Value )void DeterminantMatrix( const HTuple& MatrixID, const HTuple& MatrixType, HTuple* Value )static void HOperatorSet.DeterminantMatrix( HTuple matrixID, HTuple matrixType, out HTuple value )def determinant_matrix( matrix_id: HHandle, matrix_type: str ) -> float

Herror T_determinant_matrix( const Htuple MatrixID, const Htuple MatrixType, Htuple* Value )

double HMatrix::DeterminantMatrix( const HString& MatrixType ) const

double HMatrix::DeterminantMatrix( const char* MatrixType ) const

double HMatrix::DeterminantMatrix( const wchar_t* MatrixType ) const (Windows only)

double HMatrix.DeterminantMatrix( string matrixType )

Description๐Ÿ”—

The operator determinant_matrixDeterminantMatrix computes the determinant of the input Matrix given by the matrix handle MatrixIDmatrixIDmatrix_id. The type of the input Matrix can be selected via the parameter MatrixTypematrixTypematrix_type. The following values are supported: 'general'"general" for general, 'symmetric'"symmetric" for symmetric, 'positive_definite'"positive_definite" for symmetric positive definite, 'tridiagonal'"tridiagonal" for tridiagonal, 'upper_triangular'"upper_triangular" for upper triangular, 'permuted_upper_triangular'"permuted_upper_triangular" for permuted upper triangular, 'lower_triangular'"lower_triangular" for lower triangular, and 'permuted_lower_triangular'"permuted_lower_triangular" for permuted lower triangular matrices. The formula for the calculation of the result is:

\[\begin{eqnarray*} \textrm{Value} \quad = \quad \det\,\texttt{Matrix}. \end{eqnarray*}\]

Example:

\[\begin{eqnarray*} \texttt{Matrix} = \left[ \begin{array}{rrr} 3.0 & 1.0 & 2.0 \\ -5.0 & 7.0 & 2.0 \\ -9.0 & -4.0 & 1.0 \end{array} \right] \qquad \to \qquad \textrm{Value} = -134.0 \end{eqnarray*}\]

Attention๐Ÿ”—

For MatrixTypematrixTypematrix_type = 'symmetric'"symmetric", 'positive_definite'"positive_definite", or 'upper_triangular'"upper_triangular" the upper triangular part of the input Matrix must contain the relevant information of the matrix. The strictly lower triangular part of the matrix is not referenced. For MatrixTypematrixTypematrix_type = 'lower_triangular'"lower_triangular" the lower triangular part of the input Matrix must contain the relevant information of the matrix. The strictly upper triangular part of the matrix is not referenced. For MatrixTypematrixTypematrix_type = 'tridiagonal'"tridiagonal", only the main diagonal, the superdiagonal, and the subdiagonal of the input Matrix are used. The other parts of the matrix are not referenced. If the referenced part of the input Matrix is not of the specified type, an exception is raised.

Execution information๐Ÿ”—

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.

MatrixTypematrixTypematrix_type (input_control) string โ†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

The type of the input matrix.

Default: 'general'"general"
List of values: 'general', 'lower_triangular', 'permuted_lower_triangular', 'permuted_upper_triangular', 'positive_definite', 'symmetric', 'tridiagonal', 'upper_triangular'"general", "lower_triangular", "permuted_lower_triangular", "permuted_upper_triangular", "positive_definite", "symmetric", "tridiagonal", "upper_triangular"

Valuevaluevalue (output_control) real โ†’ (real)HTuple (double)HTuple (double)floatHtuple (double)

Determinant of the input matrix.

Result๐Ÿ”—

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

Combinations with other operators๐Ÿ”—

Combinations

Possible predecessors

create_matrixCreateMatrix

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