Mathematical Immaturity

2.16 Exercises

14. $\quad$ (a) $\quad$ Verify that the algebraic identities $$(A + B)^2 = A^2 + 2AB + B^2 \quad \text{and} \quad (A + B)(A - B) = A^2 - B^2$$ do not hold for the 2 x 2 matrices $A = \begin{bmatrix} 1 & -1 \\ 0 & 2 \end{bmatrix}$ and $B = \begin{bmatrix} 1 & 0 \\ 1 & 2 \end{bmatrix}.$
(b) $\quad$ Amend the right-hand members of these identities to obtain formulas valid for all square matrices $A$ and $B.$
(c) $\quad$ For which matrices $A$ and $B$ are the identities valid as stated in (a)?

Solution.
(a) $\quad$ It will suffice to show that $AB \neq BA,$ as this would imply that $AB + BA \neq 2AB$ and $BA - AB \neq O.$ \begin{align*} AB &= \begin{bmatrix} 0 & -2 \\ 2 & 4\end{bmatrix} \quad BA = \begin{bmatrix} 1 & -1 \\ 1 & 3 \end{bmatrix} \end{align*} As we can see, $AB \neq BA.$ It follows that the above identities for $(A + B)^2$ and $(A - B)^2$ do not hold.

(b) $\quad$ The amended identities are as follows: \begin{align*} (A + B)^2 &= A^2 + AB + BA + B^2 \\ (A + B)(A - B) &= A^2 + BA - AB - B^2 \end{align*}

(c) $\quad$ For the identities to hold as in (a), $A$ and $B$ must commute.