UNPKG

592 BMarkdownView Raw
1<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
2
3# Function det
4
5Calculate the determinant of a matrix.
6
7
8## Syntax
9
10```js
11math.det(x)
12```
13
14### Parameters
15
16Parameter | Type | Description
17--------- | ---- | -----------
18`x` | Array &#124; Matrix | A matrix
19
20### Returns
21
22Type | Description
23---- | -----------
24number | The determinant of `x`
25
26
27## Examples
28
29```js
30math.det([[1, 2], [3, 4]]) // returns -2
31
32const A = [
33 [-2, 2, 3],
34 [-1, 1, 3],
35 [2, 0, -1]
36]
37math.det(A) // returns 6
38```
39
40
41## See also
42
43[inv](inv.md)