simple-squiggle

A restricted subset of Squiggle
Log | Files | Refs | README

inv.md (783B)


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