Skip to main content

Matrix Exponential

Before we dive into Differential Equation first let's see what meant by Matrix Exponential.
We are familiar with power series of exe^{x} .

ex=1+x+x22!+x33!+e^x=1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\cdots

Now say we have a n×nn\times n matrix AA and we want to find eAe^{A}
Then power series of eAe^A is,

danger
eA=In+A+A22!+A33!+\begin{matrix} \\ \quad \displaystyle e^A=\mathcal{I}_n+A+\frac{A^2}{2!}+\frac{A^3}{3!}+\cdots \quad\\ \\ \end{matrix}
  • ddtetA=AetA\displaystyle \frac{d}{dt}e^{tA}=Ae^{tA}
note

Proof:

ddtetA=ddt(In+tA+(tA)22!+(tA)33!+)ddtetA=0n+A+t(A)2+t2(A)32!+t3(A)43!+ddtetA=A(In+t(A)+t2(A)22!+t3(A)33!+)\frac{d}{dt}e^{tA}=\frac{d}{dt}\left(\mathcal{I}_n+tA+\frac{(tA)^2}{2!}+\frac{(tA)^3}{3!}+\cdots\right) \\ \frac{d}{dt}e^{tA}=\mathbb{0}_n+A+t(A)^2+\frac{t^2(A)^3}{2!}+\frac{t^3(A)^4}{3!}+\cdots \\ \frac{d}{dt}e^{tA}=A\left(\mathcal{I}_n+t(A)+\frac{t^2(A)^2}{2!}+\frac{t^3(A)^3}{3!}+\cdots\right)
ddtetA=AetA\begin{matrix} \\ \quad \displaystyle \frac{d}{dt}e^{tA}=Ae^{tA} \quad\\ \\ \end{matrix}_{\quad✓}

\quad

  • etAx=eλtx\displaystyle e^{tA}\vec{x}=e^{\lambda t}\vec{x}
note

Proof:

Here λ\lambda is an eigenvalue of AA with eigenvectors x\vec{x}

eA=In+A+A22!+A33!+etA=In+tA+t2A22!+t3A33!+etAx=Inx+tAx+t2A22!x+t3A33!x+e^A=\mathcal{I}_n+A+\frac{A^2}{2!}+\frac{A^3}{3!}+\cdots \\ \Rightarrow e^{tA}=\mathcal{I}_n+tA+\frac{t^2A^2}{2!}+\frac{t^3A^3}{3!}+\cdots \\ \Rightarrow e^{tA}\vec{x}=\mathcal{I}_n\vec{x}+tA\vec{x}+\frac{t^2A^2}{2!}\vec{x}+\frac{t^3A^3}{3!}\vec{x}+\cdots

We discussed that Ax=λxA\vec{x}=\lambda\vec{x}
And we also discussed that Akx=λkxA^k\vec{x}=\lambda^k\vec{x} so,

etAx=Inx+tλx+t2λ22!x+t3λ33!x+\Rightarrow e^{tA}\vec{x}=\mathcal{I}_n\vec{x}+t\lambda\vec{x}+\frac{t^2\lambda^2}{2!}\vec{x}+\frac{t^3\lambda^3}{3!}\vec{x}+\cdots

so,

etAx=eλtx\begin{matrix} \\ \quad \displaystyle e^{tA}\vec{x}=e^{\lambda t}\vec{x} \quad\\ \\ \end{matrix}_{\quad✓}

\quad

  • ddteλtx=Aeλtx\displaystyle \frac{d}{dt}e^{\lambda t}\vec{x}=Ae^{\lambda t}\vec{x}
note

Proof:

ddteλtx=λeλtx\frac{d}{dt}e^{\lambda t}\vec{x}=\lambda e^{\lambda t}\vec{x}

ddteλtx=eλtλx=Ax\Rightarrow \frac{d}{dt}e^{\lambda t}\vec{x}=e^{\lambda t}\underbrace{\lambda\vec{x}}_{=A\vec{x}}

ddteλtx=Aeλtx\begin{matrix} \\ \quad \displaystyle \frac{d}{dt}e^{\lambda t}\vec{x}=Ae^{\lambda t}\vec{x} \quad\\ \\ \end{matrix}_{\quad✓}

Differential Equation

We have a vector u=[u1u2un]Rn\vec{u}=\begin{bmatrix} u_1\\u_2\\\vdots\\u_n \end{bmatrix}\in\mathbb{R}^n and a n×nn\times n matrix AA.
u(t0)=u0\vec{u}(t_0)=\vec{u}_0
And we want to solve a differential equation,

ut=Au\frac{\partial \vec{u}}{\partial t}=A\vec{u}
note

For u,αRu,\alpha\in\mathbb{R}.
Solution of ut=αu\frac{\partial u}{\partial t}=\alpha u is,

u=Ceαtu=Ce^{\alpha t}

Say that the eigenvectors of AA are x1,x2,,xn\vec{x}_1,\vec{x}_2,\cdots, \vec{x}_n,
And say the eigenvalues of AA are λ1,λ2,,λn\lambda_1,\lambda_2 ,\cdots, \lambda_n so,

Then the solution for u\vec{u} is,

danger
u(t)=C1eλ1tx1+C2eλ2tx2++Cneλntxn\begin{matrix} \\ \quad \displaystyle \vec{u}(t) = C_1e^{\lambda_1 t}\vec{x}_1 + C_2e^{\lambda_2 t}\vec{x}_2 + \cdots + C_ne^{\lambda_n t}\vec{x}_n \quad\\ \\ \end{matrix}

Example:
Say u=[u1u2]Rn\vec{u}=\begin{bmatrix} u_1\\u_2\\ \end{bmatrix}\in\mathbb{R}^n and u(0)=[10]\vec{u}(0)=\begin{bmatrix} 1\\0\\ \end{bmatrix}
And we are given,

du1dt=u1+2u2\frac{du_1}{dt}=-u_1+2u_2 and

du2dt=2u1u2\frac{du_2}{dt}=2u_1-u_2 so,

A=[1212]RnA=\begin{bmatrix} -1 & 2\\ 1 & -2\\ \end{bmatrix}\in\mathbb{R}^n
Now we want to solve differential equation,

dudt=Au\frac{d \vec{u}}{d t}=A\vec{u}

First of all find it's eigenvalues and eigenvectors.
discussed about how to find them
So our eigenvalues are λ1=0\lambda_1=0 and λ2=3\lambda_2=-3
And our eigenvectors are

x1=[21],x2=[11]\vec{x}_1 = \begin{bmatrix} 2\\1\\ \end{bmatrix},\quad \vec{x}_2 = \begin{bmatrix} 1\\-1\\ \end{bmatrix}

Now we got our eigenvalues and eigenvectors so solution is.

u(t)=c1eλ1tx1+c2eλ2tx2\vec{u}(t) = c_1e^{\lambda_1 t}\vec{x}_1 + c_2e^{\lambda_2 t}\vec{x}_2

u(t)=c1e0t[21]+c2e3t[11]\vec{u}(t) = c_1e^{0 t}\begin{bmatrix} 2\\1\\ \end{bmatrix} + c_2e^{-3 t}\begin{bmatrix} 1\\-1\\ \end{bmatrix}

u(t)=c1[21]steady state+c2e3t[11]t0\displaystyle \vec{u}(t) = \underbrace{c_1\begin{bmatrix} 2\\1\\ \end{bmatrix}}_{\text{steady state}} + \underbrace{c_2e^{-3 t}\begin{bmatrix} 1\\-1\\ \end{bmatrix}}_{\xrightarrow [t\to \infty ]{} \vec{0}}

info

So here we can see that our eigenvalue control the state.

  • For λ1=0\lambda_1=0 the state becomes steady, it does not depends on time.
  • For λ2=3\lambda_2=-3 the solution vanishes, as tt increases.
  • As tt\to\infty solution associated with λ2\lambda_2 vanishes and solution associated with λ1\lambda_1 remains steady.

We know that u(0)=[10]\vec{u}(0) = \begin{bmatrix} 1\\0\\ \end{bmatrix} so,

u(0)=c1[21]+c2[11]=[10]\vec{u}(0)= c_1\begin{bmatrix} 2\\1\\ \end{bmatrix} + c_2\begin{bmatrix} 1\\-1\\ \end{bmatrix} =\begin{bmatrix} 1\\0\\ \end{bmatrix}

By solving we get c1=c2=13c_1=c_2=\frac{1}{3}
So solution is,

danger
u(t)=13[21]steady state+13e3t[11]t0\begin{matrix} \\ \quad \displaystyle \vec{u}(t) = \underbrace{\frac{1}{3}\begin{bmatrix} 2\\1\\ \end{bmatrix}}_{\text{steady state}} + \underbrace{\frac{1}{3}e^{-3 t}\begin{bmatrix} 1\\-1\\ \end{bmatrix}}_{\xrightarrow [t\to \infty ]{} \vec{0}} \quad\\ \\ \end{matrix}

If AA is Diagonalizable

If AA is diagonalizable then,

danger
A=SΛS1\begin{matrix} \\ \quad \displaystyle A=S\Lambda S^{-1} \quad\\ \\ \end{matrix}

Where the columns of matrix SS are eigenvectors of AA.

S=[x1x2xn]S=\begin{bmatrix} \vdots & \vdots & \cdots & \vdots \\ \vec{x}_{1} & \vec{x}_{2} & \cdots & \vec{x}_{n} \\ \vdots & \vdots & \cdots & \vdots \\ \end{bmatrix}

(we discussed it HERE) So,

  • eAt=Se(Λt)S1\displaystyle e^{At}=Se^{(\Lambda t)}S^{-1}
note

Proof:

eA=In+A+A22!+A33!+eAt=In+At+t2A22!+t3A33!+e^A=\mathcal{I}_n+A+\frac{A^2}{2!}+\frac{A^3}{3!}+\cdots \\ \Rightarrow e^{At}=\mathcal{I}_n+At+\frac{t^2A^2}{2!}+\frac{t^3A^3}{3!}+\cdots

As we know that A=SΛS1A=S\Lambda S^{-1}

eAt=In+SΛS1t+t2(SΛS1)22!+t3(SΛS1)33!+\Rightarrow e^{At}=\mathcal{I}_n+S\Lambda S^{-1}t+\frac{t^2(S\Lambda S^{-1})^2}{2!}+\frac{t^3(S\Lambda S^{-1})^3}{3!}+\cdots

As we discussed that Ak=(SΛS1)k=SΛkS1A^k=(S\Lambda S^{-1})^k=S\Lambda^k S^{-1}

eAt=In+SΛS1t+t2SΛ2S12!+t3SΛ3S13!+eAt=In+SΛS1t+t2SΛ2S12!+t3SΛ3S13!+eAt=S(In+Λt+t2Λ22!+t3Λ33!+)S1\Rightarrow e^{At}=\mathcal{I}_n+S\Lambda S^{-1}t+\frac{t^2 S\Lambda^2 S^{-1}}{2!}+\frac{t^3 S\Lambda^3 S^{-1}}{3!}+\cdots \\ \Rightarrow e^{At}=\mathcal{I}_n+S\Lambda S^{-1}t+\frac{t^2 S\Lambda^2 S^{-1}}{2!}+\frac{t^3 S\Lambda^3 S^{-1}}{3!}+\cdots \\ \Rightarrow e^{At}=S\left(\mathcal{I}_n+\Lambda t+\frac{t^2 \Lambda^2}{2!}+\frac{t^3 \Lambda^3}{3!}+\cdots\right)S^{-1}

So,

eAt=Se(Λt)S1\begin{matrix} \\ \quad \displaystyle e^{At}=S e^{(\Lambda t)} S^{-1} \quad\\ \\ \end{matrix}_{\quad✓}

And remember that it's true only if AA is Diagonalizable

\quad

  • u(t)=SeΛtS1x\displaystyle \vec{u}(t)=Se^{\Lambda t}S^{-1}\vec{x}
note

Proof:

We know that

u(t)=ceλtx\vec{u}(t)=ce^{\lambda t}\vec{x}

where cRc\in\mathbb{R} is a constant, λ\lambda is our eigenvalue and x\vec{x} is our eigenvectors.
And as we discussed above

eλtx=eAtxe^{\lambda t}\vec{x}=e^{At}\vec{x}

so,

u(t)=ceAtx\vec{u}(t)=ce^{At}\vec{x}

We also discussed that

eAt=Se(Λt)S1e^{At}=Se^{(\Lambda t)}S^{-1}

so,

u(t)=cSe(Λt)S1x\vec{u}(t)=cSe^{(\Lambda t)}S^{-1}\vec{x}

And we can get the value of cc using initial condition u(t0)=u0\vec{u}(t_0)=\vec{u}_0 so,

u(t)=Se(Λt)S1x\begin{matrix} \\ \quad \displaystyle \vec{u}(t)=Se^{(\Lambda t)}S^{-1}\vec{x} \quad\\ \\ \end{matrix}_{\quad\quad✓}

States

u(t)=C1eλ1tx1+C2eλ2tx2++Cneλntxn\vec{u}(t) = C_1e^{\lambda_1 t}\vec{x}_1 + C_2e^{\lambda_2 t}\vec{x}_2 + \cdots + C_ne^{\lambda_n t}\vec{x}_n

1.1. Stable state

If u(t)t0\vec{u}(t)\xrightarrow [t\to \infty ]{} \vec{0} then we say we have a stable state.
We can achieve it if all the eigenvalues are negative.
λ1<0,λ2<0,,λn<0\lambda_1\lt 0, \lambda_2\lt 0,\cdots ,\lambda_n\lt 0
If eigenvalues are Complex say λ=a+ib;a,bR\lambda=a+ib;\quad a,b\in\mathbb{R} then

e(a+ib)=ea\|e^{(a+ib)}\|=\|e^a\|

so complex part doesn't matters here.

2.2. Steady state

If u(t)tc\vec{u}(t)\xrightarrow [t\to \infty ]{} \vec{c} then we have a steady state
Here c\vec{c} is a constant vector that does not depends on tt.
If atleast one of the eigenvalue is 00 and rest of the eigenvalues are negative then we can say we have a steady state.
λ1=0,λ2=0,,λk=0;\lambda_1 = 0, \lambda_2 = 0,\cdots ,\lambda_k = 0;\quad1kn1 \leq k \leq n
λk+1<0,λk+2<0,,λn<0;\lambda_{k+1} \lt 0, \lambda_{k+2} \lt 0,\cdots ,\lambda_n \lt 0;\quad1kn1 \leq k \leq n

3.3. Blow-up

If u(t)t\vec{u}(t)\xrightarrow [t\to \infty ]{} \vec{\infty} then we have a blow-up
Here \vec{\infty} means that all the elements of u(t)\vec{u}(t) (goes to) \infty
If atleast one of the eigenvalue is positive then we can say we have a blow-up.
So we can say that for a blow-up λk>0;k{1,2,3,,n}\exists \lambda_k \gt 0 ;\quad k\in\{1,2,3,\cdots,n\}