For matrices A and B of the same order, the expansion of (A+B)(A−B) requires careful attention because matrix multiplication is not commutative.
Expanding using the distributive property:
(A+B)(A−B)=A(A−B)+B(A−B)
Distributing A into (A−B):
A(A−B)=A2−AB
Distributing B into (A−B):
B(A−B)=BA−B2
Combining the results:
(A+B)(A−B)=A2−AB+BA−B2
(A+B)(A−B)=A2−B2+BA−AB
The expression cannot be simplified to A2−B2 because matrix multiplication is not commutative, meaning AB=BA in general.
Therefore, the terms BA−AB do not cancel out and must remain in the final expression.
Therefore, (A+B)(A−B)=A2−B2+BA−AB