# Homework Help: Matrix problem about AB = BA

1. Nov 9, 2008

### soopo

1. The problem statement, all variables and given/known data
Let $$A, B \epsilon R$$n x n.

2. Relevant equations

A. Show that if AB = BA, then
(A + B)2 = A2 + 2AB + B2.

B. Give an example of 2 x 2 matrices A and B such that
(A + B)2 $$\neq$$ A2 + 2AB + B2.

3. The attempt at a solution
I have tried to find such a matrices A and B such that the requirements applies. Perhaps, this allows to show the equations.

Last edited: Nov 9, 2008
2. Nov 9, 2008

### gabbagabbahey

For part (a), just expand $(A+B)^2$...what do you get when you do that?

3. Nov 9, 2008

### soopo

$$A^2 +2AB + B^2$$. Do you suggest that this is enough for A?

I accidentally managed to solve B: an example is A= <1, 0; 1, 1> and B= <1, 1; 0, 1>.

Last edited: Nov 9, 2008
4. Nov 9, 2008

### gabbagabbahey

this is only true when AB=BA, since

$$(A+B)^2=(A+B)(A+B)=AA+AB+BA+BB=A^2+AB+BA+B^2$$

...do you follow?

5. Nov 9, 2008

### soopo

Good Point! This must be enough for A. Thanks!