Show that if a square matrix $A$ satisfies the equation $p(A)=0$, where $p(x) = 2+a_1x+a_2x^2+...+a_kx^k$ where $a_1,a_2,...,a_k$ are constant scalars, then $A$ must be invertible. Find $A^{-1}$.
So I am aware of the fact that $A(-A-2I)=I$ but I don't see a way with the polynomial to get that form to then show that $A$ is invertible. The best I was able to do was that $p(A) = 2I+a_1A+a_2A^2+...+a_kA^k$ and $0=2I+a_1A+a_2A^2+...+a_kA^k$ since $p(A)=0$ but even from here I am not sure how to really approach the problem.
Let $Ax=0$. Then $0=p(A)x=2x+0+\cdots+0$ so $x=0$. So $A$ is injective, hence invertible.