TITLE: How to write the inverse matrix $A^{-1}$ as a polynomial in $A$?
QUESTION [5 upvotes]: I came a cross a question that gives a matrix $A$, and asks to write $A^{-1}$ as a polynomial in $A$ with real coefficients.
I don't know what this means, and googling didn't clarify very much. I found the inverse $A$, but I do not know what it means to write it as a polynomial in $A$.

REPLY [4 votes]: This can be done for any invertible $A$ using the Cayley–Hamilton theorem that any matrix satisfies its own characteristic equation. If $a_i$ are the coefficients of the characteristic polynomial then $a_0I + a_1A + \cdots + a_nA^n=0$ with $a_0=\det A$. Hence 
$$A^{-1}=-\frac1{a_0}(a_1I + \cdots + a_nA^{n-1}).$$
You can find the characteristic polynomial by computing the determinant $\det(A-\lambda I)=a_0 + a_1\lambda + \cdots + a_n\lambda^n$.