I must be prove the following result: Let $R$ a commutative ring with unity, then \begin{equation} \bigg (a\in R\;\text{is invertible}\bigg) \Longleftrightarrow \bigg(a\in I,\text{when}\;I\subseteq R\;\text{is not maximal}\bigg). \end{equation}
My attempt: ($\Rightarrow$) Let $a\in R$ invertible, then $R=(a)$. Indeed, if it were not $1\notin(a)$, then $a$ would not be invertible. Therefore $R=(a)$, then $a\in(a)$ which is not maximal. (Correct?)
$(\Leftarrow)$ For this implication I know I must use the Krull-Zorn Lemma, which states that every proper ideal of $R$ is contained in a maximal ideal. Could someone help me complete the proof? Thanks!
The proof for $(\Rightarrow)$ is correct. For the implication $(\Leftarrow)$, suppose that for every ideal $I$ of $R$, if $a \in I$ then $I$ is not maximal. Now, if $a$ is not invertible then the ideal generated by $a$ is a proper ideal of $R$ and hence, by Krull-Zorn Lemma, we have that $(a) \subseteq \mathfrak{m} $ for some maximal ideal $\mathfrak{m}$ of $R$ which contradicts our hypothesis thus, $a$ is invetrible.