(a) Find the values of $a$ for which the system of equations $$
\begin{aligned}
3x+y+z&=0,\\
ax+6y-z&=0,\\
ay-2z&=0
\end{aligned}
$$ does not have a unique solution. [3]
The matrix $A$ is given by $$
A=\begin{pmatrix}
3&1&1\\
0&6&-1\\
0&0&-2
\end{pmatrix}.
$$
(b) Use the characteristic equation of $A$ to find the inverse of $A^2$. [4]
(c) Find a matrix $P$ and a diagonal matrix $D$ such that $$A^5=PDP^{-1}.$$ [7]