Contents Previous Next Subchapters

Exponential Of A Matrix
Syntax expmat(Atolmstep)
See Also exp , odepade

Description
Returns the matrix exponential of A, where A is a real, double-precision, or complex matrix square matrix , tol is a real or double-precision scalar specifying the desired absolute accuracy in each element, mstep is an integer greater than 1 that specifies the base 2 logarithm of the maximum number of steps to use before giving up on the desired accuracy. The return value has the same type and dimension as A.

The matrix exponential of A is defined by
              2        3
     I + A + A / 2! + A / 3! + ...
where the powers represent matrix multiplication.

Example
     x = {[1., 0.], [0., 2.]}
     tol = 1e-4
     mstep = 6
     expmat(x, tol, mstep)
returns
     {
     [ 2.71828 , 0 ]
     [ 0 , 7.38906 ]
     }
Note that for diagonal matrices the matrix exponential is the scalar exponential of the diagonal elements and the scalar exponential of 1 and 2 are 2.71828 and 7.38906, respectively.