# Proof of property of local rings

I would like to prove:

If every $x \in R - m$ where $R$ is a ring and $m$ is an ideal is a unit then $R$ is local with maximal ideal $m$

Can you tell me if my proof is right:

Want to show that there are no other maximal ideals, i.e. there are no (proper) ideals $n$ of $R$ such that $n$ is maximal.

Consider $I$ in $R$, a proper ideal. Then $i \in I$ is not a unit (otherwise $I$ wouldn't be proper). Hence $i \in m$. Hence $I \subset m$. Hence $I$ is not maximal.

Looks OK. One comment - $I$ can be equals to $m$, so it can be maximal. But the proof is still correct.