Let $A$ be a $2\times 2$ matrix with eigenvalues $1,2$. What is $\det(A^3-3A^2+A+5I)$ Let $A$ be a $2\times 2$ matrix with eigenvalues $1,2$. What is $\det(A^3-3A^2+A+5I)$
I know that $\det(A)=$ product of eingenvalues = $2$.
I also know that since $A$ has 2 distinct eiginvalues, it is diagonalizable.
$A=UDU^T$, where $U$ is the orthogonal matrix such that $UU^T=I$, and $D$ is the diagonal matrix consists of columns of the eigeinvalues.
$$D=\begin{bmatrix}1&0\\0&2\end{bmatrix} $$
I don't know what $U$ is? If we have no information about what $A$ looks like, how can we calculate $U$, which contains the eigenvectors? 

Suppose I have $U$. Then I know that:
$A^2=UD^2U^T$, but again I have no information about what $A$ is?

By Cayley–Hamilton, $A^2-3A+2I=0$ and so $$A^3-3A^2+A+5I=A(A^2-3A+2I)-A+5I=-A+5I$$ The eigenvalues of $-A+5I$ are $-1+5=4$ and $-2+5=3$ and so $$\det(A^3-3A^2+A+5I) = \det(-A+5I) = 4 \cdot 3 = 12$$
Or you could argue directly that the eigenvalues of $P(A)$ are $P(1)$ and $P(2)$ and so $\det P(A) = P(1)P(2)$.
