I am a physics graduate student studying quantum mechanics, and in going over linear algebra fundamentals, we desired to come up with a power series representation of $$ (A - \lambda B)^{-1} $$ with A and B matrices, and $\lambda$ an arbitrary scalar. The professor's solution involved multiplying by $(A - \lambda B)$, the inverse, and then creating a term-wise solution until the pattern arose for the summation of the form $$ \sum \lambda ^n C_n. $$ leading to a solution $$ \sum \lambda ^n A^{-(n+1)} B^n $$ This solution made sense and I will not explain the details here.
My question is, can this be treated as a matrix equivalent of the simple power series $(1-x)^{-1}$? If not, where do I go wrong in the following solution and why? $$ (A - \lambda B)^{-1} $$ $$ = [A(I - \lambda A^{-1}B)]^{-1} $$ $$ = (I - \lambda A^{-1}B)^{-1}A^{-1} $$ $$ =[\sum (\lambda A^{-1} B)^n]A^{-1} $$ $$ =[\sum \lambda ^n A^{-n} B^n]A^{-1} $$ $$ =\sum \lambda ^n A^{-(n+1)} B^n $$
It looks to me that this last step is only true if the matrices $A^{-1}$ and $B$ commute, whereas the solution was for general $A$ and $B$ that may not commute. If this is the case, why is the correct solution found in the end? Is there some middle step that went wrong or could have been treated differently to get the correct solution with $A^{-1}$ acting on the sum from the left side? (see below for a likely wrong guess) And is my attempt at treating this expression as a matrix equivalent of a scalar power series misguided? Perhaps there is no power series in which this treatment works in general. I have a decent grasp of matrix math, but I need somebody with strong, confident knowledge to inform me about this potential shortcut to matrix power series representations. My professor feels there is something wrong about it (as do I), but his (our) intuition and desire for simple shortcuts made him prompt me to explore this further. One thought of mine was that in the first steps of my solution, we could say it is just $$ (A - \lambda B)^{-1} = A^{-1}(I - \lambda A^{-1}B)^{-1}, $$ which would lead simply to the correct power series with no commutation issues. This seems to be bad math though! A man can hope...
The correct series is $$\sum_{n=0}^\infty \lambda^n (A^{-1} B)^n A^{-1}$$ convergent for $|\lambda| < R^{-1}$ where $R$ is the spectral radius of $A^{-1} B$. You can get it from $(A - \lambda B)^{-1} = (I - \lambda A^{-1} B)^{-1} A^{-1}$ (not $A^{-1} (I - \lambda A^{-1} B)^{-1}$: remember that the inverse of a product is the product of the inverses in reverse order). You can also write it as $$\sum_{n=0}^\infty \lambda^n A^{-1} (BA^{-1})^n $$
The professor's solution is wrong. One of his steps must have required $A$ and $B$ to commute.