The Exponential of a Matrix
Total Page:16
File Type:pdf, Size:1020Kb
5-28-2012 The Exponential of a Matrix The solution to the exponential growth equation dx kt = kx is given by x = c e . dt 0 It is natural to ask whether you can solve a constant coefficient linear system ′ ~x = A~x in a similar way. If a solution to the system is to have the same form as the growth equation solution, it should look like At ~x = e ~x0. The first thing I need to do is to make sense of the matrix exponential eAt. The Taylor series for ez is ∞ n z z e = . n! n=0 X It converges absolutely for all z. It A is an n × n matrix with real entries, define ∞ n n At t A e = . n! n=0 X The powers An make sense, since A is a square matrix. It is possible to show that this series converges for all t and every matrix A. Differentiating the series term-by-term, ∞ ∞ ∞ ∞ n−1 n n−1 n n−1 n−1 m m d At t A t A t A t A At e = n = = A = A = Ae . dt n! (n − 1)! (n − 1)! m! n=0 n=1 n=1 m=0 X X X X At ′ This shows that e solves the differential equation ~x = A~x. The initial condition vector ~x(0) = ~x0 yields the particular solution At ~x = e ~x0. This works, because e0·A = I (by setting t = 0 in the power series). Another familiar property of ordinary exponentials holds for the matrix exponential: If A and B com- mute (that is, AB = BA), then A B A B e e = e + . You can prove this by multiplying the power series for the exponentials on the left. (eA is just eAt with t = 1.) Example.Compute eAt if 2 0 A = . 0 3 Compute the successive powers of A: n 2 0 2 4 0 n 2 0 A = , A = , ...,A = n . 0 3 0 9 0 3 1 Therefore, n ∞ ∞ (2t) n n n 0 2t At t 2 0 =0 n! e 0 e = n = = t . n e3 n n! 0 3 P ∞ (3t) 0 =0 0 n X =0 n! P You can compute the exponential of an arbitrary diagonal matrix in the same way: λ1t λ1 0 ··· 0 e 0 ··· 0 λ2t 0 λ2 ··· 0 At 0 e ··· 0 A = . , e = . . eλnt 0 0 ··· λn 0 0 ··· Example. Compute eAt if 1 2 A = . 0 1 Compute the successive powers of A: 1 2 1 4 1 6 n 1 2n A = , A2 = , A3 = , ...,A = . 0 1 0 1 0 1 0 1 Hence, n n ∞ ∞ t ∞ 2nt n n n t t A t 1 2n =0 n! =0 n! e 2te e = = n = t . n! 0 1 ∞ t 0 e n=0 P P 0 n=0 X n! Here’s where the last equality came from: P ∞ n t t = e , n! n=0 X ∞ ∞ ∞ n n−1 m 2nt t t t = 2t = 2t = 2te . n! (n − 1)! m! n=0 n=1 m=0 X X X Example. Compute eAt, if 3 −10 A = . 1 −4 If you compute powers of A as in the last two examples, there is no evident pattern. Therefore, it would be difficult to compute the exponential using the power series. Instead, set up the system whose coefficient matrix is A: ′ x = 3x − 10y, ′ y = x − 4y. The solution is t − t 1 t 1 − t x = c e + c e 2 , y = c e + c e 2 . 1 2 5 1 2 2 2 Next, note that if B is a 2 × 2 matrix, 1 0 B = first column of B and B = second column of B. 0 1 In particular, this is true for eAt. Now At ~x = e ~x0 is the solution satisfying ~x(0) = ~x0, but t −2t c1e + c2e ~x = 1 1 . c et + c e−2t " 5 1 2 2 # Set ~x(0) = (1, 0) to get the first column of eAt: 1 c1 + c2 = 1 1 . 0 c + c " 5 1 2 2 # 5 2 Hence, c = , c = − . So 1 3 2 3 5 t 2 −2t x e − e = 3 3 . y 1 t 1 − t e − e 2 3 3 Set ~x(0) = (0, 1) to get the second column of eAt: 0 c1 + c2 = 1 1 . 1 c + c " 5 1 2 2 # 10 10 Therefore, c = − , c = . Hence, 1 3 2 3 10 t 10 −2t x − e + e = 3 3 . y 2 t 5 − t − e + e 2 3 3 Therefore, 5 2 10 10 et − e−2t − et + e−2t At e = 3 3 3 3 . 1 1 2 5 et − e−2t − et + e−2t 3 3 3 3 I found eAt, but I had to solve a system of differential equations in order to do it. In some cases, it’s possible to use linear algebra to compute the exponential of a matrix. An n × n matrix A is diagonalizable if it has n independent eigenvectors. (This is true, for example, if A has n distinct eigenvalues.) Suppose A is diagonalizable with independent eigenvectors ~v1,...,~vn and corresponding eigenvalues λ1,...,λn. Let S be the matrix whose columns are the eigenvectors: ↑ ↑ ↑ S = ~v ~v ··· ~vn . 1 2 ↓ ↓ ↓ 3 Then λ1 0 ··· 0 − 0 λ2 ··· 0 S 1AS = . = D. 0 0 ··· λn As I observed above, eλ1t 0 ··· 0 λ2t Dt 0 e ··· 0 e = . . eλnt 0 0 ··· On the other hand, since (S−1AS)n = S−1AnS, ∞ ∞ n −1 n n n Dt t (S AS) − t A − At e = = S 1 S = S 1e S. n! n! n=0 n=0 ! X X Hence, eλ1t 0 ··· 0 λ2t At 0 e ··· 0 − e = S . S 1. eλnt 0 0 ··· I can use this approach to compute eAt in case A is diagonalizable. Example. Compute eAt if 3 5 A = . 1 −1 The eigenvalues are λ =, λ = −2. Since there are two different eigenvalues and A is a 2 matrix, A is diagonalizable. The corresponding eigenvectors are (5, 1) and (−1, 1). Thus, 5 −1 − 1 1 1 S = , S 1 = . 1 1 6 −1 5 Hence, 4t 4t −2t 4t −2t At 5 −1 e 0 1 1 1 1 5e + e 5e − 5e e = − t = t − t t − t . 1 1 0 e 2 6 −1 5 6 e4 − e 2 e4 + 5e 2 Example. Compute eAt if 5 −6 −6 A = −1 4 2 . 3 −6 −4 The eigenvalues are λ = 1 and λ = 2 (double). The corresponding eigenvectors are (3, −1, 3) for λ = 1, and (2, 1, 0) and (2, 0, 1) for λ = 2. Since I have 3 independent eigenvectors, the matrix is diagonalizable. I have 3 2 2 −1 2 2 − S = −1 1 0 , S 1 = −1 3 2 . 3 0 1 3 −6 −5 4 From this, it follows that −3et + 4e2t 6et − 6e2t 6et − 6e2t At e = et − e2t −2et + 3e2t −2et + 2e2t . t t t t t t −3e + 3e2 6e − 6e2 6e − 5e2 Here’s a quick check on the computation: If you set t = 0 in the right side, you get 1 0 0 0 1 0 . 0 0 1 This checks, since eA·0 = I. Note that this check isn’t foolproof — just because you get I by setting t = 0 doesn’t mean your answer is right. However, if you don’t get I, your answer is surely wrong! How do you compute eAt is A is not diagonalizable? I’ll describe an iterative algorithm for computing eAt that only requires that one know the eigenvalues of A. There are various algorithms for computing the matrix exponential; this one, which is due to Williamson [1], seems to me to be the easiest for hand computation. (Note that finding the eigenvalues of a matrix is, in general, a difficult problem: Any method for finding eAt will have to deal with it.) Let A be an n × n matrix. Let {λ1,λ2,...,λn} be a list of the eigenvalues, with multiple eigenvalues repeated according to their multiplicity. Let λ1t a1 = e , t λkt λk(t−u) ak = e ⋆ak−1(t) = e ak−1(u) du, k = 2, . , n, Z0 B1 = I, Bk =(A − λk−1I) · Bk−1, k = 2, . , n, Then At e = a1B1 + a2B2 + ... + anBn. To prove this, I’ll show that the expression on the right satisfies the differential equation ~x ′ = A~x. To do this, I’ll need two facts about the characteristic polynomial p(x). 1. (x − λ1)(x − λ2) ··· (x − λn) = ±p(x). 2. (Cayley-Hamilton Theorem) p(A) = 0. Observe that if p(x) is the characteristic polynomial, then using the first fact and the definition of the B’s, p(x) = ±(x − λ1)(x − λ2) ··· (x − λn) p(A) = ±(A − λ1I)(A − λ2I) ··· (A − λnI) = ±I(A − λ1I)(A − λ2I) ··· (A − λnI) = ±B1(A − λ1I)(A − λ2I) ··· (A − λnI) = ±B2(A − λ2I) ··· (A − λnI) . = ±Bn(A − λnI) 5 By the Cayley-Hamilton Theorem, ±Bn(A − λnI) = 0. (∗) I will use this fact in the proof below. Example. I’ll illustrate the Cayley-Hamilton theorem with the matrix 2 3 A = . 2 1 The characteristic polynomial is (2 − λ)(1 − λ) − 6 = λ2 − 3λ − 4. The Cayley-Hamilton theorem asserts that if you plug A into λ2 − 3λ − 4, you’ll get the zero matrix. First, 2 3 2 3 10 9 A2 = = . 2 1 2 1 6 7 Therefore, 10 9 6 9 4 0 0 0 A2 − A − 4I = − − = .