Center of general linear group is group of scalar matrices over center

Statement
Let $$R$$ be a (not necessarily commutative) unital ring, and $$n$$ be a natural number. Let $$GL_n(R)$$ denote the group of $$n \times n$$ invertible matrices over $$R$$. The center of $$GL_n(R)$$ is the subgroup comprising scalar matrices whose scalar entry is a central invertible element of $$R$$.

In particular, for a field $$k$$, the center comprises scalar matrices with a nonzero scalar value.

Proof
Note that the proof is clear for $$n = 1$$, so we consider the case $$n \ge 2$$ here.

First step: any element of the center commutes with off-diagonal matrix units
Suppose $$i,j$$ are distinct elements of $$\{ 1,2,3, \dots, n \}$$ and $$\lambda \in R$$. Define $$e_{ij}(\lambda)$$ to be the matrix with $$\lambda$$ in the $$(ij)^{th}$$ entry and zeroes elsewhere. $$e_{ij}(1)$$ is termed the $$(ij)^{th}$$ matrix unit.

Define $$E_{ij}(\lambda)$$ as the sum of the identity matrix and $$e_{ij}(\lambda)$$.

Note that:


 * $$E_{ij}(\lambda)$$ and $$E_{ij}(-\lambda)$$ are two-sided multiplicative inverses for any $$\lambda \in R$$. Thus, $$E_{ij}(\lambda) \in GL_n(R)$$.
 * Any matrix that commutes with $$E_{ij}(1)$$ must also commute with $$e_{ij}(1)$$, because of distributivity and the fact that the matrix commutes with the identity. Thus, any matrix in the center of $$GL_n(R)$$ commutes with $$e_{ij}(1)$$ for $$i \ne j$$.

Second step: Anything that commutes with off-diagonal matrix units is a diagonal matrix
Suppose $$A$$ is a matrix with $$a_{ji} \ne 0$$ for some $$i \ne j$$. Consider the matrix $$B = e_{ij}(1)$$. Then, the $$(jj)^{th}$$ entry of $$AB$$ is nonzero, while the $$(jj)^{th}$$ entry of $$BA$$ is zero. Thus, any matrix that commutes with all the off-diagonal matrix units $$e_{ij}(1)$$ cannot have any off-diagonal entries.

Third step: Any diagonal matrix that commutes with all permutation matrices is scalar
Suppose $$A$$ is a diagonal matrix with $$a_{ii} \ne a_{jj}$$. Then $$A$$ does not commute with the permutation matrix corresponding to the transposition of $$i$$ and $$j$$, because conjugation by that matrix switches $$a_{ii}$$ with $$a_{jj}$$.

Combining the facts
Combining the first two steps yields that any matrix in the center of $$GL_n(R)$$ must be diagonal, and the third step then yields that it must be scalar. Looking at when two scalar matrices commute, we see that the matrix must in fact be a scalar matrix with the scalar value itself a central and invertible element of $$R$$.