The matrix $P$ has non-zero eigenvalues and is given by $$
P=\begin{pmatrix}
a&1&1\\
0&2a&-1\\
0&0&-3a
\end{pmatrix}.
$$
(a) State, in terms of $a$, the eigenvalues of $P$. [1]
(b) (i) Find $P^2$ in terms of $a$. [1]
(ii) Use the characteristic equation of $P$ to find $P^{-1}$ in terms of $a$. [3]
The $3\times3$ matrix $A$ has eigenvalues $1$, $2$, $3$, with corresponding eigenvectors $$
\begin{pmatrix}a\\0\\0\end{pmatrix},\qquad
\begin{pmatrix}1\\2a\\0\end{pmatrix},\qquad
\begin{pmatrix}1\\-1\\-3a\end{pmatrix},
$$ respectively.
(c) Find $A$ in terms of $a$. [5]