# Finding the Exponential of a Matrix that is not Diagonalizable

Consider the $3 \times 3$ matrix
$$A = \begin{pmatrix} 1 & 1 & 2 \\ 0 & 1 & -4 \\ 0 & 0 & 1 \end{pmatrix}.$$

I am trying to find $e^{At}$.

The only tool I have to find the exponential of a matrix is to diagonalize it. $A$'s eigenvalue is 1. Therefore, $A$ is not diagonalizable.

How does one find the exponential of a non-diagonalizable matrix?

My attempt:

Write $\begin{pmatrix} 1 & 1 & 2 \\ 0 & 1 & -4 \\ 0 & 0 & 1 \end{pmatrix} = M + N$, with $M = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}$ and $N = \begin{pmatrix} 0 & 1 & 2 \\ 0 & 0 & -4 \\ 0 & 0 & 0 \end{pmatrix}$.

We have $N^3 = 0$, and therefore $\forall x > 3$, $N^x = 0$. Thus:

\begin{aligned} e^{At} &= e^{(M+N)t} = e^{Mt} e^{Nt} \\ &= \begin{pmatrix} e^t & 0 & 0 \\ 0 & e^t & 0 \\ 0 & 0 & e^t \end{pmatrix} \left(I + \begin{pmatrix} 0 & t & 2t \\ 0 & 0 & -4t \\ 0 & 0 & 0 \end{pmatrix}+\begin{pmatrix} 0 & 0 & -2t^2 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix}\right) \\ &= e^t \begin{pmatrix} 1 & t & 2t \\ 0 & 1 & -4t \\ 0 & 0 & 1 \end{pmatrix} \\ &= \begin{pmatrix} e^t & te^t & 2t(1-t)e^t \\ 0 & e^t & -4te^t \\ 0 & 0 & e^t \end{pmatrix}. \end{aligned}

• If $A$ is what you say it is then the only eigenvalue is $\lambda=1$. That matrix is not diagonalizable. – David C. Ullrich May 7 '16 at 14:16
• can't eigenvalues be complex? – aribaldi May 7 '16 at 14:18
• If you know about the Jordan Canonical Form (aka the Jordan Normal Form) you can use that to exponentiate a non-diagonalizable matrix. – David C. Ullrich May 7 '16 at 15:15
• You may too prove by induction that $A^n$ is $$\begin{pmatrix} 1&n&4n-2n^2\\ 0&1&-4n\\ 0&0&1\ \end{pmatrix}$$ – Raymond Manzoni May 7 '16 at 15:23
• An alternative way is to change one of the zeros to $\epsilon$ to obtain a diagonalizable matrix and then take the limit of $\epsilon\to 0$ in the result. This method will always work because the diagonalizable matrices are dense in the set of all matrices. – Count Iblis May 7 '16 at 20:21

(This question was edited a lot, I'm referring to this revision.)

Yes, this is correct. Note however that:

1. You've used $e^{(M+N)t}=e^{Mt}e^{Nt}$. Note that this is only valid if $M$ and $N$ commute (that is, $MN=NM$). In this case it's ok because $M$ is scalar and commutes with everything, but you should mention it explicitly.
2. In general, it may be easier to find the Jordan form of $A$ and use that. You can calculate the exponential in blocks, and there is an elegant expansion for each block.

this is my first answer on this site so if anyone can help to improve the quality of this answer, thanks in advance.

That said, let us get to business.

1. Compute the Jordan form of this matrix, you can do it by hand or check this link. (or both).
2. Now, we have the following case: $$A = S J S^{-1}.$$ You will find $S$ and $S^{-1}$ on the previous link. For the sake of simplicity, $J$ is what actually matters, $$J = \begin{pmatrix} 1 & 1 & 0\\ 0 & 1 & 1\\ 0 & 0 & 1\\ \end{pmatrix}$$ because:
3. $e^A = e^{SJS^{-1}} = e^J$ And the matrix $J$ can be written as: $J = \lambda I + N$, where $I$ is the identity matrix and $N$ a nilpotent matrix.
4. So, $e^J = e^{\lambda I + N} = \mathbf{e^{\lambda} \cdot e^N}$ By simple inspection, we get that: $$J = \lambda I + N = 1 \cdot \begin{pmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1\\ \end{pmatrix} + \begin{pmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 0 & 0 & 0\\ \end{pmatrix}$$ where you can check that $\lambda =1$ and N is $$\begin{pmatrix} 0 & 1 & 0\\ 0 & 0 & 1\\ 0 & 0 & 0\\ \end{pmatrix}$$
5. So, $e^A = e \cdot e^N$ we just apply the definition $e^N \equiv \sum^{\infty}_{k=0} \frac{1}{k!} N^k$. And, of course, it converges fast: $N^2 \neq 0$ but $N^3=0$.
6. Finally: $$e^A = e \cdot \left[ 1 \cdot I + 1 \cdot N^1 + \frac{1}{2} N^2 \right]$$ where $$N^2 = \begin{pmatrix} 0 & 0 & 1\\ 0 & 0 & 0\\ 0 & 0 & 0\\ \end{pmatrix}$$ then: $$\mathbf{ e^A = e \cdot \begin{pmatrix} 1 & 1 & 1/2\\ 0 & 1 & 1\\ 0 & 0 & 1\\ \end{pmatrix} }$$ Last but not least, $$e^{At} = e^{A \cdot t} = e^{\lambda \cdot t} \cdot e^{N \cdot t} = e^t \cdot \begin{pmatrix} 1 & t & 1/2 t^2\\ 0 & 1 & t\\ 0 & 0 & 1\\ \end{pmatrix}$$ You replace $N$ by $At$ in the exp definition and that's it.
• Good job for a first post. Click the "edited" text above Byron's name to see how he edited it to make it better. – GEdgar May 7 '16 at 17:12
• @Cesar You have correctly calculated $e^J,$ which unfortunately is not the same as $e^A.$ – user940 May 7 '16 at 22:52
• @Cesar: regarding your point 3, $$e^A=e^{SJS^{-1}}=Se^JS^{-1}.$$ – Martin Argerami May 8 '16 at 13:29

Hint:

Write your matrix $A$ as $I+N$ where $I$ is the identity matrix and $N$ is a nilpotent matrix. Then use the definition of $e^{At}$ as a power series, noting that $N^k=0$ for some $k$.

• (+1) - but probably (maybe?) one should add to the hint : $e^{(I +N)t}= e^{It}e^{Nt}$ because the matrices $I$ and $N$ commute... – peter a g May 7 '16 at 15:22
• @peterag: sure, but this fact is embedded in the idea of "use the definition of $e^{At}$ as a power series." writing down the expression, it is obvious what needs to be done. – symplectomorphic May 7 '16 at 15:28
• To make my previous (useful or not) comment more useful (?) for the OP: if $AB=BA$, then $e^{A+B}=e^Ae^B$. – peter a g May 7 '16 at 15:36

If you know about the Jordan Canonical Form you can use that.

Another method, probably more elementary, was mentioned in a comment. The comment was deleted; I don't know why. Note that $A=I+N$, where $N^3=0$. It follows that $$A^k=I+kN+\frac{k(k-1)}{2}N^2.$$You can use that to calculate $e^{At}=\sum t^kA^k/k!$.

Edit: Oh, that comment was converted to an answer. I'll leave this here anyway, being more detailed (at least regarding one approach).

• I added the comment as an answer. That's why. :) – symplectomorphic May 7 '16 at 15:30
• If you mean that $N^3$ is the zero matrix I think you are mistaken. $N^2 = 0$ – aribaldi May 7 '16 at 15:33
• @aribaldi Huh? First, if $N^2=0$ as you claim that would show that I'm not mistaken, since $N^2=0$ implies $N^3=0$. Second, no, $N^2\ne0$. – David C. Ullrich May 7 '16 at 15:38
• If $I+N = A \implies N = \begin{pmatrix} 0 & 1 & 2\\ 0 & 0 & -4\\ 0 & 0 & 0\\ \end{pmatrix}$ right? And $N^2 = 0$ – aribaldi May 7 '16 at 16:19
• @DavidC.Ullrich No it isn't, you were right the first time. There is a single entry "-4" in the matrix $N^2$. – user940 May 7 '16 at 16:48

In general if $f$ is a matrix function and $J$ a Jordan block with eigenvalue $\lambda_{0}$ then $$f(J)=\left(\begin{array}{ccccc} f(\lambda_{0}) & \frac{f'(\lambda_{0})}{1!} & \frac{f''(\lambda_{0})}{2!} & \ldots & \frac{f^{(n-1)}(\lambda_{0})}{(n-1)!}\\ 0 & f(\lambda_{0}) & \frac{f'(\lambda_{0})}{1!} & & \vdots\\ 0 & 0 & f(\lambda_{0}) & \ddots & \frac{f''(\lambda_{0})}{2!}\\ \vdots & \vdots & \vdots & \ddots & \frac{f'(\lambda_{0})}{1!}\\ 0 & 0 & 0 & \ldots & f(\lambda_{0}) \end{array}\right),$$

This means that in your case since A has just one Jordan block $J$, i.e. $A=SJS^{-1}$ with eigenvalue $\lambda_{0}=1$, since your matrix function is $f(J)=e^{tJ}$, then you have

$$e^{At}=Se^{Jt}S^{-1}=S\left(\begin{array}{ccccc} e^{t} & te^{t} & \frac{t^2e^{t}}{2} \\ 0 & e^{t} & te^{t} \\ 0 & 0 & e^{t} & \\ \end{array}\right)S^{-1}.$$

• It is not true that $e^{tA}=e^{tJ}.$ – user940 May 8 '16 at 19:53
• You're totally right! I'll edit in few minutes – Dac0 May 8 '16 at 19:55

Using Jordan Decomposition

Since Jordan Decomposition gives $$\begin{bmatrix} 1&1&2\\ 0&1&-4\\ 0&0&1 \end{bmatrix} = \begin{bmatrix} 1&0&0\\ 0&1&\frac12\\ 0&0&-\frac14 \end{bmatrix} \begin{bmatrix} 1&1&0\\ 0&1&1\\ 0&0&1 \end{bmatrix} \begin{bmatrix} 1&0&0\\ 0&1&\frac12\\ 0&0&-\frac14 \end{bmatrix}^{\large\,-1}\tag{1}$$ we have $$\exp\left(\begin{bmatrix} 1&1&2\\ 0&1&-4\\ 0&0&1 \end{bmatrix}\right) = \begin{bmatrix} 1&0&0\\ 0&1&\frac12\\ 0&0&-\frac14 \end{bmatrix} \exp\left(\begin{bmatrix} 1&1&0\\ 0&1&1\\ 0&0&1 \end{bmatrix}\right) \begin{bmatrix} 1&0&0\\ 0&1&\frac12\\ 0&0&-\frac14 \end{bmatrix}^{\large\,-1}\tag{2}$$ Since $$\exp\left(\begin{bmatrix} 0&1&0\\ 0&0&1\\ 0&0&0 \end{bmatrix}\right) =\begin{bmatrix} 1&1&\frac12\\ 0&1&1\\ 0&0&1 \end{bmatrix}\tag{3}$$ we get $$\exp\left(\begin{bmatrix} 1&1&0\\ 0&1&1\\ 0&0&1 \end{bmatrix}\right) =e\begin{bmatrix} 1&1&\frac12\\ 0&1&1\\ 0&0&1 \end{bmatrix}\tag{4}$$ and \begin{align} \exp\left(\begin{bmatrix} 1&1&2\\ 0&1&-4\\ 0&0&1 \end{bmatrix}\right) &= e\begin{bmatrix} 1&0&0\\ 0&1&\frac12\\ 0&0&-\frac14 \end{bmatrix} \begin{bmatrix} 1&1&\frac12\\ 0&1&1\\ 0&0&1 \end{bmatrix} \begin{bmatrix} 1&0&0\\ 0&1&\frac12\\ 0&0&-\frac14 \end{bmatrix}^{\large\,-1}\\[6pt] &=e\begin{bmatrix} 1&1&0\\ 0&1&-4\\ 0&0&1 \end{bmatrix}\tag{5} \end{align}

Using Power Series for $\boldsymbol{\exp}$

Since $$\begin{bmatrix} 0&1&2\\ 0&0&-4\\ 0&0&0 \end{bmatrix}^{\large\,2} =\begin{bmatrix} 0&0&-4\\ 0&0&0\\ 0&0&0 \end{bmatrix}\tag{6}$$ and $$\begin{bmatrix} 0&1&2\\ 0&0&-4\\ 0&0&0 \end{bmatrix}^{\large\,3} =\begin{bmatrix} 0&0&0\\ 0&0&0\\ 0&0&0 \end{bmatrix}\tag{7}$$ we can use the power series for $\exp$ to get $$\exp\left(\begin{bmatrix} 0&1&2\\ 0&0&-4\\ 0&0&0 \end{bmatrix}\right) =\begin{bmatrix} 1&1&0\\ 0&1&-4\\ 0&0&1 \end{bmatrix}\tag{8}$$ Therefore, $$\exp\left(\begin{bmatrix} 1&1&2\\ 0&1&-4\\ 0&0&1 \end{bmatrix}\right) =e\begin{bmatrix} 1&1&0\\ 0&1&-4\\ 0&0&1 \end{bmatrix}\tag{9}$$

Hint: Find the Jordan matrix, by which the exponential can always be found.

It's actually possible (though somewhat tedious) to calculate $\exp(tA)$ using the series definition. The definition states that, $$\exp(tA) = \sum_{n=0}^\infty \frac{t^n}{n!}A^n.$$

Now, since $\exp(tA)$ is a matrix, it is enough to find the values of $\exp(tA)e_i$ for $i=1,2,3$, where the $e_i$ are the standard basis vectors.
For $e_1$, we have $$\exp(tA)e_1 = \sum_{n=0}^\infty \frac{t^n}{n!}A^ne_1 = \sum_{n=0}^\infty \frac{t^n}{n!} e_1 = \exp(t)e_1$$ so the first column of $\exp(tA)$ is $$\left[ \exp(t)\quad 0\quad 0\right]^T$$

For $e_2$, we have that $Ae_2 = e_1 + e_2$, so $$A^n e_2 = A^{n-1}e_1 + a^{n-1}e_2 = e_1 + A^{n-1}e_n = \cdots = ne_1 + e_2$$ and consequently, $$\exp(tA)e_2 = \sum_{n=0}^\infty \frac{t^n}{n!}A^ne_2 = \sum_{n=0}^\infty \frac{t^n}{n!} ne_1 + \sum_{n=0}^\infty \frac{t^n}{n!} ne_2 = t\sum_{n=1}^\infty \frac{t^n}{(n-1)!} e_1 + \exp(t)e_2 = t\exp(t)e_1 + \exp(t)e_2$$ and the second row of the matrix is $$\left[t\exp(t)\quad \exp(t)\quad 0\right]^T$$

Finally, $$A e_3 = 2e_1 + -4e_2 + e_3$$ so $$A^n e_3 = 2A^{n-1}e_1 - 4A^{n-1}e_2 + A^{n-1}e_3 = 2e_1 - 4((n-1)e_1 + e_2) + A^{n-1} e_3=\cdots$$ $$\cdots = 2n e_1 - 4\left(\frac{n(n-1)}{2}e_1 + ne_2\right) + e_3 = -(2n^2+4n) e_1 - 4ne_2 + e_3.$$ Thus, $$\exp(tA)e_3 = \sum_{n=0}^\infty \frac{t^n}{n!}A^ne_1 = \sum_{n=0}^\infty \frac{t^n}{n!}\left(-(2n^2-4n) e_1 - 4ne_2 + e_3\right)$$ $$= -2\sum_{n=0}^\infty \frac{t^n}{n!}n(n-2)e_1 - 4\sum_{n=0}^\infty \frac{t^n}{n!}ne_2 + \sum_{n=0}^\infty \frac{t^n}{n!} e_3$$ $$= -2t\sum_{n=1}^\infty \frac{t^n}{(n-1)!}(n-2)e_1 -4 t\exp(t)e_2 + \exp(t)e_3$$ $$= -2t\sum_{n=0}^\infty \frac{t^n}{n!}(n-1)e_1 -4 t\exp(t)e_2 + \exp(t)e_3$$ $$= -2t\sum_{n=0}^\infty \frac{t^n}{n!}ne_1 + 2t\sum_{n=0}^\infty \frac{t^n}{n!}e_3 -4 t\exp(t)e_2 + \exp(t)e_3$$ $$= -2t \sum_{n=1}^\infty \frac{t^n}{(n-1)!} e_1 + 2t\exp(t)e_1 - 4t\exp(t)e_2 + \exp(t)e_3$$ $$= -2t^2 \sum_{n=0}^\infty \frac{t^n}{n!} e_1 + 2t\exp(t)e_1 - 4t\exp(t)e_2 + \exp(t)e_3$$ $$= -2t(t-1)\exp(t)e_1 -4t\exp(t)e_2 + \exp(t)e_3$$ so the final column of $\exp(tA)$ is $$\left[-2t(t-1) \exp(t) \quad -4t\exp(t) \quad \exp(t)\right]^T$$ Thus, $$\exp(tA) = \exp(t)\begin{bmatrix} 1 & t & -2t(t-1)\\ 0 & 1 & -4t\\ 0 & 0 & 1\\ \end{bmatrix}$$