simple-squiggle/node_modules/mathjs/docs/reference/functions/det.md

644 B

Function det

Calculate the determinant of a matrix.

Syntax

math.det(x)

Parameters

Parameter Type Description
x Array | Matrix A matrix

Returns

Type Description
number The determinant of x

Throws

Type Description

Examples

math.det([[1, 2], [3, 4]]) // returns -2

const A = [
  [-2, 2, 3],
  [-1, 1, 3],
  [2, 0, -1]
]
math.det(A) // returns 6

See also

inv