# Qual Problem: When do Matrices Commute?

I'm preparing for a qualifying exam and this problem came up on a previous qual:

Let A and B be nxn matrices. Show that if A + B = AB then AB=BA.

morphism
Homework Helper
Hint: Consider (A-I)(B-I), where I is the nxn identity matrix.

Thanks morphism!

(A-I)(B-I) = AB-A-B+I = AB-AB+I=I. Therefore B-I is the inverse of A-I so we have that I=(B-I)(A-I) = BA-A-B+I = BA-AB+I. Thus BA-AB = 0 as needed.

How did you know to write it that way? Also, do you know any good general conditions related to matrices which commute? What is necessary for AB=BA? What (other than A+B=AB) is sufficient for AB=BA?

Last edited:
morphism
Homework Helper
I wrote it that way after fidgeting around with A+B=AB for a while. If you rewrite this as A+B-AB=0 then you might try to factor out A or B to get A(I-B)+B=0 or B(I-A)+A=0. The symmetry inspired me to subtract I from both sides of the first equation to get A(I-B)+B-I=-I <=> A(I-B)-(I-B)=-I <=> (I-A)(I-B)=I.

As for your other questions, I can't think of anything useful off the top of my head.

Thanks. I found another thread with information about when matrices commute. Apparently two matrices commute iff they're simultaneously diagonalizable.

morphism