Solution (source code)

= Solution

The inverse is assumed to exist. First,
$$
(I+M)(I-M)=I-M^2=(I-M)(I+M).
$$
By <matrix commutation with an inverse>, multiplying on both sides by $(I-M)^{-1}$ gives
$$
\boxed{(I+M)(I-M)^{-1}=(I-M)^{-1}(I+M).}
$$
An equivalent calculation writes $I+M=2I-(I-M)$, so both products equal $2(I-M)^{-1}-I$. No convergent infinite <matrix> series is needed.