TITLE: Let $A, B$ be square matrices of equal size ($n \times n$) and $A^2 + B =A^2B$. Prove that $AB=BA$
QUESTION [3 upvotes]: I need help with solving the problem about square matrices of equal size.
I know that if $A + B = AB$, then $AB = BA$, but I can't prove this one.
Please advise how to solve or think about this.
Thanks in advance )

REPLY [5 votes]: Left-inverses are right-inverses. In your original problem, $$(I-A)(I-B) = I - A - B + AB = I$$
and so $(I-A)(I-B) = I = (I-B)(I-A)$ giving the result.
In your next example $$I=(I-A^2)(I-B)=(I+A)(I-A)(I-B) \\ \text{and} \\ I = (I-B)(I-A^2)= (I-B)(I-A)(I+A)$$
This gives two expressions for $(I+A)^{-1}$ and the result follows.
{"set_name": "stack_exchange", "score": 3, "question_id": 3541310}