I have a matrix $A= \begin{pmatrix} 5 & 3 \\ 2 & 1 \end{pmatrix} $ and I should find $m$, $n$, $r$ in case that $A^2+nA+rI=0$ ($I$ is Identity matrix) . and after that find $A^{-1}$ with that relation .
I really tried to find those variables but i do not know how to solve that with just one equation. Could you help me find $m$ ,$n$ , $r$ in every way you think is true.
Hint : $m=1$, $n=-\mathrm{Tr}(A)$ and $r=\det(A)$ always work. This is called Cayley-Hamilton theorem.