Let $$ A=\begin{bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22}\\ \end{bmatrix}$$ Let $\lambda_{1}, \lambda_{2}$ not necessarily distinct, be the eigenvalues of A. Show that $$ C_{A}(x)=x^2-(\lambda_{1}+ \lambda_{2})x+\lambda_{1} \lambda_{2} $$
I'm not too good at proofs but this is what I've thought of. I know that this statement is equivalent to $$C_{A}(x)=x^2-\text{tr}(A)x+\det(A).$$. Therefore, I claim that $tr(A)=\lambda_{1}+\lambda_{2}$ and $det(A)=\lambda_{1}\lambda_{2}$. However, I'm not too sure how to prove these claims. Any alternative or suggestions will be appreciated
Hint: Using the facts $$ \operatorname{tr}(AB) = \operatorname{tr}(BA)\\ \det(AB) = \det(A)\det(B) $$ You can show that for any invertible matrix $S$, we have $$ \operatorname{tr}(SAS^{-1}) = \operatorname{tr}(A)\\ \det(SAS^{-1}) = \det(A) $$ Now, select an $S$ such that $SAS^{-1}$ is upper-triangular.
Alternatively, as suggested by a comment, note that by the definition of an eigenvalue $$ x^2 - \operatorname{tr}(A)x + \det(A) = (x-\lambda_1)(x - \lambda_2) $$