# Commutativity in rings of matrices

Let n be arbitrary positive integer and R arbitrary ring (perhaps, non-associative). Let's denote $M_n(R)$ the set of all $n х n$ matrices with entries from R.

As i know if R is non-trivial commutative ring without zero divisors then scalar matrices are the only matrices which commutate with all other matrices over R.

By scalar matrix i mean diagonal matrix such that all its diagonal entries are equal.

I have the following question: what if R is non-trivial ring WITH zero divisors? Is it possible that there is matrix $M \in M_n(R)$ such that $\forall A\in M_n(R) ~~ AM = MA$ but M is non-diagonal or at least non-scalar.

$M$ is in the center of $M_n(R)$ iff $M$ commutes with all matrices $E_{ij}$ (the $(i,j)$th entry equals $1$ and others $0$). From here you can easy obtain the answer.