The matrix $A$ is given by $$
A=\begin{pmatrix}
-2&0&0\\
0&7&9\\
4&1&7
\end{pmatrix}.
$$
(a) Show that the characteristic equation of $A$ is $$\lambda^3-12\lambda^2+12\lambda+80=0$$ and find the eigenvalues of $A$. [4]
(b) Use the characteristic equation of $A$ to show that $$A^4=pA^2+qA+rI,$$ where $p$, $q$ and $r$ are integers to be determined. [4]
(c) Find a matrix $P$ and a diagonal matrix $D$ such that $$(A-3I)^4=PDP^{-1}.$$ [6]