Compute the matrix $A^n$, $n$ $\in$ $\mathbb{N}$. Compute $A^n$, $n$ $\in$ $\mathbb{N}$., where $
A=\left[\begin{array}{rr}
2&4\\3&13
\end{array}\right]$.
Hi guys, this is the question, I compute the diagonal matrix of $A$ and obtained this $
D=\left[\begin{array}{rr}
1&0\\0&14
\end{array}\right]$. I need use this result $(M^{-1}BM)^n$ $=$ $M^{-1}B^nM$ to find $A^n$ and I know how to use, but my problem is compute this matrix $M$ how can I compute $M$?
 A: The columns of $M$ are the eigenvectors respectively of eigenvalue 1 and 14. The first one belongs to $ker(A-I)=ker \begin{pmatrix} 1 & 4 \\3 & 12\end{pmatrix}$. You can choose $\begin{pmatrix} -4 \\1\end{pmatrix}$. The other belongs to $ker(A-14I)=ker \begin{pmatrix} -12 & 4 \\3 & -1\end{pmatrix}$, you can choose $\begin{pmatrix} 1 \\3\end{pmatrix}$. Then: 
$$M=\begin{pmatrix} -4 & 1 \\1 & 3\end{pmatrix}$$
A: If a matrix $A$ is diagonalizable, then what that means is there exists a decomposition of the vector space into eigenspaces. Then the form $A = MDM^{-1}$ is merely a change-of-basis from the basis in which $A$ was expressed into this new eigenbasis. 
Therefore, the entries of $M$ will be the eigenvectors associated to the eigenvalues.
$\lambda = 1$: The corresponding eigenspace is the nullspace of the matrix $A-1 I = A-I$. So,
$$
A-I=\left[\begin{array}{rr}
1&4\\3&12
\end{array}\right]$$
then row reduce to find a single generator of this nullspace. 
$\lambda = 13$: Same thing as above. 
Now take the two eigenvectors found in the two cases above and form the $2 \times 2$ matrix $M$. 
A: Another way to compute $f(A)$ (where $A$ is a matrix, and in your case $f(x)=x^N$) is to use: 
\begin{equation}
f(A) = \frac{1}{2\pi i}\oint  f(z) (z-A)^{-1} \; dz 
\end{equation}
where the contour encloses all the poles of the matrix $(z-A)^{-1}$.
Sounds complicated, but it is very straightforward.
