When $A$ and $B$ are matrices, we have the following Taylor expansion for the inversion function together with basic information on convergence: $$ (A+B)^{-1}=A^{-1}-A^{-1}BA^{-1}+A^{-1}BA^{-1}BA^{-1}-A^{-1}BA^{-1}BA^{-1}BA^{-1}+..., $$ provided $Norm[A^{-1}B]<1$. So, my question is how we can write a code in Mathematica to write this approximation up to any desired term? For example, to obtain $(I+B)^{-1}$ up to six terms by keeping the fact that matrix multiplications are not commutative ($I$ is the identity matrix).
Can we also use three matrices inside, e.g. $(I+B+C)^{-1}$ and then compute the expansion using Mathematica?
Thank you in advance for any tips or tricks.