# Matrix exponential

In mathematics, the **matrix exponential** is a matrix function on square matrices analogous to the ordinary exponential function. Abstractly, the matrix exponential gives the connection between a matrix Lie algebra and the corresponding Lie group.

Let Template:Mvar be an *n*×*n* real or complex matrix. The exponential of Template:Mvar, denoted by *e*^{X} or exp(*X*), is the *n*×*n* matrix given by the power series

The above series always converges, so the exponential of Template:Mvar is well-defined. If Template:Mvar is a 1×1 matrix the matrix exponential of Template:Mvar is a 1×1 matrix whose single element is the ordinary exponential of the single element of Template:Mvar.

## Properties

Let *X* and *Y* be *n*×*n* complex matrices and let *a* and *b* be arbitrary complex numbers. We denote the *n*×*n* identity matrix by *I* and the zero matrix by 0. The matrix exponential satisfies the following properties:

*e*^{0}=*I**e*^{aX}*e*^{bX}=*e*^{(a + b)X}*e*^{X}*e*^{−X}=*I*- If
*XY*=*YX*then*e*^{X}*e*^{Y}=*e*^{Y}*e*^{X}=*e*^{(X + Y)}. - If
*Y*is invertible then*e*^{YXY−1}=*Ye*^{X}*Y*^{−1}. - exp(
*X*^{T}) = (exp*X*)^{T}, where*X*^{T}denotes the transpose of*X*. It follows that if*X*is symmetric then*e*^{X}is also symmetric, and that if*X*is skew-symmetric then*e*^{X}is orthogonal. - exp(
*X*^{∗}) = (exp*X*)^{∗}, where*X*^{∗}denotes the conjugate transpose of*X*. It follows that if*X*is Hermitian then*e*^{X}is also Hermitian, and that if*X*is skew-Hermitian then*e*^{X}is unitary.

### Linear differential equation systems

{{#invoke:main|main}}

One of the reasons for the importance of the matrix exponential is that it can be used to solve systems of linear ordinary differential equations. The solution of

where Template:Mvar is a constant matrix, is given by

The matrix exponential can also be used to solve the inhomogeneous equation

See the section on applications below for examples.

There is no closed-form solution for differential equations of the form

where Template:Mvar is not constant, but the Magnus series gives the solution as an infinite sum.

### The exponential of sums

For any real numbers (scalars) Template:Mvar and Template:Mvar we know that the exponential function satisfies *e*^{x+y} = *e*^{x} *e*^{y}. The same is true for commuting matrices, if the matrices Template:Mvar and Template:Mvar commute (meaning that *XY* = *YX*), then

However, for matrices that do not commute the above equality does not necessarily hold. In this case the Baker–Campbell–Hausdorff formula can be used to calculate *e*^{X+Y}.

The converse is not true in general. The equation *e*^{X+Y} = *e*^{X} *e*^{Y} does not imply that Template:Mvar and Template:Mvar commute.

For Hermitian matrices there are two notable theorems related to the trace of matrix exponentials.

#### Golden–Thompson inequality

{{#invoke:main|main}}

If Template:Mvar and Template:Mvar are Hermitian matrices, then

Note that there is no requirement of commutativity. There are counterexamples to show that the Golden–Thompson inequality cannot be extended to three matrices – and, in any event, tr(exp(*A*)exp(*B*)exp(*C*)) is not guaranteed to be real for Hermitian *A*, *B*, *C*. However, the next theorem accomplishes this in a way.

#### Lieb's theorem

The **Lieb's theorem**, named after Elliott H. Lieb, states that, for a fixed Hermitian matrix Template:Mvar, the function

is concave on the cone of positive-definite matrices.^{[2]}

### The exponential map

Note that the exponential of a matrix is always an invertible matrix. The inverse matrix of *e*^{X} is given by *e*^{−X}. This is analogous to the fact that the exponential of a complex number is always nonzero. The matrix exponential then gives us a map

from the space of all *n*×*n* matrices to the general linear group of degree Template:Mvar, i.e. the group of all *n*×*n* invertible matrices. In fact, this map is surjective which means that every invertible matrix can be written as the exponential of some other matrix (for this, it is essential to consider the field **C** of complex numbers and not **R**).

For any two matrices Template:Mvar and Template:Mvar,

where || · || denotes an arbitrary matrix norm. It follows that the exponential map is continuous and Lipschitz continuous on compact subsets of *M*_{n}(**C**).

The map

defines a smooth curve in the general linear group which passes through the identity element at *t* = 0.

In fact, this gives a one-parameter subgroup of the general linear group since

The derivative of this curve (or tangent vector) at a point *t* is given by

The derivative at *t* = 0 is just the matrix *X*, which is to say that *X* generates this one-parameter subgroup.

More generally,^{[3]} for a generic Template:Mvar-dependent exponent, *X(t)*,

Taking the above expression *e*^{X(t)} outside the integral sign and expanding the integrand with the help of the Hadamard lemma one can obtain the following useful expression for the derivative of the matrix exponent,

### The determinant of the matrix exponential

By Jacobi's formula, for any complex square matrix the following trace identity holds:

In addition to providing a computational tool, this formula demonstrates that a matrix exponential is always an invertible matrix. This follows from the fact that the right hand side of the above equation is always non-zero, and so det(*e ^{A}*)≠ 0, which means that

*e*must be invertible.

^{A}In the real-valued case, the formula also exhibits the map

to not be surjective, in contrast to the complex case mentioned earlier. This follows from the fact that, for real-valued matrices, the right-hand side of the formula is always positive, while there exist invertible matrices with a negative determinant.

## Computing the matrix exponential

Finding reliable and accurate methods to compute the matrix exponential is difficult, and this is still a topic of considerable current research in mathematics and numerical analysis. Both Matlab and GNU Octave use Padé approximant.^{[4]}^{[5]} Several methods are listed below.

### Diagonalizable case

If a matrix is diagonal:

then its exponential can be obtained by exponentiating each entry on the main diagonal:

This also allows one to exponentiate diagonalizable matrices. If *A* = *UDU*^{−1} and *D* is diagonal, then *e*^{A} = *Ue*^{D}*U*^{−1}. Application of Sylvester's formula yields the same result. (To see this, note that addition and multiplication, hence also exponentiation, of diagonal matrices is equivalent to element-wise addition and multiplication, and hence exponentiation; in particular, the "one-dimensional" exponentiation is felt element-wise for the diagonal case.)

### Projection case

If *P* is a projection matrix (i.e. is idempotent), its matrix exponential is *e*^{P} = *I* + (*e* − 1)*P*. This may be derived by expansion of the definition of the exponential function and by use of the idempotency of *P*:

### Rotation case

For a simple rotation in which the perpendicular unit vectors Template:Mvar and Template:Mvar specify a plane,^{[6]} the rotation matrix Template:Mvar can be expressed in terms of a similar exponential function involving a generator Template:Mvar and angle Template:Mvar.^{[7]}^{[8]}

The formula for the exponential results from reducing the powers of Template:Mvar in the series expansion and identifying the respective series coefficients of *G ^{2}* and Template:Mvar with −cos(

*θ*) and sin(

*θ*) respectively. The second expression here for

*e*is the same as the expression for

^{Gθ}*R*(

*θ*) in the article containing the derivation of the generator,

*R*(

*θ*) =

*e*.

^{Gθ}In two dimensions, if and , then , , and

reduces to the standard matrix for a plane rotation.

The matrix *P* = −*G*^{2} projects a vector onto the ab-plane and the rotation only affects this part of the vector. An example illustrating this is a rotation of 30° = π/6 in the plane spanned by *a* and *b*,

Let *N* = *I* − *P*, so *N*^{2} = *N* and its products with *P* and *G* are zero. This will allow us to evaluate powers of *R*.

### Nilpotent case

A matrix *N* is nilpotent if *N*^{q} = 0 for some integer *q*. In this case, the matrix exponential *e*^{N} can be computed directly from the series expansion, as the series terminates after a finite number of terms:

### Generalization

When the minimal polynomial of a matrix *X* can be factored into a product of first degree polynomials, it can be expressed as a sum

where

*A*is diagonalizable*N*is nilpotent*A*commutes with*N*(i.e.*AN*=*NA*)

This is the Jordan–Chevalley decomposition.

This means that we can compute the exponential of *X* by reducing to the previous two cases:

Note that we need the commutativity of *A* and *N* for the last step to work.

Another (closely related) method if the field is algebraically closed is to work with the Jordan form of *X*. Suppose that *X* = *PJP*^{ −1} where *J* is the Jordan form of *X*. Then

Also, since

Therefore, we need only know how to compute the matrix exponential of a Jordan block. But each Jordan block is of the form

where *N* is a special nilpotent matrix. The matrix exponential of this block is given by

### Evaluation by Laurent series

By virtue of the Cayley–Hamilton theorem the matrix exponential is expressible as a polynomial of order Template:Mvar−1.

If Template:Mvar and *Q _{t}* are nonzero polynomials in one variable, such that

*P*(

*A*) = 0, and if the meromorphic function

is entire, then

To prove this, multiply the first of the two above equalities by *P*(*z*) and replace Template:Mvar by Template:Mvar.

Such a polynomial *Q _{t}(z)* can be found as follows−−see Sylvester's formula. Letting Template:Mvar be a root of Template:Mvar,

*Q*is solved from the product of Template:Mvar by the principal part of the Laurent series of Template:Mvar at Template:Mvar: It is proportional to the relevant Frobenius covariant. Then the sum

_{a,t}(z)*S*of the

_{t}*Q*, where Template:Mvar runs over all the roots of Template:Mvar, can be taken as a particular

_{a,t}*Q*. All the other

_{t}*Q*will be obtained by adding a multiple of Template:Mvar to

_{t}*S*. In particular,

_{t}(z)*S*, the Lagrange-Sylvester polynomial, is the only

_{t}(z)*Q*whose degree is less than that of Template:Mvar.

_{t}**Example**: Consider the case of an arbitrary 2-by-2 matrix,

The exponential matrix e^{tA}, by virtue of the Cayley–Hamilton theorem, must be of the form

(For any complex number Template:Mvar and any * C*-algebra Template:Mvar, we denote again by Template:Mvar the product of Template:Mvar by the unit of Template:Mvar.) Let Template:Mvar and Template:Mvar be the roots of the characteristic polynomial of Template:Mvar,

Then we have

and hence

if *α* ≠ *β*; while, if *α* = *β*,

so that

Defining

we have

where sin(*qt*)/*q* is 0 if Template:Mvar = 0, and Template:Mvar if Template:Mvar = 0.
Thus,

Thus, as indicated above, the matrix Template:Mvar having decomposed into the sum of two mutually commuting pieces, the traceful piece and the traceless piece,

the matrix exponential reduces to a plain product of the exponentials of the two respective pieces. This is a formula often used in physics, as it amounts to the analog of Euler's formula for Pauli spin matrices, that is rotations of the doublet representation of the group SU(2).

The polynomial *S _{t}* can also be given the following "interpolation" characterization. Define

*e*, and Template:Mvar ≡ degTemplate:Mvar. Then

_{t}(z) ≡ e^{tz}*S*is the unique degree <

_{t}(z)*n*polynomial which satisfies

*S*=

_{t}^{(k)}(a)*e*whenever Template:Mvar is less than the multiplicity of Template:Mvar as a root of Template:Mvar. We assume, as we obviously can, that Template:Mvar is the minimal polynomial of Template:Mvar. We further assume that Template:Mvar is a diagonalizable matrix. In particular, the roots of Template:Mvar are simple, and the "interpolation" characterization indicates that

_{t}^{(k)}(a)*S*is given by the Lagrange interpolation formula, so it is the Lagrange−Sylvester polynomial .

_{t}At the other extreme, if *P* = *(z−a) ^{n}*, then

The simplest case not covered by the above observations is when with *a* ≠ *b*, which yields

### Evaluation by implementation of Sylvester's formula

A practical, expedited computation of the above reduces to the following rapid steps.
Recall from above that an *n*-by-*n* matrix exp(*tA*) amounts to a linear combination of the first Template:Mvar−1 powers of Template:Mvar by the Cayley-Hamilton theorem. For diagonalizable matrices, as illustrated above, e.g. in the 2 by 2 case, Sylvester's formula yields exp(*tA*) = *B _{α}* exp(

*tα*)+

*B*exp(

_{β}*tβ*), where the Template:Mvars are the Frobenius covariants of Template:Mvar.

It is easiest, however, to simply solve for these Template:Mvars directly, by evaluating this expression and its first derivative at Template:Mvar=0, in terms of Template:Mvar and Template:Mvar, to find the same answer as above.

But this simple procedure also works for defective matrices, in a generalization due to Buchheim.^{[9]} This is illustrated here for a 4-by-4 example of a matrix which is not diagonalizable, and the Template:Mvars are not projection matrices.

Consider

with eigenvalues *λ*_{1}=3/4 and *λ*_{2}=1, each with a
multiplicity of two.

Consider the exponential of each eigenvalue multiplied by Template:Mvar, exp(*λ _{i}t*). Multiply each such by the corresponding undetermined coefficient matrix

*B*

_{i}. If the eigenvalues have an algebraic multiplicity greater than 1, then repeat the process, but now multiplying by an extra factor of Template:Mvar for each repetition, to ensure linear independence. (If one eigenvalue had a multiplicity of three, then there would be the three terms: . By contrast, when all eigenvalues are distinct, the Template:Mvars are just the Frobenius covariants, and solving for them as below just amounts to the inversion of the Vandermonde matrix of these 4 eigenvalues.)

Sum all such terms, here four such:

To solve for all of the unknown matrices Template:Mvar in terms of the first three powers of Template:Mvar and the identity, we need four equations, the above one providing one such at Template:Mvar =0. Further, differentiate it with respect to Template:Mvar,

and again,

and once more,

(In the general case, Template:Mvar−1 derivatives need be taken.)

Setting Template:Mvar=0 in these four equations, the four coefficient matrices Template:Mvars may be solved for,

to yield

Substituting with the value for Template:Mvar yields the coefficient matrices

so the final answer is

The procedure is quite shorter than Putzer's algorithm sometimes utilized in such cases.

{{#invoke:see also|seealso}}

## Illustrations

Suppose that we want to compute the exponential of

Its Jordan form is

where the matrix *P* is given by

Let us first calculate exp(*J*). We have

The exponential of a 1×1 matrix is just the exponential of the one entry of the matrix, so exp(*J*_{1}(4)) = [*e*^{4}]. The exponential of *J*_{2}(16) can be calculated by the formula *e*^{(λI + N)} = *e*^{λ} *e*^{N} mentioned above; this yields^{[10]}

Therefore, the exponential of the original matrix *B* is

## Applications

### Linear differential equations

The matrix exponential has applications to systems of linear differential equations. (See also matrix differential equation.) Recall from earlier in this article that a *homogeneous* differential equation of the form

has solution *e*^{At} * y*(0).

If we consider the vector

we can express a system of *inhomogeneous* coupled linear differential equations as

Making an ansatz to use an integrating factor of *e*^{−At} and multiplying throughout, yields

The second step is possible due to the fact that, if *AB* = *BA*, then *e*^{At}*B* = *Be*^{At}. So, calculating *e*^{At} leads to the solution to the system, by simply integrating the third step in Template:Mvars.

#### Example (homogeneous)

Consider the system

The associated defective matrix is

The matrix exponential is

so that the general solution of the homogeneous system is

amounting to

#### Example (inhomogeneous)

Consider now the inhomogeneous system

We again have

and

From before, we already have the general solution to the homogeneous equation. Since the sum of the homogeneous and particular solutions give the general solution to the inhomogeneous problem, we now only need find the particular solution.

We have, by above,

which could be further simplified to get the requisite particular solution determined through variation of parameters.
Note **c** = **y**_{p}(0). For more rigor, see the following generalization.

### Inhomogeneous case generalization: variation of parameters

For the inhomogeneous case, we can use integrating factors (a method akin to variation of parameters). We seek a particular solution of the form **y**_{p}(*t*) = exp(*tA*) **z** (*t*) ,