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
as usual. Now suppose that this was one equation ( is a number or a matrix). Then the solution to this would be
That doesn’t make sense if is a larger matrix, but essentially the same computation that led to the above works for matrices when we define properly. First let us write down the Taylor series for for some number .
Recall is the factorial, and . We differentiate this series term by term
Maybe we can try the same trick with matrices. Suppose that for an matrix we define the matrix exponential as
Let us not worry about convergence. The series really does always converge. We usually write as by convention when is a matrix. With this small change and by the exact same calculation as above we have that
Now and hence is an matrix. What we are looking for is a vector. We note that in the 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 .
Let us check.
Hence is 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 , we take the solution
This equation follows because , so .
We mention a drawback of matrix exponentials. In general . The trouble is that matrices do not commute, that is, in general . If you try to prove using the Taylor series, you will see why the lack of commutativity becomes a problem. However, it is still true that if , that is, if and commute, then . 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, . Then
and
So by this rationale we have that
This makes exponentials of certain other matrices easy to compute. Notice for example that the matrix can be written as where . Notice that . So for all . Therefore, . Suppose we actually want to compute . The matrices and commute (exercise: check this) and , since . We write
So we have found the fundamental matrix solution for the system . 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 is and has an eigenvalue of multiplicity 2, then either is diagonal, or where . This is a good exercise.
Matrices such that for some are called nilpotent. Computation of the matrix exponential for nilpotent matrices is easy by just writing down the first 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 and , with invertible, we have
This can be seen by writing down the Taylor series. First note that
And hence by the same reasoning . Now write down the Taylor series for .
Given a square matrix , we can sometimes write , where is diagonal and invertible. This procedure is called diagonalization. If we can do that, the computation of the exponential becomes easy. Adding into the mix we see that we can then easily compute the exponential
To diagonalize we will need linearly independent eigenvectors of . 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 be the matrix with the eigenvectors as columns. Let be the eigenvalues and let be the eigenvectors, then . Let be the diagonal matrix with the eigenvalues on the main diagonal. That is
We compute
The columns of are linearly independent as these are linearly independent eigenvectors of . Hence is invertible. Since , we right multiply by and we get
This means that. Multiplying the matrix by we obtain
The formula (3.8.1), therefore, gives the formula for computing the fundamental matrix solution for the system , in the case where we have 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 is real, then 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 . The fundamental matrix solution of a system of ODEs is not unique. The exponential is the fundamental matrix solution with the property that for we get the identity matrix. So we must find the right fundamental matrix solution. Let be any fundamental matrix solution to . Then we claim
Clearly, if we plug into 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 .
Approximations
If you think about it, the computation of any fundamental matrix solution using the eigenvalue method is just as difficult as the computation of . 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 terms of the series for the matrix .
Just like the scalar version of the Taylor series approximation, the approximation will be better for small and worse for larger . For larger , we will generally have to compute more terms. Let us see how we stack up against the real solution with . The approximate solution is approximately (rounded to decimal places)
And plugging into the real solution (rounded to decimal places) we get
Not bad at all! Although if we take the same approximation for we get
while the real value is (again rounded to decimal places)
So the approximation is not very good once we get up to . To get a good approximation at (say up to decimal places) we would need to go up to the 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.