How does one calculate $A^n$ when $A$ can't be diagonalized? I wasn't able to find a straightforward answer to this online. It is straightforward when you can diagonalize the matrix but how is the non-diagonalizeable case handled? The $3 \times 3$ case is the most relevant to me, and I will have to do this using pen paper so I am looking for solutions that are easy to do manually.
 A: For $3\times 3$ matrix, if it can't be diagonalized, it will have Jordan forms $A=PJP^{-1}$ for following two cases
$$J=\begin{pmatrix}\lambda&1&0\\ 0&\lambda&0\\ 0&0&\mu\end{pmatrix}, \ \ \ J=\begin{pmatrix}\lambda&1&0\\0&\lambda&1\\0&0&\lambda\end{pmatrix}$$
So all you need to do is figure out what will happen to $J^n$, i.e. conclude a formula for upper trangular entries.
A: A consequence of the Cayley-Hamilton theorem is that any analytic function $f$ of a $3\times3$ matrix $A$ can be expressed in the form $a_0I+a_1A+a_2A^2$, where the coefficients are possibly constant scalar functions. Once you know the eigenvalues of $A$, finding these coefficients is a matter of solving a small system of linear equations, specifically the equations $a_0+\lambda_i a_1+\lambda_i^2 a_2 = f(\lambda_i)$. If $A$ has repeated eigenvalues, this system is underdetermined, but you can generate additional independent equations by differentiating with respect to the repeated eigenvalue. This method is often a lot less work than computing a Jordan decomposition and reassembling the result.
A: You can try and find some other canonical transformation $$A = TCT^{-1}$$ where $C$ is sparse matrix but not diagonal. The sparser the $C$, the sparser $C^k$ will (usually) be. $C$ could be 


*

*block-diagnoal, 

*Jordan, 

*permutation 


or many other things which would save calculations.
