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