TITLE: Does this property of comaximal ideals always hold?
QUESTION [5 upvotes]: I am reading a paper in which the following result is used, but I can’t see the proof of this.

Let $R$ be a commutative ring with only two maximal ideals, say $M_1$ and $M_2$. Suppose $m_1 \in M_1$ is  such that $m_1 \notin M_2$. Then can we always find $m_2 \in M_2$ such that $m_1+m_2=1$?

Any ideas?

REPLY [8 votes]: Take $R=\mathbb{Q}\times\mathbb{Q}$, $M_1=\mathbb{Q}\times\{0\}$, $M_2=\{0\}\times\mathbb{Q}$, and $m_1=(2,0)\in M_1\setminus M_2$. Then $(1,1)\in\mathbb{Q}\times\mathbb{Q}$ satisfies that $$(1,1)-(2,0)=(-1,1)\notin M_2$$
Therefore, that property is not satisfied in general.
Maybe the property that they are really using is that there exist $a\in M_1$ and $b\in M_2$ such that $a+b=1$. Not arbitrary $a,b$. This other property is immediate by using the maximality of $M_1$ and $M_2$, which implies that $M_1+M_2=R$.