You're pretty much there, I'd say. The subspace you're seeking is the subspace of diagonal matrices. All you need check is closure under scalar multiplication and vector addition, which is easy.
Problem:
Determine the subspace of R(2 by 2) consisting of all matrices that commute with the given matrix:
(1 0 ) =B
(0 -1)
Attempt at sol'n:
I wanted a general 2 by 2 matrix A so that AB=BA. Multiplying out component wise, I think that it must be the case that a11=a11, a12=-a12=0, -a21=a21=0, and -a22=-a22. So I think that
(1 0 ) (a11 0 ) = (a11 0 ) (1 0 )
(0 -1) (0 -a22) (0 -a22) (0 -1)
And I already know that if S is a subspace of R(n by n) where S is the set of all matrices that commute with a fixed vector in R(n by n) that S is a subspace of R(n by n).
So is the above sufficient or do I need to do something entirely different?
You're pretty much there, I'd say. The subspace you're seeking is the subspace of diagonal matrices. All you need check is closure under scalar multiplication and vector addition, which is easy.
Well I know from the fact that S is a subspace of R(n by n) that my particular example is closed under addition and multiplication (right?). But I'm not sure how to write my answer in set builder notation. For my particular S,
S={A such that ?}