Skip to article frontmatterSkip to article content

7.3 Matrix Exponential

power series of a matrix

Dept. of Electrical and Systems Engineering
University of Pennsylvania

Binder

Lecture notes

1Reading

Material related to this page, as well as additional exercises, can be found in ALA 10.4.

2Learning Objectives

By the end of this page, you should know:

  • how to define the matrix exponential as a power series,
  • how to solve linear ODEs with the matrix exponential,
  • how to compute the matrix exponential.

3Defining the Matrix Exponential

We’ve seen four cases for eigenvalues/eigenvectors and their relationship to solutions of initial value problems defined by x˙=Ax\dot{\mathbf{x}} = A\mathbf{x} and x(0)\mathbf{x}(0) given:

  1. real distinct eigenvalues, solved by diagonalization;
  2. real repeated eigenvalues with algebraic multiplicity = geometric multiplicity, also solved by diagonalization;
  3. complex distinct eigenvalues, solved by diagonalization and applying Euler’s formula to define real-valued eigenfunctions;
  4. repeated eigenvalues with algebraic multiplicity > geometric multiplicity, solved by Jordan decomposition using generalized eigenvectors.

While correct, the fact that there are four different cases we need to consider is somewhat unsatisfying. In this section, we show that by appropriately defining a matrix exponential, we can provide a unified treatment of all the aforementioned settings.

We start by recalling the power series definition for the scalar exponential exe^x, for xRx \in \mathbb{R}:

ex=1+x+x22!+x33!+=k=0xkk!,(PS)e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots = \sum_{k=0}^{\infty} \frac{x^k}{k!}, \quad (\text{PS})

where we recall that k!=12(k1)kk! = 1 \cdot 2 \cdots (k-1) \cdot k. We know that for the scalar initial value problem x˙=ax\dot{x} = ax, the solution is x(t)=eatx(0)x(t) = e^{at}x(0), where eate^{at} can be computed via (PS) by setting x=atx = at.

Wouldn’t it be cool if we could do something similar for the vector valued initial value problem defined by x˙=Ax\dot{\mathbf{\vv x}} = A\mathbf{\vv x}? Does there exist a function, call it eAte^{At}, so that x(t)=eAtx(0)\mathbf{x}(t) = e^{At}\mathbf{x}(0)? How would we even begin to define such a thing?

Let’s do the “obvious” thing and start with the definition (PS), and replace the scalar xx with a matrix XX to obtain the matrix exponential of X:

eX=I+X+X22!+X33!+=k=0Xkk!,(MPS)e^X = I + X + \frac{X^2}{2!} + \frac{X^3}{3!} + \cdots = \sum_{k=0}^{\infty} \frac{X^k}{k!}, \quad (\text{MPS})

Although we can’t prove it yet, it can be shown that (MPS) converges for any XX, so this is a well defined object. Does (MPS) help with solving x˙=Ax\dot{\mathbf{\vv x}} = A\mathbf{\vv x}? Let’s try the test solution x(t)=eAtx(0)\mathbf{\vv x}(t) = e^{At}\mathbf{\vv x}(0) — this is exactly what we did for the scalar setting, but we replace eate^{at} with eAte^{At}. Is this a solution to x˙=Ax\dot{\mathbf{\vv x}} = A\mathbf{\vv x}?

First, we compute Ax(t)=AeAtx(0)A\mathbf{\vv x}(t) = Ae^{At}\mathbf{\vv x}(0). Next, we need to compute ddteAtx(0)\frac{d}{dt}e^{At}\mathbf{\vv x}(0). But how do we do this? We will rely on (MPS):

ddteAtx(0)=ddt(I+At+(At)22!+(At)33!+)=ddtI+ddtAt+ddtA2t22!+ddtA3t33!+=0+A+A2t+A3t22+=A+A2t+A3t22!+A4t33!+=A(I+At+A2t22!+A3t33!+)=AeAtx(0).\begin{align*} \frac{d}{dt} e^{At} \vv x(0) &= \frac{d}{dt} \left(I + At + \frac{(At)^2}{2!} + \frac{(At)^3}{3!} + \cdots\right) \\ &= \frac{d}{dt}I + \frac{d}{dt}At + \frac{d}{dt}\frac{A^2t^2}{2!} + \frac{d}{dt}\frac{A^3t^3}{3!} + \cdots \\ &= 0 + A + A^2t + A^3\frac{t^2}{2} + \cdots \\ &= A + A^2t + \frac{A^3t^2}{2!} + \frac{A^4t^3}{3!} + \cdots \\ &= A\left(I + At + \frac{A^2t^2}{2!} + \frac{A^3t^3}{3!} + \cdots\right) \\ &= A e^{At} \vv x(0). \end{align*}

This worked, and we have found a general solution to x˙=Ax\dot{\vv x} = \vv Ax defined in terms of the matrix exponential!

This is very satisfying, as now our scalar and vector-valued problems have similar looking solutions defined in terms of appropriate exponential functions. The only thing that remains is to compute eAte^{At}! How do we do this? This is where all of the work we’ve done on diagonalization and Jordan forms really pays off!

4Computing the Matrix Exponential

4.1Case 1: Real eigenvalues, diagonalizable AA

Suppose that ARn×nA \in \mathbb{R}^{n\times n} and has eigenvalues λ1,λ2,,λn\lambda_1, \lambda_2, \ldots, \lambda_n with corresponding linearly independent eigenvectors v1,v2,,vn \vv v_1, \vv v_2, \ldots,\vv v_n. Then we can write

A=VΛV1, for V=[v1,v2,,vn] and Λ=diag(λ1,λ2,,λn).A = V \Lambda V^{-1}, \text{ for } V = \bm \vv v_1, \vv v_2, \ldots, \vv v_n\em \text{ and } \Lambda = \text{diag}(\lambda_1, \lambda_2, \ldots, \lambda_n).

To compute eAte^{At} we need to compute powers (At)k(At)^k. Let’s work a few of these out using A=VΛV1A = V\Lambda V^{-1}:

(At)0=I,At=VΛV1t,A2t2=(VΛV1)(VΛV1)t2,A3t3=(VΛV1)A2t3=VΛ2V1t2=(VΛV1)(VΛ2V1)t3=VΛ3V1t3\begin{align*} (At)^0 = I, \quad At = V\Lambda V^{-1}t, \quad A^2t^2 &= (V\Lambda V^{-1})(V\Lambda V^{-1})t^2, & A^3t^3 &= (V\Lambda V^{-1})A^2t^3 \\ &= V\Lambda^2 V^{-1}t^2 & &=(V\Lambda V^{-1})(V\Lambda^2 V^{-1})t^3 \\ & & &= V\Lambda^3 V^{-1}t^3 \end{align*}

There is a pattern: (At)k=VΛkV1tk(At)^k = V \Lambda^k V^{-1} t^k. This is nice, since computing powers of diagonal matrices is easy:

Λk=[λ1λn]k=[λ1kλnk]. \Lambda^k = \begin{bmatrix} \lambda_1 & & \\ & \ddots & \\ & & \lambda_n \end{bmatrix}^k = \begin{bmatrix} \lambda_1^k & & \\ & \ddots & \\ & & \lambda_n^k \end{bmatrix}.

Let’s plug these expressions into (MPS):

eAt=I+At+A2t22!+A3t33!+=VV1+VΛV1t+VΛ2V1t22!+VΛ3V1t33!+=V(I+Λt+Λ2t22!+Λ3t33!+)V1(factor out V()V1)=V(diag(1+λ1t+λ12t22!+λ13t33!,,1+λnt+λn2t22!+λn3t33!))V1=V[eλ1teλnt]V1(we recognize 1+λit+λi2t22!+ as (PS))\begin{align*} e^{At} &= I + At + \frac{A^2t^2}{2!} + \frac{A^3t^3}{3!} + \cdots \\ &= VV^{-1} + V\Lambda V^{-1}t + V\Lambda^2 V^{-1}\frac{t^2}{2!} + V\Lambda^3 V^{-1}\frac{t^3}{3!} + \cdots \\ &= V\left(I + \Lambda t + \frac{\Lambda^2 t^2}{2!} + \frac{\Lambda^3 t^3}{3!} + \cdots\right)V^{-1} \quad \text{(factor out } V(\cdot)V^{-1}\text{)} \\ &= V\left(\text{diag}\left(1+\lambda_1t+\frac{\lambda_1^2t^2}{2!}+\frac{\lambda_1^3t^3}{3!}, \ldots, 1+\lambda_nt+\frac{\lambda_n^2t^2}{2!}+\frac{\lambda_n^3t^3}{3!}\right)\right)V^{-1} \\ &= V \begin{bmatrix} e^{\lambda_1 t} & & \\ & \ddots & \\ & & e^{\lambda_n t} \end{bmatrix} V^{-1} \quad \text{(we recognize } 1+\lambda_i t+\frac{\lambda_i^2t^2}{2!}+\cdots \text{ as (PS))} \end{align*}

That’s very nice! We diagonalize AA, then exponentiate its eigenvalues to compute eAte^{At}. Let’s plug this back in to x(t)=eAtx(0)\vv x(t) = e^{At} \vv x(0):

x(t)=V[eλ1teλnt]V1x(0). \vv x(t) = V \begin{bmatrix} e^{\lambda_1 t} & & \\ & \ddots & \\ & & e^{\lambda_n t} \end{bmatrix} V^{-1} \vv x(0).

Now, if we let c=V1x(0) \vv c = V^{-1}\vv x(0), we can write

x(t)=[v1vn][eλ1teλnt][c1cn]=c1eλ1tv1++cneλntvn, \vv x(t) = \bm \vv v_1 \cdots \vv v_n\em \begin{bmatrix} e^{\lambda_1 t} & & \\ & \ddots & \\ & & e^{\lambda_n t} \end{bmatrix} \begin{bmatrix} c_1 \\ \vdots \\ c_n \end{bmatrix} = c_1 e^{\lambda_1 t}\vv v_1 + \cdots + c_n e^{\lambda_n t} \vv v_n,

recovering our previous solution, with the exact formula c=V1x(0) \vv c = V^{-1} \vv x(0) we saw previously for the coefficients c1,,cnc_1, \ldots, c_n!.

4.2Case 2: Imaginary Eigenvalues

We focus on the 2×22 \times 2 case with A=[0ωω0]=ω[0110]{A = \begin{bmatrix} 0 & \omega \\ -\omega & 0 \end{bmatrix} = \omega \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}}. In this case, we will compute the power series directly.

A=ω[0110],A2=ω2[1001],A3=ω3[0110],A4=ω4[1001]=ωJ,=ω2J2,=ω3J3,=ω4J4A5=ω5J5=ω5J,A6=ω6J6=J2,A7=ω7J7=ω7J3,A8=ω8J8=ω8J4,\begin{align*} A &= \omega \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}, & A^2 &= \omega^2 \begin{bmatrix} -1 & 0 \\ 0 & -1 \end{bmatrix}, & A^3 &= \omega^3 \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, & A^4 &= \omega^4 \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \\ &= \omega J, & &= \omega^2 J^2, & &= \omega^3 J^3, & &= \omega^4 J^4 \\ A^5 &= \omega^5 J^5 = \omega^5 J, & A^6 &= \omega^6 J^6 = J^2, & A^7 &= \omega^7 J^7 = \omega^7 J^3, & A^8 &= \omega^8 J^8 = \omega^8 J^4, \end{align*}

etc. So putting this together in computing eAte^{At} we get:

eAt=[112!t2ω2+tω13!t3ω3+tω+13!t3ω3+112!t2ω2+]=[cosωtsinωtsinωtcosωt],e^{At} = \begin{bmatrix} 1 - \frac{1}{2!}t^2 \omega^2 + \cdots & t \omega - \frac{1}{3!}t^3 \omega^3 + \cdots \\ -t \omega + \frac{1}{3!}t^3 \omega^3 + \cdots & 1 - \frac{1}{2!}t^2 \omega^2 + \cdots \end{bmatrix} = \begin{bmatrix} \cos \omega t & \sin \omega t \\ -\sin \omega t & \cos \omega t \end{bmatrix},

where we used the power series for sinωt\sin \omega t and cosωt\cos \omega t in the last equality. As expected, the matrix A=ω[0110]A = \omega \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} has a matrix exponential which defines a rotation, at rate ω, so that

x(t)=[cosωtsinωtsinωtcosωt]x(0). \vv x(t) = \begin{bmatrix} \cos \omega t & \sin \omega t \\ -\sin \omega t & \cos \omega t \end{bmatrix} \vv x(0).

4.3Case 3: Complex Eigenvalues

Let’s generalize our previous example to A=[6ωω6]A = \begin{bmatrix} 6 & \omega \\ -\omega & 6 \end{bmatrix}.The matrix AA has complex conjugate eigenvalues λ1=6+iω\lambda_1 = 6 + i\omega and λ2=6iω\lambda_2 = 6 - i\omega. We will again compute the power series directly. To do so, we will use the following very useful fact:

We will strategically use this fact. First, defining J=[0110]J = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix} we note that we can write A=6I+ωJA = 6I + \omega J.Importantly, 6I6I and ωJ\omega J commute as (6I)(ωJ)=(ωJ)(6I)=ω6J(6I)(\omega J) = (\omega J)(6I) = \omega 6J. Therefore,

eAt=e(6I+ωJ)t=e6IteωJt=[e6t00e6t][cosωtsinωtsinωtcosωt]=e6t[cosωtsinωtsinωtcosωt] e^{At} = e^{(6I + \omega J)t} = e^{6It} e^{\omega Jt} = \begin{bmatrix} e^{6t} & 0 \\ 0 & e^{6t} \end{bmatrix} \begin{bmatrix} \cos \omega t & \sin \omega t \\ -\sin \omega t & \cos \omega t \end{bmatrix} = e^{6t} \begin{bmatrix} \cos \omega t & \sin \omega t \\ -\sin \omega t & \cos \omega t \end{bmatrix}

4.4Case 4: Jordan Block

Assume A=V[λ10λ]V1A = V \begin{bmatrix} \lambda & 1 \\ 0 & \lambda \end{bmatrix} V^{-1}, for V=[v1v2]V = \bm \vv v_1 & \vv v_2\em an eigenvector and generalized eigenvector of A.

Then following the same argument as in Case 1, we have that eAt=Ve[λ10λ]tV1e^{At} = V e^{\begin{bmatrix} \lambda & 1 \\ 0 & \lambda \end{bmatrix}t} V^{-1}. To compute e[λ10λ]te^{\begin{bmatrix} \lambda & 1 \\ 0 & \lambda \end{bmatrix}t}, we note [λ10λ]t=λIt+t[0100]\begin{bmatrix} \lambda & 1 \\ 0 & \lambda \end{bmatrix}t = \lambda It + t\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, and that these two terms commute. Hence: e[λ10λ]t=e[λ00λ]tet[0100]e^{\begin{bmatrix} \lambda & 1 \\ 0 & \lambda \end{bmatrix}t} = e^{\begin{bmatrix} \lambda & 0 \\ 0 & \lambda \end{bmatrix}t} e^{t\begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}}. We note that

e[λ00λ]t=[eλt00eλt] and e[0t00]=[1001]+[0t00]  (higher powers =0)=[1t01]\begin{align*} e^{\begin{bmatrix} \lambda & 0 \\ 0 & \lambda \end{bmatrix}t} = \begin{bmatrix} e^{\lambda t} & 0 \\ 0 & e^{\lambda t} \end{bmatrix} \text{ and } e^{\begin{bmatrix} 0 & t \\ 0 & 0 \end{bmatrix}} &= \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} + \begin{bmatrix} 0 & t \\ 0 & 0 \end{bmatrix} \ \text{ (higher powers }=0) \\ &= \begin{bmatrix} 1 & t \\ 0 & 1 \end{bmatrix} \end{align*}

Allowing us to conclude that e[λ10λ]t=[eλtteλt0eλt]e^{\begin{bmatrix} \lambda & 1 \\ 0 & \lambda \end{bmatrix}t} = \begin{bmatrix} e^{\lambda t} & te^{\lambda t} \\ 0 & e^{\lambda t} \end{bmatrix}, and that

x(t)=eAtx(0)=[v1v2][eλtteλt0eλt]V1x(0),and letting c=V1x(0)=[v1v2][c1eλt+c2teλtc2eλt]=(c1eλt+c2teλt)v1+c2eλtv2,\begin{align*} \vv x(t) = e^{At} \vv x(0) &= \bm \vv v_1 & \vv v_2\em \begin{bmatrix} e^{\lambda t} & te^{\lambda t} \\ 0 & e^{\lambda t} \end{bmatrix} V^{-1} \vv x(0), \quad \text{and letting } \vv c = V^{-1}\vv x(0) \\ &= \bm \vv v_1 & \vv v_2\em \begin{bmatrix} c_1 e^{\lambda t} + c_2 te^{\lambda t} \\ c_2 e^{\lambda t} \end{bmatrix} = \left(c_1 e^{\lambda t} + c_2 te^{\lambda t}\right)\vv v_1 + c_2 e^{\lambda t} \vv v_2, \end{align*}

which we recognize from our previous section on Jordan Blocks.

Binder