Login
📚 Differential Equations for Engineers
Chapters ▾
⇩ Download ▾

3.8 Matrix exponentials

Definition

In this section we present a different way of finding the fundamental matrix solution of a system. Suppose that we have the constant coefficient equation

x = P x

as usual. Now suppose that this was one equation (P is a number or a 1×1 matrix). Then the solution to this would be

x = e P t .

That doesn’t make sense if P is a larger matrix, but essentially the same computation that led to the above works for matrices when we define ePt properly. First let us write down the Taylor series for eatfor some number a.

e a t = 1 + a t + ( a t ) 2 2 + ( a t ) 3 6 + ( a t ) 4 24 + = k = 0 ( a t ) k k !

Recall k!=1·2·3k is the factorial, and 0!=1. We differentiate this series term by term

d d t ( e a t ) = a + a 2 t + a 3 t 2 2 + a 4 t 3 6 + = a ( 1 + a t ( a t ) 2 2 + ( a t ) 3 6 + ) = a e a t .

Maybe we can try the same trick with matrices. Suppose that for an n×n matrix A we define the matrix exponential as

e A = def 𝐼 + A + 1 2 A 2 + 1 6 A 3 + + 1 k ! A k +

Let us not worry about convergence. The series really does always converge. We usually write Ptas tP by convention when P is a matrix. With this small change and by the exact same calculation as above we have that

d d t ( e t P ) = P e t P .

Now P and hence etP is an n×n matrix. What we are looking for is a vector. We note that in the 1×1 case we would at this point multiply by an arbitrary constant to get the general solution. In the matrix case we multiply by a column vector c.

Let us check.

d d t x = d d t ( e t P c ) = P e t P c = P x .

Hence etPis the fundamental matrix solution of the homogeneous system. If we find a way to compute the matrix exponential, we will have another method of solving constant coefficient homogeneous systems. It also makes it easy to solve for initial conditions. To solve x=Ax, x(0)=b we take the solution

x = e t A b

This equation follows because e0A=𝐼, so x(0)=e0Ab=b.

We mention a drawback of matrix exponentials. In general eA+BeAeB. The trouble is that matrices do not commute, that is, in general ABBA. If you try to prove eA+BeAeB using the Taylor series, you will see why the lack of commutativity becomes a problem. However, it is still true that if AB=BA, that is, if A and B commute, then eA+B=eAeB. We will find this fact useful. Let us restate this as a theorem to make a point.

Simple cases

In some instances it may work to just plug into the series definition. Suppose the matrix is diagonal. For example, D=[a00b]. Then

D k = [ a k 0 0 b k ]

and

e D = 𝐼 + D + 1 2 D 2 + 1 6 D 3 + = [ 1 0 0 1 ] + [ a 0 0 b ] + 1 2 [ a 2 0 0 b 2 ] + 1 6 [ a 3 0 0 b 3 ] + = [ e a 0 0 e b ]

So by this rationale we have that

e 𝐼 = [ e 0 0 e ] and e a 𝐼 = [ e a 0 0 e a ]

This makes exponentials of certain other matrices easy to compute. Notice for example that the matrix A=[5411] can be written as 3I+B where 𝐵=[2412]. Notice that B2=[0000]. So Bk=0 for all k2. Therefore, eB=I+B. Suppose we actually want to compute etA. The matrices 3tI and tB commute (exercise: check this) and etB=I+tB, since (tB)2=t2B2=0. We write

e t A = e 3 t I + t 𝐵 = e 3 t 𝐼 e t 𝐵 = [ e 3 t 0 0 e 3 t ] ( I + t B ) = [ e 3 t 0 0 e 3 t ] [ 1 + 2 t 4 t t 1 2 t ] = [ ( 1 + 2 t ) e 3 t 4 t e 3 t t e 3 t ( 1 2 t ) e 3 t ]

So we have found the fundamental matrix solution for the system x=Ax. Note that this matrix has a repeated eigenvalue with a defect; there is only one eigenvector for the eigenvalue 3. So we have found a perhaps easier way to handle this case. In fact, if a matrix A is 2×2 and has an eigenvalue λ of multiplicity 2, then either A is diagonal, or A=λ𝐼+B where B2=0. This is a good exercise.

Matrices B such that Bk=0 for some k are called nilpotent. Computation of the matrix exponential for nilpotent matrices is easy by just writing down the first k terms of the Taylor series.

General Matrices

In general, the exponential is not as easy to compute as above. We usually cannot write a matrix as a sum of commuting matrices where the exponential is simple for each one. But fear not, it is still not too difficult provided we can find enough eigenvectors. First we need the following interesting result about matrix exponentials. For two square matrices A and B, with B invertible, we have

e B A B 1 = B e A B 1 .

This can be seen by writing down the Taylor series. First note that

( B A B 1 ) 2 = B A B 1 B A B 1 = B A 𝐼 A B 1 = B A 2 B 1

And hence by the same reasoning (BAB1)k=BAkB1. Now write down the Taylor series for eBAB1.

e B A B 1 = 𝐼 + B A B 1 + 1 2 ( B A B 1 ) 2 + 1 6 ( B A B 1 ) 3 + = B B 1 + B A B 1 + 1 2 B A 2 B 1 + 1 6 B A 3 B 1 + = B ( 𝐼 + A + 1 2 A 2 + 1 6 A 3 + ) B 1 = B e A B 1 .

Given a square matrix A, we can sometimes write A=EDE1, where D is diagonal and E invertible. This procedure is called diagonalization. If we can do that, the computation of the exponential becomes easy. Adding t into the mix we see that we can then easily compute the exponential

e t A = E e t D E 1 .

To diagonalize A we will need n linearly independent eigenvectors of A. Otherwise this method of computing the exponential does not work and we need to be trickier, but we will not get into such details. We let E be the matrix with the eigenvectors as columns. Let λ1,λ2,,λn be the eigenvalues and let v1,v2,,vn be the eigenvectors, then E=[v1  v2    vn]. Let D be the diagonal matrix with the eigenvalues on the main diagonal. That is

D = [ λ 1 0 0 0 λ 2 0 0 0 λ n ]

We compute

A E = A [ v 1 v 2 v n ] = [ A v 1 A v 2 A v 3 ] = [ λ 1 v 1 λ 2 v 2 λ n v n ] = [ v 1 v 2 v n ] D = E D .

The columns of E are linearly independent as these are linearly independent eigenvectors of A. Hence E is invertible. Since AE=ED, we right multiply by E1 and we get

A = E D E 1 .

This means that. eA=EeDE1 Multiplying the matrix by t we obtain

e t A = E e t D E 1 = E [ e λ 1 t 0 0 0 e λ 2 t 0 0 0 e λ n t ] E 1

(3.8.1)

The formula (3.8.1), therefore, gives the formula for computing the fundamental matrix solution etA for the system x=Ax, in the case where we have n linearly independent eigenvectors.

Notice that this computation still works when the eigenvalues and eigenvectors are complex, though then you will have to compute with complex numbers. It is clear from the definition that if A is real, then etA is real. So you will only need complex numbers in the computation and you may need to apply Euler’s formula to simplify the result. If simplified properly the final matrix will not have any complex numbers in it.

Fundamental Matrix Solutions

We note that if you can compute the fundamental matrix solution in a different way, you can use this to find the matrix exponential etA. The fundamental matrix solution of a system of ODEs is not unique. The exponential is the fundamental matrix solution with the property that for t=0 we get the identity matrix. So we must find the right fundamental matrix solution. Let X be any fundamental matrix solution to x=Ax. Then we claim

e t A = X ( t ) [ X ( 0 ) ] 1 .

Clearly, if we plug t=0 into X(t)[X(0)]1 we get the identity. We can multiply a fundamental matrix solution on the right by any constant invertible matrix and we still get a fundamental matrix solution. All we are doing is changing what the arbitrary constants are in the general solution x(t)=X(t)c.

Approximations

If you think about it, the computation of any fundamental matrix solution X using the eigenvalue method is just as difficult as the computation of etA. So perhaps we did not gain much by this new tool. However, the Taylor series expansion actually gives us a very easy way to approximate solutions, which the eigenvalue method did not.

The simplest thing we can do is to just compute the series up to a certain number of terms. There are better ways to approximate the exponentialto the power 1. In many cases however, few terms of the Taylor series give a reasonable approximation for the exponential and may suffice for the application. For example, let us compute the first 4 terms of the series for the matrix 1221.

e t A I + t A + t 2 2 A 2 + t 3 6 A 3 = I + t [ 1 2 2 1 ] + t 2 [ 5 2 2 2 5 2 ] + t 3 [ 13 6 7 3 7 3 13 6 ] = = [ 1 + t + 5 2 t 2 + 13 6 t 3 2 t + 2 t 2 + 7 3 t 3 2 t + 2 t 2 + 7 3 t 3 1 + t + 5 2 t 2 + 13 6 t 3 ] .

Just like the scalar version of the Taylor series approximation, the approximation will be better for small t and worse for larger t. For larger t, we will generally have to compute more terms. Let us see how we stack up against the real solution with t=0.1. The approximate solution is approximately (rounded to 8 decimal places)

e 0.1 A 𝐼 + 0.1 A + 0.1 2 2 + 0.1 3 6 A 3 = [ 1.12716667 0.22233333 0.22233333 1.12716667 ]

And plugging t=0.1 into the real solution (rounded to 8 decimal places) we get

e 0.1 A = [ 1.12734811 0.22251069 0.22251069 1.12734811 ]

Not bad at all! Although if we take the same approximation for t=1 we get

𝐼 + A + 1 2 A 2 + 1 6 A 3 = [ 6.66666667 6.33333333 6.33333333 6.66666667 ]

while the real value is (again rounded to 8 decimal places)

e A = [ 10.22670818 9.85882874 9.85882874 10.22670818 ]

So the approximation is not very good once we get up to t=1. To get a good approximation at t=1 (say up to 2 decimal places) we would need to go up to the 11th power (exercise).

Footnotes

[1] C. Moler and C.F. Van Loan, Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later, SIAM Review 45 (1), 2003, 3–49

Adapted from Differential Equations for Engineers by Jiří Lebl (Oklahoma State University), hosted on LibreTexts (math.libretexts.org) and licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.