# Homework Help: Proving a subspace

1. Sep 15, 2011

### derryck1234

1. The problem statement, all variables and given/known data

Prove that the set of all n x n matrices A such that AB = BA for a fixed n x n matrix B, is a subspace of Mnn.

2. Relevant equations

u + v is in the same vector space as u and v.
ku is in the same vector space as u, where k is any real number.

3. The attempt at a solution

I am drawn to think of a diagonal matrix when I think of this question. And if I multiply a diagonal matrix by a scalar, it can only be a diagonal matrix or the zero matrix, either way, it AB still equals BA. Similarly, adding two diagonal matrices obtains either another diagonal matrix or the zero matrix...so, in this way, A is a subspace of Mnn.

Am I correct?

2. Sep 15, 2011

### lanedance

i would just test the subspace requirements directly:

clearly the zero matrix is n the set
now say A,B satisfy AB = BA then is cA+dB in the set? that will satisfy closure under scalar multiplication and addition