The Exponential of a Matrix

To find the exponential of a square matrix  
\[A\]
  (we can only find the exponential, or indeed any function of a matrix if it is square), first write down the Mclaurin series for  
\[e^A\]
:
\[e^A = I+\frac{A}{1!}+\frac{A^2}{2!} +...+ \frac{A^n}{n!}+...\]
.
It might be hard to find and add all these powers of  
\[A\]
. We can simplify by diagonalising  
\[A\]
.
Example: Let  
\[A= \left( \begin{array}{cc} 2 & 1 \\ 1 & 2 \end{array} \right) \]
.
To diagonalize  
\[A\]
  first find the eigenvalues, the solution to  
\[det(A- \lambda I)=0\]
.
\[\begin{equation} \begin{aligned} det(A- \lambda I) &= \left| \begin{array}{cc} 2- \lambda & 1 \\ 1 & 2- \lambda \end{array} \right| \\ &= (2- \lambda)^2-1^2 \\ &= \lambda^2 - 4 \lambda +3 \\ &=(\lambda -3)(\lambda -1) \end{aligned} \end{equation}\]
.
Hence  
\[\lambda =3, \: \lambda=1 \]
.
Now find the eigenvectors. These are the solutions to  
\[(A- \lambda I) \mathbf{v}= \mathbf{0}\]

If  
\[\lambda =3 \]
.
\[(A- \lambda I) \mathbf{v} = \left( \begin{array}{cc} -1 & 1 \\ 1 & -1 \end{array} \right) \begin{pmatrix}v_1\\v_2\end{pmatrix}= \begin{pmatrix}-v_1+v_2\\v_1-v_2\end{pmatrix}= \begin{pmatrix}0\\0\end{pmatrix}\]
.
Hence we can take  
\[v_1=v_2=1\]
. The first eigenvector is  
\[\begin{pmatrix}1\\1\end{pmatrix} \]
.
If  
\[\lambda =1 \]
.
\[(A- \lambda I) \mathbf{v} = \left( \begin{array}{cc} 1 & 1 \\ 1 & 1 \end{array} \right) \begin{pmatrix}v_1\\v_2\end{pmatrix}= \begin{pmatrix}v_1+v_2\\v_1+v_2\end{pmatrix}= \begin{pmatrix}0\\0\end{pmatrix}\]
.
Hence we can take  
\[v_1=1, \: v_2=-1\]
. The second eigenvector is  
\[\begin{pmatrix}1\\-1\end{pmatrix} \]
.
Now form the matrix  
\[P= \left( \begin{array}{cc} 1 & 1 \\ 1 & -1 \end{array} \right)\]
  of eigenvectors and the corresponding diagonal matrix  
\[D=\left( \begin{array}{cc} 3 & 0 \\ 0 & 1 \end{array} \right)\]
  containing the eigenvalues. The relationship between  
\[A, \: P, \: D\]
  is  
\[D=P^{-1}AP\]
.
To find powers of  
\[A\]
  we can use  
\[PDP^{-1}=A \rightarrow A^n =\underbrace{(PDP^{-1})...(PDP^{-1})}_{n \: times}=PD^nP^{-1}\]
.
\[\begin{equation} \begin{aligned} e^A &= I+\frac{PDP^{-1}}{1!}+\frac{(PDP^{-1})^2}{2!} +...+ \frac{(PDP^{-1})^n}{n!}+... \\ &= P(I+\frac{D}{1!}+\frac{D^2}{2!} +...+ \frac{D^n}{n!}+...)P^{-1} \\ &= Pe^DP^{-1} \\ &= \left( \begin{array}{cc} 1 & 1 \\ 1 & -1 \end{array} \right) \left( \begin{array}{cc} e^3 & 0 \\ 0 & e^1 \end{array} \right) \left( \begin{array}{cc} 1 & 1 \\ 1 & -1 \end{array} \right)^{-1} \\ &= \left( \begin{array}{cc} 1 & 1 \\ 1 & -1 \end{array} \right) \left( \begin{array}{cc} e^3 & 0 \\ 0 & e^1 \end{array} \right) \frac{-1}{2} \left( \begin{array}{cc} -1 & -1 \\ -1 & 1 \end{array} \right) \\ &= \frac{1}{2} \left( \begin{array}{cc} e^3+e & e^3-e \\ e^3-e & e^3+e \end{array} \right) \end{aligned} \end{equation}\]
.