# Number of maximal ideals of a commutative ring with unity which is not a field.

Let $R$ be a commutative ring with unity 1 which is not a field. Let $I\subset R$ be a proper ideal such that every element of $R$ not in $I$ is invertible in $R$. Then find the number of maximal ideals of $R$?

Now since $I$ does not contain any invertible element so $1$ does not belong to $I$, so $I\not=R$. But how to count the number of maximal ideals? I want hint to solve this problem. Can anyone provide me a hint please? Thank you.

Firstly, note that a proper ideal $J$ cannot contain invertible elements: in this case it would contain also 1, thus everything; but it was a proper ideal!
Now let $m$ be a maximal ideal. Suppose $m$ is not contained in $I$: by the assumptions, $m$ contains an invertible element, absurd for the above observations (a maximal ideal is proper!).
But then $m$ is ... and by maximality... Can you conclude the proof?
Let $A$ be any ideal, if $x\in A$ but not in $I$ then $x$ is invertible but this is absurd. As a result, any ideal is inside $I$. There is only one maximal ideal which is $I$.