MatrixExp
✖
MatrixExp

Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Exponential of a 3×3 numerical matrix:

https://wolfram.com/xid/0bimdm8s-0o7ihp


https://wolfram.com/xid/0bimdm8s-mmd2ez

This is not simply the exponential of each entry in the matrix:

https://wolfram.com/xid/0bimdm8s-xiwvbb

Exponential of a 2×2 symbolic matrix:

https://wolfram.com/xid/0bimdm8s-gtgh2f

Exponential applied to a vector:

https://wolfram.com/xid/0bimdm8s-mmxyct

Scope (12)Survey of the scope of standard use cases
Basic Uses (7)
Exponentiate a machine-precision matrix:

https://wolfram.com/xid/0bimdm8s-f6rr16

Exponentiate a complex matrix:

https://wolfram.com/xid/0bimdm8s-etp19y

Compute the exponential of an exact matrix:

https://wolfram.com/xid/0bimdm8s-hml8lc

The exponential of an arbitrary-precision matrix:

https://wolfram.com/xid/0bimdm8s-gftccs

Exponential of a symbolic matrix:

https://wolfram.com/xid/0bimdm8s-u07efd

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

https://wolfram.com/xid/0bimdm8s-dkq7nk

https://wolfram.com/xid/0bimdm8s-lx8juz

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

https://wolfram.com/xid/0bimdm8s-rz897y

The exponential of a CenteredInterval matrix:

https://wolfram.com/xid/0bimdm8s-kzui0z


https://wolfram.com/xid/0bimdm8s-3yenu

Find a random representative mrep of m:

https://wolfram.com/xid/0bimdm8s-kte9zj

Verify that mexp contains the exponential of mrep:

https://wolfram.com/xid/0bimdm8s-fxghe1

Special Matrices (5)
The exponential of an exact sparse matrix is typically returned as a normal matrix:

https://wolfram.com/xid/0bimdm8s-ocj3kf


https://wolfram.com/xid/0bimdm8s-fm3xwv


https://wolfram.com/xid/0bimdm8s-eordwx

If the sparse matrix contains machine-precision elements, the result is typically sparse:

https://wolfram.com/xid/0bimdm8s-dz6bqi


https://wolfram.com/xid/0bimdm8s-me0u8d

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

https://wolfram.com/xid/0bimdm8s-27tx1h


https://wolfram.com/xid/0bimdm8s-u09q39


https://wolfram.com/xid/0bimdm8s-8ouhg5

Compute the exponential of a structured array:

https://wolfram.com/xid/0bimdm8s-wdjmwi


https://wolfram.com/xid/0bimdm8s-j45yx1

Exponentiate IdentityMatrix:

https://wolfram.com/xid/0bimdm8s-8vb729

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

https://wolfram.com/xid/0bimdm8s-7h79pn

Exponentiate HilbertMatrix:

https://wolfram.com/xid/0bimdm8s-gk8bid

Applications (5)Sample problems that can be solved with this function
Suppose a particle is moving in a planar force field and its position vector satisfies
and
, where
and
are as follows. Solve this initial problem for
:

https://wolfram.com/xid/0bimdm8s-mibhtz

https://wolfram.com/xid/0bimdm8s-3s1c45
The solution to this differential equation is :

https://wolfram.com/xid/0bimdm8s-9bj0oa

Verify the solution using DSolveValue:

https://wolfram.com/xid/0bimdm8s-x59jyn

A system of first-order linear differential equations:

https://wolfram.com/xid/0bimdm8s-ka0v4b
Write the system in the form with
:

https://wolfram.com/xid/0bimdm8s-e6dlne
The matrix exponential gives the basis for the general solution:

https://wolfram.com/xid/0bimdm8s-zytvj


https://wolfram.com/xid/0bimdm8s-vtygb

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

https://wolfram.com/xid/0bimdm8s-krhto8


https://wolfram.com/xid/0bimdm8s-fzckr1

In quantum mechanics, the energy operator is called the Hamiltonian . Given the Hamiltonian for a spin-1 particle in constant magnetic field in the
direction, find the state at time
of a particle that is initially in the state
representing
:

https://wolfram.com/xid/0bimdm8s-f62azb
The system evolves according to the Schrödinger equation :

https://wolfram.com/xid/0bimdm8s-mrerfz

Cross products with respect to fixed three-dimensional vectors can be represented by matrix multiplication, which is useful in studying rotational motion. Construct the antisymmetric matrix representing the linear operator , where
is an angular velocity about the
axis:

https://wolfram.com/xid/0bimdm8s-pjm3n4

https://wolfram.com/xid/0bimdm8s-itgwiy

Verify that the action of is the same as doing a cross product with
:

https://wolfram.com/xid/0bimdm8s-xd67hd

The rotation matrix at time is the matrix exponential of
times the previous matrix:

https://wolfram.com/xid/0bimdm8s-gba0kd

Verify using RotationMatrix:

https://wolfram.com/xid/0bimdm8s-lepdeg

The point at time zero will be
at time
:

https://wolfram.com/xid/0bimdm8s-7d8okg

The velocity of will be given by
:

https://wolfram.com/xid/0bimdm8s-2e0zqy

And the vector from the axis of rotation to is
:

https://wolfram.com/xid/0bimdm8s-dwnnyu

Visualize this motion and the associated vectors:

https://wolfram.com/xid/0bimdm8s-wpklwd

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

https://wolfram.com/xid/0bimdm8s-b54il9

A vector representing a soliton on the grid x:

https://wolfram.com/xid/0bimdm8s-c2vnrl

Propagate the solution of using a splitting
:

https://wolfram.com/xid/0bimdm8s-eh8tm2

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

https://wolfram.com/xid/0bimdm8s-ddmw78

Properties & Relations (10)Properties of the function, and connections to other functions
MatrixExp effectively uses the power series for Exp, with Power replaced by MatrixPower:

https://wolfram.com/xid/0bimdm8s-8wii1i

Equivalently, MatrixExp is MatrixFunction applied to Exp:

https://wolfram.com/xid/0bimdm8s-dks9sn

The matrix exponential of a diagonal matrix is a diagonal matrix with the diagonal entries exponentiated:

https://wolfram.com/xid/0bimdm8s-enlw5a

https://wolfram.com/xid/0bimdm8s-dc9c5


https://wolfram.com/xid/0bimdm8s-bq7f2a

If m is diagonalizable with , then
:

https://wolfram.com/xid/0bimdm8s-jpdxct

https://wolfram.com/xid/0bimdm8s-bhbcuy


https://wolfram.com/xid/0bimdm8s-c0mieu

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

https://wolfram.com/xid/0bimdm8s-dhdgco

https://wolfram.com/xid/0bimdm8s-cio4na


https://wolfram.com/xid/0bimdm8s-eq00tx

MatrixExp of a real, antisymmetric matrix is orthogonal:

https://wolfram.com/xid/0bimdm8s-fli6yr

https://wolfram.com/xid/0bimdm8s-p5nli8


https://wolfram.com/xid/0bimdm8s-0dp9bq

MatrixExp of an antihermitian matrix is unitary:

https://wolfram.com/xid/0bimdm8s-nnltue

https://wolfram.com/xid/0bimdm8s-3s4vcw


https://wolfram.com/xid/0bimdm8s-n7ojlr

MatrixExp of a Hermitian matrix is positive-definite:

https://wolfram.com/xid/0bimdm8s-dwd7bj

https://wolfram.com/xid/0bimdm8s-ktgaph


https://wolfram.com/xid/0bimdm8s-bsadpx

MatrixExp satisfies :

https://wolfram.com/xid/0bimdm8s-zq97yk

https://wolfram.com/xid/0bimdm8s-tcbhwf

The matrix exponential of a nilpotent matrix is a polynomial in the exponentiation parameter:

https://wolfram.com/xid/0bimdm8s-dtxiab

https://wolfram.com/xid/0bimdm8s-0sqrk

Confirm that is nilpotent (
for some
):

https://wolfram.com/xid/0bimdm8s-puj9vz

can be computed from the JordanDecomposition as

https://wolfram.com/xid/0bimdm8s-sgp8bx

Moreover, is zero except in upper triangular blocks delineated by
s in the superdiagonal:

https://wolfram.com/xid/0bimdm8s-o739h8

Possible Issues (1)Common pitfalls and unexpected behavior
For a large sparse matrix, computing the matrix exponential may take a long time:

https://wolfram.com/xid/0bimdm8s-epygno


https://wolfram.com/xid/0bimdm8s-izcpd

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

https://wolfram.com/xid/0bimdm8s-k0ufu1

The results are essentially the same:

https://wolfram.com/xid/0bimdm8s-djbqow

Neat Examples (1)Surprising or curious use cases

https://wolfram.com/xid/0bimdm8s-ejavw6

https://wolfram.com/xid/0bimdm8s-k3b2m

Wolfram Research (1991), MatrixExp, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixExp.html (updated 2024).
Text
Wolfram Research (1991), MatrixExp, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixExp.html (updated 2024).
Wolfram Research (1991), MatrixExp, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixExp.html (updated 2024).
CMS
Wolfram Language. 1991. "MatrixExp." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/MatrixExp.html.
Wolfram Language. 1991. "MatrixExp." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/MatrixExp.html.
APA
Wolfram Language. (1991). MatrixExp. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MatrixExp.html
Wolfram Language. (1991). MatrixExp. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MatrixExp.html
BibTeX
@misc{reference.wolfram_2025_matrixexp, author="Wolfram Research", title="{MatrixExp}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/MatrixExp.html}", note=[Accessed: 29-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_matrixexp, organization={Wolfram Research}, title={MatrixExp}, year={2024}, url={https://reference.wolfram.com/language/ref/MatrixExp.html}, note=[Accessed: 29-March-2025
]}