mirror of
https://github.com/josdejong/mathjs.git
synced 2026-01-25 15:07:57 +00:00
1.1 KiB
1.1 KiB
| layout |
|---|
| default |
Function inv #
Calculate the inverse of a square matrix.
Syntax #
math.inv(x)
Parameters #
| Parameter | Type | Description |
|---|---|---|
x |
Number | Complex | Array | Matrix | Matrix to be inversed |
Returns #
| Type | Description |
|---|---|
| Number | Complex | Array | Matrix | The inverse of x. |
Examples #
math.inv([[1, 2], [3, 4]]); // returns [[-2, 1], [1.5, -0.5]]
math.inv(4); // returns 0.25
1 / 4; // returns 0.25