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