Is $(A+B)^2 = A^2 + B^2$ if $A$ and $B$ are matrices If $A$ and $B$ are matrices is $(A+B)^2 = A^2 + B^2$? 
I thought because, $AB + BA = AB - AB = 0$.
 A: $$(A+B)^2 = (A+B)(A+B) = A^2 + AB + BA + B^2 \neq A^2 + B^2$$
$(A+B)^2 = A^2 + B^2$ if and only if $AB + BA = 0 \iff AB = -BA$, but this is not true in general.
A: Consider the $1\times 1$ matrices.  What do we know from algebra?
In fact this is  called the "Freshman's Dream" and it appears that Kaj_H is trying to generalize this result for matrices (larger than $1\times 1$).
So in general if the characteristic of the field is $p$ (a prime) and the matrices are commutative then 
$$(A+B)^{p^n} = A^{p^n} + p*Stuff + B^{p^n}$$
but then $p*Stuff=0$ because the characteristic of the field is $p$, so 
$$(A+B)^{p^n} = A^{p^n} + B^{p^n}$$
But this is a general group structure statement, we just need conditions on the field for which matrices are defined over.  This is particularly simple to see if the matrices $A,B$ are diagonal, it reduces to the $1\times 1$ case for each (diagonal) entry.
A: No this is not true. Consider
$$
\left[\pmatrix{1 & 0 \\ 0 & 1}+ \pmatrix{1 & 0 \\ 0 & 1}\right]^2 \neq \pmatrix{1 & 0 \\ 0 & 1}^2 + \pmatrix{1 & 0 \\ 0 & 1}^2 
$$
Note also that it is not in general true that $AB = -BA$. Consider the case where $A = B$.
A: In general, this is not the case.  However, you can make it work with certain prior stipulations.  For example, $(A+B)^2 = A^2 + B^2$ if both of the following properties hold:


*

*$A, B \in M(2, \mathbb{Z_2})$

*$A, B$ are both diagonal matrices or both matrices with zeros everywhere except in the top right corner.

