[Math] Examples of a commutative ring without an identity in which a maximal ideal is not a prime ideal

abstract-algebracommutative-algebraring-theoryrngs

In a commutative ring with an identity, every maximal ideal is a prime ideal.
However, if a commutative ring does not have an identity, I'm not sure this is true.
I would like to know the counterexamples, if any.
The more examples, the better.

EDIT
I would like to know the counterexamples other than $2\mathbb{Z}$.
The more examples, the better.

EDIT
I also would like to know the counterexamples that are not given in the Arturo Magidin's answer if any, namely an example of a non-prime maximal ideal which does not contain $R^2$.

Best Answer

You won't find any examples of maximal, non-prime ideals other than those given in Arturo Magidin's lovely answer. I won't even assume commutativity. And I freely admit that this is basically the same argument as in Arturo's answer!

Claim: If $R$ is a rng with a maximal ideal $M$ that is not prime, then $R^2 \subseteq M$.

Proof: Let $M$ be such an ideal, and suppose that $A,B$ are ideals of $R$ not contained in $M$ such that $AB \subseteq M$. By maximality of $M$ we have $M + A = R = M + B$. It follows that $$\begin{align*} R^2 &= (M+A)(M+B) \\ &= M^2 + AM + MB + AB \\ &\subseteq M, \end{align*}$$ since $M^2,AM,MB,AB \subseteq M$. QED

Combining this with Arturo's theorem, we have:

Corollary: Let $R$ be a rng with maximal ideal $M$. Then $M$ is not prime if and only if $R^2 \subseteq M$.