Given, `A^(2)+A+2I=O`
`implies A^(2)+A=-2I`
`implies |A^(2)+A|=|-2I|`
`implies |A||A+I|=(-2)^(n)`
`implies |A| ne 0`
Therefore, A is nonsingular, hence its inverse exists. Also, multiplying the given equation both sides with `A^(-1)`, we get
`A^(-1) =-1/2 (A+I)`