Arbitrary Eigenvalues So we're given $$C_A(x) = \det(xI-A)$$ and the matrix $$A=\begin{bmatrix}a_1 & a_2\\a_3 & a_4\end{bmatrix}$$
In the previous question, we were told to prove that $$C_A(x) = x^2-\operatorname{tr}(A)+\det(A)$$
This questions says "Let $λ_1$, $λ_2$, not necessarily distinct, be the eigenvalues of $A$. Show that
$$C_A (x) = x^ 2 - (λ_1 + λ_2 ) x + λ_1 λ_2$$
I know that the way to do this is to make $a_1 = \lambda_1$ and $a_4 = \lambda_2$ $a_2=0 $and $a_3 =0$. But that's where I'm having trouble. I don't know how to use the information given regarding the Eigenvalues to make all the $a$'s what I need them to be. Help would be much appreciated.
 A: Eigenvalues are roots of the characteristic polynomial. On the other hand, you have Vieta's formula.
edit
if you don't know the Vieta's formula, then just write explicitly the characteristic polynomial:
$$x^2 - (a_1+a_4)x+(a_1a_4-a_2a_3).$$ It has roots $$\lambda_\pm = \frac{a_1+a_4\pm\sqrt{(a_1+a_4)^2 - 4 (a_1a_4-a_2a_3)}}{2}.$$
Now it is straightforward to check that $$\lambda_++\lambda_- = \operatorname{tr}(A),\\\lambda_+\lambda_-=\det(A).$$
A: The eigenvalues are the roots of the characteristic polynomial.  Therefore
\begin{align*}
\tag{$\spadesuit$}C_A(x) &= (x - \lambda_1)(x - \lambda_2) \\
&= x^2 -(\lambda_1 + \lambda_2) x + \lambda_2 \lambda_2.
\end{align*}
The factorization ($\spadesuit$) comes from our background knowledge about polynomials.  If $p(x)$ is a monic polynomial of degree $n$ with coefficients in a field $F$, and $p(x)$ has roots $\lambda_1,\ldots, \lambda_n \in F$, then $p(x)$ can be factored as
\begin{equation*}
p(x) = (x - \lambda_1 ) \cdots (x - \lambda_n).
\end{equation*}
