<s>[INST] Why does this "miracle method" for matrix inversion work? Recently, I answered this question about matrix invertibility using a solution technique I called a "miracle method." The question and answer are reproduced below:

Problem: Let $A$ be a matrix satisfying $A^3 = 2I$. Show that $B = A^2 - 2A + 2I$ is invertible.
Solution: Suspend your disbelief for a moment and suppose $A$ and $B$ were scalars, not matrices. Then, by power series expansion, we would simply be looking for
$$ \frac{1}{B} = \frac{1}{A^2 - 2A + 2} = \frac{1}{2}+\frac{A}{2}+\frac{A^2}{4}-\frac{A^4}{8}-\frac{A^5}{8} + \cdots$$
where the coefficient of $A^n$ is
$$ c_n = \frac{1+i}{2^{n+2}} \left((1-i)^n-i (1+i)^n\right). $$
But we know that $A^3 = 2$, so
$$ \frac{1}{2}+\frac{A}{2}+\frac{A^2}{4}-\frac{A^4}{8}-\frac{A^5}{8} + \cdots = \frac{1}{2}+\frac{A}{2}+\frac{A^2}{4}-\frac{A}{4}-\frac{A^2}{4} + \cdots $$
and by summing the resulting coefficients on $1$, $A$, and $A^2$, we find that
$$ \frac{1}{B} = \frac{2}{5} + \frac{3}{10}A + \frac{1}{10}A^2. $$
Now, what we've just done should be total nonsense if $A$ and $B$ are really matrices, not scalars. But try setting $B^{-1} = \frac{2}{5}I + \frac{3}{10}A + \frac{1}{10}A^2$, compute the product $BB^{-1}$, and you'll find that, miraculously, this answer works!

I discovered this solution technique some time ago while exploring a similar problem in Wolfram Mathematica. However, I have no idea why any of these manipulations should produce a meaningful answer when scalar and matrix inversion are such different operations. Why does this method work? Is there something deeper going on here than a serendipitous coincidence in series expansion coefficients?
 [/INST] It seems that he is doing this the hard way. 
If you know that $A^3 = 2I$, then any infinite sum of powers of $A$, if it converges, should reduce to a sum of the form $xI + yA + zA^2.$ So it seems reasonable to at least try to solve 
$$ (xI + yA + zA^2)(A^2 - 2A + 2I) = I$$
for $x, y,$ and $z$.
\begin{align}
  I 
  &= (xI + yA + zA^2)(2I - 2A + A^2)\\
  &= 2xI +(-2x + 2y)A + (x - 2y + 2z)A^2 + (y - 2z)A^3 + zA^4\\
  &= 2xI +(-2x + 2y)A + (x - 2y + 2z)A^2 + (2y - 4z)I + 2zA\\
  &= (2x + 2y - 4z)I + (-2x + 2y + 2z)A + (x - 2y + 2z)A^2
\end{align}
Solve
\begin{align}
  2x + 2y - 4z &= 1 \\
  -2x + 2y + 2z &= 0 \\
  x - 2y + 2z &= 0
\end{align}
and you get $x = \frac 25,\,   y = \frac 3{10},\,   z = \frac 1{10}$
</s>