gives the matrix exponential of m.


gives the matrix exponential of m applied to the vector v.

Details and Options

  • MatrixExp[m] effectively evaluates the power series for the exponential function, with ordinary powers replaced by matrix powers.
  • MatrixExp works only on square matrices.
  • In MatrixExp[m,v] the matrix m can be a SparseArray object.


open allclose all

Basic Examples  (2)

Exponential of a 2×2 matrix:

Exponential applied to a vector:

Scope  (11)

Basic Uses  (6)

Exponentiate a machine-precision matrix:

Exponentiate a complex matrix:

Compute the exponential of an exact matrix:

The exponential of an arbitrary-precision matrix:

Exponential of a symbolic matrix:

Computing the exponential of large machine-precision matrices is efficient:

Directly applying the exponential to a single vector is even more efficient:

Special Matrices  (5)

The exponential of a sparse matrix is returned as a normal matrix:

Format the result:

Directly apply the matrix exponential of a sparse matrix to a sparse vector:

Compute the exponential of a structured array:

Exponentiate IdentityMatrix:

More generally, the exponential of any diagonal matrix is the exponential of its diagonal elements:

Exponentiate HilbertMatrix:

Applications  (2)

A system of first-order linear differential equations:

Write the system in the form with :

The matrix exponential gives the basis for the general solution:

The matrix exponential applied to a vector gives a particular solution:

The matrix s approximates the second derivative periodic on on the grid x:

A vector representing a soliton on the grid x:

Propagate the solution of using a splitting :

Plot the solution and 10 times the error from the solution of the cubic Schrödinger equation:

Properties & Relations  (4)

The matrix exponential of a diagonal matrix is diagonal:

The matrix exponential of a nilpotent matrix is a polynomial matrix:

MatrixExp[m] is always invertible, and the inverse is given by MatrixExp[-m]:

If m is diagonalizable with then :

Possible Issues  (1)

For a large sparse matrix, computing the matrix exponential may take a long time:

Computing the application of it to a vector uses less memory and is much faster:

The results are essentially the same:

Neat Examples  (1)

Wolfram Research (1991), MatrixExp, Wolfram Language function, (updated 2007).


Wolfram Research (1991), MatrixExp, Wolfram Language function, (updated 2007).


@misc{reference.wolfram_2021_matrixexp, author="Wolfram Research", title="{MatrixExp}", year="2007", howpublished="\url{}", note=[Accessed: 20-October-2021 ]}


@online{reference.wolfram_2021_matrixexp, organization={Wolfram Research}, title={MatrixExp}, year={2007}, url={}, note=[Accessed: 20-October-2021 ]}


Wolfram Language. 1991. "MatrixExp." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007.


Wolfram Language. (1991). MatrixExp. Wolfram Language & System Documentation Center. Retrieved from