expm.md (873B)
1 <!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. --> 2 3 # Function expm 4 5 Compute the matrix exponential, expm(A) = e^A. The matrix must be square. 6 Not to be confused with exp(a), which performs element-wise 7 exponentiation. 8 9 The exponential is calculated using the Padé approximant with scaling and 10 squaring; see "Nineteen Dubious Ways to Compute the Exponential of a 11 Matrix," by Moler and Van Loan. 12 13 14 ## Syntax 15 16 ```js 17 math.expm(x) 18 ``` 19 20 ### Parameters 21 22 Parameter | Type | Description 23 --------- | ---- | ----------- 24 `x` | Matrix | A square Matrix 25 26 ### Returns 27 28 Type | Description 29 ---- | ----------- 30 Matrix | The exponential of x 31 32 33 ### Throws 34 35 Type | Description 36 ---- | ----------- 37 38 39 ## Examples 40 41 ```js 42 const A = [[0,2],[0,0]] 43 math.expm(A) // returns [[1,2],[0,1]] 44 ``` 45 46 47 ## See also 48 49 [exp](exp.md)