determinant

Matrix determinant function.

Syntax

determinant(mat_expr)

Argument

mat_expr
A square matrix which can contain any combination of values or formulae.

Example

Templex Expression Result
{determinant({{1, 3},{2, 4}})} -2
{determinant({{1, 2, 4}, {1, 3, 9},{1, 4, 16}})} 2

Comments

The determinant function computes the determinant of a matrix, using an LU decomposition method. Determinants can only be calculated for a square matrix (a matrix containing the same number of rows and columns). If the determinant is zero, expr is singular and cannot be inverted.