if A and B are two matrices such that AB = B and BA = A, then A2+B2 is equal to
2AB
2BA
A+B
AB
Proceeding as in Example 2, we have
A2=A and B2=B
∴ A2+B2=A+B