I have the following question in my homework.
Let $R$ be a commutative ring with identity and $M$ be a maximal ideal of $R$ such that $M^2=\{0\}$. Show that $M$ is the unique maximal ideal of $R$.
My attempt:
I see that it's trivially true if $M=\{0\}$ in which case, $R$ becomes a field. However, in general,
$M^2=\{0\}\implies m_1m_2=0 \ \forall \ m_1,m_2\in M$.
This means all elements of $M$ are zero-divisors (and nilpotent too).
What are other implications of $M$ being an ideal which is both square-zero and maximal?
I am not sure how to proceed. I am doing an introductory ring theory course so do not use advanced theorems/tools to guide me.
By assumption every element of $M$ is nilpotent and hence* is contained in every prime ideal of $R$. This immediately implies that $M$ is equal to every prime ideal, and we see that $R$ has exactly one prime ideal (which, by the way, is much stronger than having exactly one maximal ideal).
*Here we only need the trivial observation that every prime ideal contains every nilpotent element ($x^n = 0 \in P \implies x \in P$).