Matrix Exponentials: Introduction- series for eat
First let us write down the Taylor series for eat for some number a: eat = 1 + at + (at) 2 2 + (at)3 6 + (at)4 24 + · · · = ∞ X k=0 (at)k k! . We differentiate this series term by term
d dt e at =0 + a + a2t + a3t2 2 + a4t3 6 + · · · =a 1 + at + (at) 2 2 + (at)3 6 + · · · ! = aeat.
Matrix exponentials: series for eA, etP
For an n × n matrix A we define the matrix exponential eA def= I + A + 1 2A 2 + 1 6A 3 + · · · + 1 k!A k + · · · Replacing A with tP (Pt and tP are the same),
etP = I + tP + (tP) 2 2 + (tP)3 6 + (tP)4 24 + · · · , so d dt etP = 0 + P + tP2 + t 2P3 2 + t3P4 6 + · · · = P I + tP + (tP) 2 2 + (tP)3 6 + · · · ! = PetP. We have d dt etP = PetP.
etP is a fundamental matrix
Theorem
Let P be an n × n matrix. Then the general solution to
~x0 = P~x (1)
is
~x = etP~c where ~c is an arbitrary constant vector.
That ~x = etP~c is a solution of (??) follows from
d
dt~x = dtd etP~c
= PetP~c = P~x.
To show that an arbitrary solution ~y of (??) can be represented by the formula etP~c, choose ~c = ~y (0). Both ~x(t) = etP~y (0) and ~y (t) satisfy the same initial value problem ~x0 = P~x, ~x(0) = ~y (0).
There is a uniqueness theorem for solutions of initial value
problems for the homogeneous system (??), and so ~y = etP~c. It follows that the formula ~y = etP~c is a general solution,
Non-commutativity: in general eA+B 6= eAeB
Matrices do not in general commute, that is, in general AB 6= BA. If you write out the Taylor series for eA+B and compare with the product of the Taylor series for eA and eB, you will see why the lack of commutativity is a problem.
As a consequence, in general eA+B 6= eAeB.
However, it is true that if A and B commute, that is if AB = BA, then eA+B = eAeB.
We will find this fact useful. Let us restate this as a theorem to make a point.
Theorem
If AB = BA, then eA+B = eAeB. Otherwise, eA+B 6= eAeB in general.
Simple cases
In some instances it may work to just plug into the series definition. Suppose the matrix is diagonal. For example, D = a 00 b . Then
D2 = a2 0 0 b2 , Dk = ak 0 0 bk for k = 1, 2, 3, ..., and eD = I + D + 1 2D 2 + 1 6D 3 + · · · = 1 0 0 1 + a 0 0 b + 1 2 a2 0 0 b2 + 1 6 a3 0 0 b3 + · · · = ea 0 0 eb . For b = a this gives in particular
eaI = ea 0 0 ea , e0I = e0 0 0 e0 = I , and eI = e 0 0 e .
Simple cases (ctd 1)
The makes exponentials of certain other matrices easy to compute. Take A = −1 15 4 which has eigenvalue λ = 3 of multiplicity 2.
Let B = A− 3I = −1 −22 4 . Then A can be written as A = 3I + B . Notice that B2 = −1 −22 4 −1 −22 4 = [ 0 00 0 ].
So Bk = 0 for all k ≥ 2.
Therefore, eB = I + B, and similarly etB = I + tB for any t. We actually want to solve ~x0 = A~x by computing etA.
The matrices 3tI and tB commute, so etA = e3tI +tB = e3tIetB = e3t 0 0 e3t (I + tB) = = e3t 0 0 e3t 1 + 2t 4t −t 1 − 2t = (1 + 2t) e3t 4te3t −te3t (1 − 2t) e3t .
Solutions of systems with defective eigenvalues
We found a fundamental matrix solution for the system ~x0 = A~x, where A = −1 15 4
Note that this matrix has a repeated eigenvalue with a defect; there is only one eigenvector for the eigenvalue 3. So we found a perhaps easier way to handle this case.
In general if a matrix A is 2 × 2 and has an eigenvalue λ of
multiplicity 2, then either A = λI (in the case λ not defective), or A = λI + B where B 6= 0 but B2 = 0 (λ has defect 1). The same technique usd to calculate etA in the example above applies. Matrices B such that Bk = 0 for some k are called nilpotent.
Examples of nilpotent matrices include B = −1 −22 4 , B = [0 10 0 ], B = h 0 1 00 0 1
0 0 0
i
Computating the matrix exponential for nilpotent matrices is easy. Write down the Taylor series: after k terms the remaining terms in the series all vanish.
A useful matrix exponential identity
For square matrices A and B, with B invertible, we have eBAB−1 = BeAB−1.
This can be seen by writing down the Taylor series. First
(BAB−1)2 = BAB−1BAB−1 = BAIAB−1 = BA2B−1. By the same reasoning (BAB−1)k = BAkB−1, k = 1, 2, · · · Now write the Taylor series for eBAB−1:
eBAB−1 = I + BAB−1 + 1 2(BAB −1)2 + 1 6(BAB −1)3 + · · · = BB−1 + BAB−1 + 1 2BA 2B−1 + 1 6BA 3B−1 + · · · = B I + A + 1 2A 2 + 1 6A 3 + · · · B−1 = BeAB−1.
Diagonalization of a square matrix A
Given a square matrix A, we can usually write A = EDE−1, where D is diagonal and E invertible. This is called diagonalization.
If we can do that, the computation of the exponential becomes easy, as eD is just taking the exponential of the entries on the diagonal. Adding t into the mix, we can then compute the
exponential
etA = EetDE−1.
which is of interest because it is the fundamental matrix for ~x0 = A~x.
Diagonalization of a square matrix A (ctd 1)
To diagonalize A we need n linearly independent eigenvectors of A. Let E be the matrix with the eigenvectors as columns. Then
E = [ ~v1 ~v2 · · · ~vn ], where ~v1, ~v2, . . . , ~vn are the eigenvectors.
Let λ1, λ2, . . . , λn be the eigenvalues and let , then Make a diagonal matrix D with the eigenvalues on the diagonal:
D = λ1 0 · · · 0 0 λ2 · · · 0 .. . ... . .. ... 0 0 · · · λn . We compute AE = A[ ~v1 ~v2 · · · ~vn ] = [ A~v1 A~v2 · · · A~vn ] = [ λ1~v1 λ2~v2 · · · λn~vn ]
= [ ~v1 ~v2 · · · ~vn ]D
Diagonalization of a square matrix A (ctd 2)
The columns of E are linearly independent as these are linearly independent eigenvectors of A. Hence E is invertible. Since AE = ED, we multiply on the right by E−1 and we get
A = EDE−1.
This formula is the diagonalization of A. Multiplying by t gives tA = E (tD)E−1 as the diagonalization of tA. Then by the matrix exponential identity above,
etA = EetDE−1 = E eλ1t 0 · · · 0 0 eλ2t · · · 0 .. . ... . .. ... 0 0 · · · eλnt E −1. (2)
Equation (??) is the formula for computing a fundamental matrix solution etA for the system ~x0 = A~x, in the case where we have n linearly independent eigenvectors.
Approximations
The Taylor series expansion actually gives a way to approximate solutions The simplest thing we can do is to just compute the
series up to a certain number of terms. In many cases a 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 A = [1 22 1 ].
etA ≈ I +tA+t 2 2 A 2+t3 6 A 3 = I +t " 1 2 2 1 # +t2 "5 2 2 2 52 # +t3 "13 6 7 3 7 3 136 # = = " 1 + t + 52 t2 + 136 t3 2 t + 2 t2 + 73 t3 2 t + 2 t2 + 73 t3 1 + t + 52 t2 + 136 t3 # . Just like the scalar version of the Taylor series approximation, the approximation will be better for small t and worse for larger t.
Approximations (ctd 1)
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) e0.1 A ≈ I +0.1 A+ 0.1 2 2 A 2+ 0.13 6 A 3 = 1.12716667 0.22233333 0.22233333 1.12716667 . And plugging t = 0.1 into the real solution (rounded to 8 decimal laces) we get e0.1 A = 1.12734811 0.22251069 0.22251069 1.12734811 . Not bad at all!