# Computing $e^{tA}$, where $A$ is a matrix

Given $$A = \begin{bmatrix} 0&-1\\1&0\end{bmatrix}$$ find $e^{tA}$, where $t \in \mathbb{R}$.

I have read about calculating the matrix exponential here. I know that when $A$ is written in its diagonal form it's kind of easy. The same with nilpotent matrices. Unfortunately, I don't know how to deal with $t$. Especially when the eigenvalues are complex (in the given example they are).

Your matrix is diagonalizable. Indeed, if you define$$P=\begin{bmatrix}1&1\\i&-i\end{bmatrix}$$(note that the columns of $P$ ere eigenvectors of $A$), then$$P^{-1}.A.P=\begin{bmatrix}-i&0\\0&i\end{bmatrix}$$and therefore$$P^{-1}.(tA).P=\begin{bmatrix}-ti&0\\0&ti\end{bmatrix}.$$So$$P^{-1}.e^{tA}.P=\begin{bmatrix}e^{-ti}&0\\0&e^{ti}\end{bmatrix}$$and so$$e^{tA}=P.\begin{bmatrix}e^{-ti}&0\\0&e^{ti}\end{bmatrix}.P^{-1}=\begin{bmatrix}\cos t&-\sin t\\\sin t&\cos t\end{bmatrix}.$$

We have $A^2 = -I$, $A^3 = -A$ and $A^4 = I$ so

\begin{align} e^{tA} &= \sum_{n=0}^\infty \frac{t^nA^n}{n!} \\ &= I\cdot\sum_{k=0}^\infty \frac{t^{4k}}{(4k)!} + A \cdot \sum_{k=0}^\infty \frac{t^{4k+1}}{(4k+1)!} - I\cdot\sum_{k=0}^\infty \frac{t^{4k+2}}{(4k+2)!} - A \cdot \sum_{k=0}^\infty \frac{t^{4k+3}}{(4k+3)!}\\ &= I\cdot\sum_{k=0}^\infty (-1)^k\frac{t^{2k}}{(2k)!} + A \cdot \sum_{k=0}^\infty (-1)^k\frac{t^{2k+1}}{(2k+1)!}\\ &= I \cdot \cos t + A \cdot \sin t\\ &= \pmatrix{\cos t & -\sin t \\ \sin t & \cos t} \end{align}

For this special case, one can start out from the observation that $A$ acts on the standard basis of $\Bbb R^2$ exactly as does multiplying by $i$ on the basis $1,i$ of $\Bbb C$.
In particular, $A^2= -\mathrm{Id}, \ A^3=-A$ and $A^4=\mathrm{Id}$.

Thus, calculating $e^{tA}$ is formally exactly the same as calculating $e^{ti}$, only that we write $\mathrm{Id}$ in place of $1$ and $A$ in place of $i$, yielding $$e^{tA} =\cos t\cdot\mathrm{Id} \ +\sin t\cdot A$$

If you can diagonalize the matrix, then it's still easy.

If you have a diagonal form $$P^{-1}AP = \begin{pmatrix}d_1 \\ & \ddots \\ &&d_n \end{pmatrix}$$ then $$P^{-1}(tA)P = t P^{-1}AP = \begin{pmatrix}td_1 \\ & \ddots \\ && td_n \end{pmatrix}$$ and you can exponentiate this as usual and eventually find $$e^{tA} = P\begin{pmatrix}e^{td_1} \\ & \ddots \\ && e^{td_n} \end{pmatrix} P^{-1}$$ It makes no difference here that the eigenvalues are complex; the imaginary parts of the answer ought to cancel out in the end.

In your particular case, after you plug in Euler's formulas and let the dust settle, you should end up with $$e^{tA} = \begin{pmatrix} \cos t & -\sin t \\ \sin t & \cos t \end{pmatrix}$$

$$(B(t))''=(e^{At})''=A^2e^{At}=-Ie^{At}=-B(t)$$ implies that $B$ is a solution of the ODE $$B''(t)=-B(t),$$ i.e. is of the form

$$e^{At}=B_c\cos t+B_s\sin t.$$

Now

$$\left.e^{At}\right|_{t=0}=I=B_c$$

and

$$\left.(e^{At})'\right|_{t=0}=A=B_s.$$