Solution:
Key idea: By definition (A+B)2 means (A+B)(A+B), and expanding with the distributive law gives A2+AB+BA+B2 (keeping AB and BA separate). This equals A2+2AB+B2 only when AB=BA; it equals A2+B2 only when AB+BA=O. Because matrix multiplication is not commutative, these conditions must be checked.
Step 1 — Part (i): find A+B and (A+B)2.
We add the matrices entry by entry and then multiply the sum by itself.
A+B=[3−1−10]
(A+B)2=[3⋅3+(−1)⋅(−1)(−1)⋅3+0⋅(−1)3⋅(−1)+(−1)⋅0(−1)⋅(−1)+0⋅0]
(A+B)2=[10−3−31]
Step 2 — Part (i): find A2, AB and B2.
Each product is worked out row by column.
A2=[2⋅2+(−1)⋅00⋅2+1⋅02⋅(−1)+(−1)⋅10⋅(−1)+1⋅1]
A2=[40−31]
AB=[2⋅1+(−1)⋅(−1)0⋅1+1⋅(−1)2⋅0+(−1)⋅(−1)0⋅0+1⋅(−1)]
AB=[3−11−1]
B2=[1⋅1+0⋅(−1)(−1)⋅1+(−1)⋅(−1)1⋅0+0⋅(−1)(−1)⋅0+(−1)⋅(−1)]
B2=[1001]
Step 3 — Part (i): find A2+2AB+B2.
We double AB and add the three matrices entry by entry.
A2+2AB+B2=[4+6+10−2+0−3+2+01−2+1]
A2+2AB+B2=[11−2−10]
Step 4 — Part (i): compare and explain.
The two results differ (for example, the (1,1) entries are 10 and 11). To see why, we also find BA.
BA=[1⋅2+0⋅0(−1)⋅2+(−1)⋅01⋅(−1)+0⋅1(−1)⋅(−1)+(−1)⋅1]
BA=[2−2−10]
Since BA=AB, the middle terms AB+BA are not equal to 2AB. The identity (A+B)2=A2+2AB+B2 holds only for matrices that commute, so it fails here.
Step 5 — Part (ii): find AB and BA.
We multiply row by column, using i2=−1 where needed.
AB=[0⋅0+1⋅i1⋅0+0⋅i0⋅(−i)+1⋅01⋅(−i)+0⋅0]
AB=[i00−i]
BA=[0⋅0+(−i)⋅1i⋅0+0⋅10⋅1+(−i)⋅0i⋅1+0⋅0]
BA=[−i00i]
Step 6 — Part (ii): use AB+BA=O.
Adding the two products, every entry cancels, so AB+BA is the zero matrix. Then the expansion loses its middle terms.
(A+B)2=A2+(AB+BA)+B2
(A+B)2=A2+B2
Step 7 — Part (ii): check directly.
As a check, we compute both sides. First A+B and its square:
A+B=[01+i1−i0]
(A+B)2=[(1−i)(1+i)00(1+i)(1−i)]
(A+B)2=[2002]
Here (1−i)(1+i)=1−i2, and with i2=−1 this gives 2. Next, A2 and B2:
A2=[1001]
B2=[0⋅0+(−i)⋅i00i⋅(−i)+0⋅0]
B2=[1001]
So A2+B2 is 2I, the same as (A+B)2.
Step 8 — Part (iii): find AB and BA.
Here x is a number with x2=−1. We multiply row by column.
AB=[0⋅0+(−x)⋅1x⋅0+0⋅10⋅1+(−x)⋅0x⋅1+0⋅0]
AB=[−x00x]
BA=[0⋅0+1⋅x1⋅0+0⋅x0⋅(−x)+1⋅01⋅(−x)+0⋅0]
BA=[x00−x]
Step 9 — Part (iii): conclude.
Adding, AB+BA is the zero matrix, so again the middle terms of the expansion vanish.
(A+B)2=A2+(AB+BA)+B2
(A+B)2=A2+B2
Step 10 — Part (iii): check directly.
We compute A2, B2 and (A+B)2, using x2=−1.
A2=[−x200−x2]
A2=[1001]
B2=[1001]
A+B=[01+x1−x0]
(A+B)2=[(1−x)(1+x)00(1+x)(1−x)]
(A+B)2=[1−x2001−x2]
(A+B)2=[2002]
Both (A+B)2 and A2+B2 equal 2I.
Therefore, (i) (A+B)(A+B)=A2+2AB+B2, because AB=BA; (ii) (A+B)2=A2+B2, because AB+BA=O; (iii) (A+B)2=A2+B2, because AB+BA=O.