Invertible matrices - two questions 
*

*Given that $A_{n\times n}$ that satisfies $A^2 + A +I=0$ prove that $A$ is invertible and $ A^{-1} = A^2$.


From $A^2 + A +I=0$ one can show that $A^{-1}=-(A+I)$ and at the same time $A^2 = (I +A^2)^2$. Hence, I don't see why they equal each other.


*Given $C, D$ quadratic matrices such that $C = I - CD$. Show that $D^3 = 0$ iff $C = I - D + D^2$. 


From one direction, if $B^3 = 0$ then 
$A^{-3}  = I + 3B +3B^2$ and I don't know if that direction is right and how to proceed. 
Thank you!
 A: For 1), multiply each side of $\;A^2+A+I=0$ with $A-I$, getting, since $A$ and $I$ commute:
$$A^3-I^3=A^3-I=0,\quad\text{whence}\quad A^3=A^2 A=I.$$
For $2)$, rewrite the relation as $\;C(I+D)=I$.
Now, if $D^3=0$, this is also $\;C(I+D)=I+D^3=(I+D)(I-D+D^2)$. As $I+D$ is invertible, this implies $C=I-D+D^2$.
Conversely, if  $C=I-D+D^2$, then $C(I+D)=(I-D+D^2)(I+D)=I$, i.e. $\;I+D^3=I$, whence $\;D^3=0$.
A: Multiplying by $A-I$ solves the problem, but it can be done in a more generic way that doesn't require guessing.
If $A$ is a matrix such that
$$
a_0I+a_1A+a_2A^2+\dots+a_nA^n=0
$$
then each eigenvalue $\lambda$ of $A$ satisfies
$$
a_0+a_1\lambda+a_2\lambda^2+\dots+a_n\lambda^n=0
$$
Indeed, if $v\ne0$ is an eigenvector of $A$ relative to $\lambda$, it's a standard result that $A^nv=\lambda^nv$, so from
\begin{align}
(a_0I+a_1A+a_2A^2+\dots+a_nA^n)v
&=a_0v+a_1\lambda v+a_2\lambda^2v+\dots+a_n\lambda^nv\\
&=(a_0+a_1\lambda+a_2\lambda^2+\dots+a_n\lambda^n)v\\
&=0
\end{align}
we deduce the thesis.
If $a_0\ne0$, then $0$ is not a root of the polynomial $a_0+a_1X+\dots+a_nX^n$ and so $0$ is not an eigenvalue of $A$, which is equivalent to $A$ being invertible.
In your case $a_0=1\ne0$, so $A$ is indeed invertible. The inverse can be then computed by multiplying the original relation by $A^{-1}$:
$$
a_0A^{-1}+a_1I+a_2A+\dots+a_nA^{n-1}=0
$$
and so
$$
A^{-1}=-a_0^{-1}(a_1I+a_2A+\dots+a_nA^{n-1})
$$
In your case, $n=2$, $a_0=1$, $a_1=1$, $a_2=1$, so
$$
A^{-1}=-(I+A)
$$
However, $I+A=-A^2$ and we have the thesis, $A^{-1}=A^2$.

For 2, Suppose $C=I-D+D^2$. Then
$$
C=I-CD=I-(I-D+D^2)D=I-D+D^2-D^3=C-D^3
$$
so $D^3=0$.
Conversely, if $D^3=0$, then $CD^2=D^2-CD^3=D^2$. Thus $CD=D-CD^2=D-D^2$ and, finally, $C=I-CD=I-D+D^2$.
