If A and B are two square matrices of the same size, then (A+B)2=A2+2AB+B2can hold if and only if
AB = BA
AB + BA = O
|AB| ≠ 0
|AB| = 0
(A+B)2=(A+B)(A+B)=A2+BA+AB+B2
∴(A+B)2=A2+2AB+B2 if and only if AB = BA