Find the center of the group $\operatorname{GL}(n,\mathbb R)$ of invertible $n \times n$ matrices. [duplicate]
Outline: Let $I \in GL(n, \mathbb{R})$ be the identity matrix. Fix indices $i,j$, and let $E_{ij}$ be the matrix that is zero everywhere except in the $i$th row and $j$th column, where it has the entry $1$. Let $A$ be an arbitrary member $GL(n,\mathbb{R})$ with entries $a_{ij}$. We note that $$ A(I + E_{ij}) = AI + AE_{ij} = A + \pmatrix{ &&&a_{1i}&&&\\ 0&\cdots&0& \vdots&0&\cdots&0\\ &&&a_{ni}&&&} $$ That is, every column of $A E_{ij}$ is all zeros except the $j$th, which is simply the $i$th column of $A$. Similarly, we compute $$ (I + E_{ij})A = IA + E_{ij}A = A + \pmatrix{ 0&\cdots&0\\ &\vdots&\\ a_{j1} & \cdots &a_{jn}\\ &\vdots&\\ 0&\cdots&0} $$ That is, every row of $E_{ij}A$ is all zeros except the $i$th, which is simply the $j$th row of $A$.
Now, for $A$ to be in the center, we must have $(I + E_{ij})A = A(I + E_{ij})$. It follows that $E_{ij}A = A E_{ij}$. Based on this, what can we conclude about the entries of $A$? (In particular, show that the off-diagonal entries must be zero, and that $a_{ii} = a_{jj}$ for each pair of indices $i,j$).
Show that any matrix satisfying the above conditions lies in the center.