My proof that if for a k degree polynomial $P(x)$, for the matrix $A$, $P(A)=0$ then $A$ is invertible Let $P(x)$ be a $k$-degree polynomial with with non-zero free coefficient. Prove that if for matrix $A$, $P(A)$=0, then $A$ is invertible and $A^{-1}$ is $k-1$ degree $A$ polynomial. 
Here's my proof, I would like to know if that's ok: 
Let $P(x)$ be defined: $P(x)=a_1x+a_2x^2+ \dots +a_kx^k+a_{k+1}$. We know $P(A)=0$, so that:
$$P(A)=a_1A+a_2A^2+\dots +a_kA^k+a_{k+1}=0$$  $$A(a_1+a_2A+ \dots +a_kA^{k-1})=-a_{k+1}$$
$-a_{k+1}I=-a_{k+1}$, so: 
$$A(a_1+a_2A+ \dots +a_kA^{k-1})=-a_{k+1}I$$
$$A{(a_1+a_2A+ \dots+a_kA^{k-1})\over -a_{k+1}}=I.$$
Lets define: $A^{-1}={(a_1+a_2A+\dots +a_kA^{k-1})\over -a_{k+1}}$, and then we found that $AA^{-1}=I$. Thus $A$ is invertible, and we can see $A^{-1}$ is a $k-1$ degree polynomial. QED
Is this proof valid? Thanks in advance. [Translated from another language]

This CW answer intends to remove this question from the Unanswered queue.

As already noted in the comments: Your proof is correct. Thanks for showing your own work.
