## Characterize the two-sided ideals of a matrix ring

Let $R$ be a ring and $n \geq 2$ an integer. Prove that every two-sided ideal of $M_n(R)$ is equal to $M_n(J)$ for some two-sided ideal $J \subseteq R$.

First, let $I \subseteq M_n(R)$ be a two-sided ideal. Let $J \subseteq R$ consist of all elements $r \in R$ such that $r = (A)_{i,j}$ for some $A \in I$ and $1 \leq i,j \leq n$. We will first show that $J$ is an ideal of $R$, and then show that $I = M_n(J)$.

Let $x = (A)_{p,q}$ and $y = (B)_{s,t}$ be in $J$, with $A,B \in I$. Recall from this previous exercise that $E_{p,q}AE_{s,t}$ is the matrix whose $(p,t)$ entry is the $(q,s)$ entry of $A$ and all other entries are zero.

Since $I$ is a two sided ideal, we have that $E_{1,p}AE_{q,2}$ and $E_{1,s}BE_{t,2}$ are in $I$. Moreover, $E_{1,p}AE_{q,2} - E_{1,s}BE_{t,2} \in I$, and the $(1,2)$ entry of this matrix is $x-y$. Thus $J$ is closed under subtraction.

Since $I$ is an ideal, we have $0 \in I$. Thus $0 \in J$, and $J$ is an additive subgroup of $R$.

Now it suffices to show that for all $r \in R$ and $x \in J$, $xr, rx \in J$. To that end, note that $(rI)A = rA \in I$, and that the $(p,q)$ entry of $rA$ is $rx$; thus $rx \in J$. Similarly, since $Ar \in I$, $xr \in J$. Hence $J \subseteq R$ is an ideal.

It is clear that $I \subseteq M_n(J)$; To show the other direction, let $A = [x_{i,j}] \in M_n(J)$. Since each $x_{i,j} \in J$, we have $x_{i,j} = (B_{i,j})_{a_{i,j},b_{i,j}}$ for some matrix $B_{i,j} \in I$, for each $i$ and $j$, and for some $a_{i,j}$ and $b_{i,j}$. In particular, $x_{i,j}E_{i,j} = E_{i,a_{i,j}}A_{i,j}E_{b_{i,j},j} \in I$ for each $i$ and $j$. Note then that $A = \sum_{1 \leq i,j \leq n} x_{i,j}E_{i,j} = \sum_{0 \leq i,j \leq n} E_{i,a_{i,j}}A_{i,j}E_{b_{i,j},j} \in I$, since $I$ is an ideal. Thus $M_n(J) \subseteq I$, and we have $I = M_n(J)$.

Now we need to show that if $J \subseteq R$ is a two-sided ideal, then $M_n(J) \subseteq M_n(R)$ is a two-sided ideal.

To that end, let $A = [x_{i,j}]$ and $B = [y_{i,j}]$ be in $M_n(J)$. Then $x_{i,j}, y_{i,j} \in J$, so that $x_{i,j} - y_{i,j} \in J$. Hence $A+B = [x_{i,j} - y_{i,j}] \in M_n(J)$. Thus $M_n(J)$ is closed under subtraction.

Since $0 \in J$, we have $0 \in M_n(J)$. Thus $M_n(J)$ is an additive subgroup of $M_n(R)$.

Finally, let $T = [t_{i,j}] \in M_n(R)$; it suffices to show that $AT, TA \in M_n(J)$. Recall that $AT = [c_{i,j}]$, where $c_{i,j} = \sum_{k=1}^n a_{i,k}b_{k,j}$. Since $J \subseteq R$ is a two-sided ideal, $c_{i,k} \in J$. Thus $AT \in M_n(J)$. Similarly, $TA \in M_n(J)$. Thus $M_n(J) \subseteq M_n(R)$ is a two-sided ideal.