If $A+B=AB$ then $AB=BA$

Solution 1:

Consider the expression $$(A-\mathbb 1)(B-\mathbb 1)=AB-A-B+\mathbb 1=\mathbb 1$$

Thus $(A-\mathbb 1)$ and $(B-\mathbb 1)$ are inverse to each other, whence $$\mathbb 1= (B-\mathbb 1)(A-\mathbb 1)=BA - A - B + \mathbb 1$$

It follows that $$BA=A+B=AB$$ and we are done.

Note: here $\mathbb 1$ denotes the appropriate identity matrix.