UNPKG

mathjs

Version:

Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with dif

44 lines (27 loc) 592 B
<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> # Function det Calculate the determinant of a matrix. ## Syntax ```js math.det(x) ``` ### Parameters Parameter | Type | Description --------- | ---- | ----------- `x` | Array &#124; Matrix | A matrix ### Returns Type | Description ---- | ----------- number | The determinant of `x` ## Examples ```js 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](inv.md)