Commutative Matrix Multiplication of Invertible Matrices I know that in general, the only matrices that are multiplicatively commutative are those that are scalar multiples of $I$, the identity matrix.
But what about matrices that are multiplicatively commutative with only invertible matrices?  Is it any different?  I don't think so, but I'm not certain, and am struggling to prove it.
Simply, with $A$ and $B$ both being $n\times n$ matrices over the reals, what are all $A$ such that $AB = BA$ if $B$ is invertible?
I suppose in group theory this could be phrased as the centre of the general linear group over the reals - $S(GL_n(\mathbb{R}))$.
 A: So I solved this using an approach similar to what Jack Schmidt described in the comments to the question.
I used the approach of $E_{i,j}$ being the matrix with 1 at position (i, j) and 0 elsewhere.  Then $(I+E_{i,j})A = A(I+E_{i,j})$ iff $E_{i,j}A = AE_{i,j}$.  Thus $A$ must be diagonal.  
Now I defined the matrix $P_{i,j}$ to be the identity matrix with rows i and j swapped.
Now if $A$ is diagonal with $a_{i,i} \neq a_{j,j}$ then $P_{i,j}A \neq AP_{i,j}$ and so $A$ must be $xI$ for some $x \in \mathbb{R}$. If $x = 0$ then $A \neq GL_n(\mathbb{R})$.  Also, $AB = xIB = BxI = BA$ so then $Z(GL_n(\mathbb{R})) = \{xI \mid x \in \mathbb{R}, x \neq 0\}$.
Again, big thanks to Jack Schmidt.
A: I think you can use the Schur's lemma in representation theory and then it will be easy.
A: If $R$ is  a unital ring, the center of $GL_n(R)$ is the set of scalar matrices whose scalar is a central invertible element in the ring.  In the case $R=\mathbb{R}$, we see that the center is all nonzero scalar matrices.
