Question
If \(A\) and \(B\) are square matrices such that \(AB = BA\), prove that \[ (A + B)^2 = A^2 + 2AB + B^2. \]
Solution
Step 1: Expand
\[ (A + B)^2 = (A + B)(A + B) \] \[ = A^2 + AB + BA + B^2 \]Step 2: Use Given Condition
\[ AB = BA \] \[ \Rightarrow AB + BA = AB + AB = 2AB \]Step 3: Substitute
\[ (A + B)^2 = A^2 + 2AB + B^2 \]Final Result
\[
(A + B)^2 = A^2 + 2AB + B^2
\]
Hence proved.