Show that $M_2(\mathbb{R})$ has no non-trivial two-sided ideals

Your example for a left and right ideal is fine. Your argument for the other part is not right: noncommutative rings can have nontrivial ideals. (I can't think of a very simple example off the top of my head, but it's true.) To show that $M_2(\mathbb R)$ has no nontrivial ideals, assume a nonzero element $A=\big(\begin{smallmatrix}a&b\\c&d\end{smallmatrix}\big)$ is contained in a nontrivial ideal. You can multiply $A$ by elementary matrices (i.e. perform row and column operations) to reduce it to one of the three matrices $$ \begin{bmatrix}0&0\\0&0\end{bmatrix},\, \begin{bmatrix}1&0\\0&0\end{bmatrix},\, \begin{bmatrix}1&0\\0&1\end{bmatrix}. $$ Now what can we conclude? (I omitted a lot of details. Can you fill them in?)


Assuming $M_2(\mathbb{R})$ refers to the set of all $2 \times 2$ real matrices:

If $A$ is a rank $2$ matrix, then $(A) = (I)$ is the whole ring. If $A$ is the zero matrix, then we get the trivial ideal. The only remaining possibility is that $A$ is a rank $1$ matrix.

By performing row operations (i.e. multiplying on the left by units) and column operations (i.e. multiplying on the right by units), we can produce any other rank $1$ matrix. So, we have $\pmatrix{1&0\\0&0} \in (A)$ and $\pmatrix{0&0\\0&1} \in (A)$. Because $(A)$ is closed under addition, $I \in (A)$, which means that $(A)$ is the entire ring.

Thus, the only two two-sided ideals are the trivial ideal and the ring itself.

As for nontrivial one-sided ideals, consider $$ \left\{A\pmatrix{1&0\\0&0}: A \in M_2(\mathbb{R})\right\}\\ \left\{\pmatrix{1&0\\0&0}A: A \in M_2(\mathbb{R})\right\} $$