I'm having trouble with a linear algebra question and I was hoping someone could help me out. The question asks:
"Using the candidate for $P$ given above (and NOT your answer to (c) if it was different), give the diagonal matrix $D$ such that $P^{-1} A P=D$."
From the question, I know that the following are eigenpairs of $A$:
$\left(1,\left[\begin{array}{c}-1 \\ 2 \\ 1\end{array}\right]\right),\left(-3,\left[\begin{array}{c}-3 \\ 2 \\ 4\end{array}\right]\right)$, and $\left(-4,\left[\begin{array}{c}-2 \\ 1 \\ 3\end{array}\right]\right)$
The candidate for P is as follows:
$$ P=\left[\begin{array}{ccc} -1 & -3 & -2 \\ 2 & 2 & 1 \\ 1 & 4 & 3 \end{array}\right] $$
I've tried finding the inverse of $P$ and multiplying $P^{-1}AP$, but I'm not sure what to do next to get the diagonal matrix $D$.
Edit: I have the inverse of P, and I have A. A is a matrix which I have. I have the inverse of P. Do I multiple A by P by inverse of P?
Any help or guidance would be greatly appreciated! Thank you in advance.