I'm trying to learn linear and abstract algebra on my own and have been attempting textbook exercises and problem sets I find online. I've been doing okay so far but I found this problem and I'm having a lot of trouble with it:
Let $A$ be an $n \times n$ complex matrix.
a) Show that the set of matrices commuting with $A$ is a subspace.
b) What is the dimension of this subspace?
I think I got the first part. It wasn't that bad. But I'm having trouble with the second part. I feel like this is supposed to be an easy question, but I just don't know how to start it.
I was thinking about using Jordan form somehow. If $A$ ~ $J_A$ and $B$ ~ $J_B$, is it true that if $J_A J_B = J_B J_A$ then $AB = BA$? If it is, then we'd only have to look at the Jordan blocks of these and see when those commute with each other. Then the problem wouldn't be so bad, I think.
I'd love some hints.