Q:

Characterize all finite unital rings with only zero divisors

Is it true that for every finite (for simplicity, commutative) ring $R$ in which every element not equal to $1$ is a zero divisor, is isomorphic to the zero ring or $\mathbb{Z}/2\mathbb{Z}$, $\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z}$, $\mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z} \times \mathbb{Z}/2\mathbb{Z}$ etc. The characterizing property of this sequence of rings is every element is a root of $x^2 - x$.
My work: First, consider the characteristic of $R$. If $R$ has characteristic not $1$ or $2$ then $1 \not= -1$ and $-1$ would then be a unit, not a zero divisor. If $R$ has characteristic $1$ then it's the zero ring. So take $R$ to have characteristic $2$. $R$ is a finite-dimensional algebra over $\mathbb{Z}/2\mathbb{Z}$; this implies its cardinality is $2^n$ for some $n$.
Then induction over $n$. Base case: $n=1$ so the cardinality of $R$ is $2^1$ which means $R \cong \mathbb{Z}/2\mathbb{Z}$. Inductive case: Assume it's true for all such rings with cardinality less than $2^n$; now we'll show it's true for $R$ with cardinality $2^n$. Take any element $x$ and forms its ideal $xR$. We see that $R/xR$ is a ring in the same form and so we apply the induction hypothesis to conclude that for any $y \in R$, $y^2 - y \in xR$. At this point I'm thinking of showing that $(1+x)R \cap xR = \{0\}$.

A:

The commutative case is very easy:
$R$ is reduced, since $1+a$ is a unit, if $a$ is nilpotent. Hence the product of all maximal ideals is zero. The Chinese Remainder Theorem then implies
$$R = R/\mathfrak m_1 \times \dotsc \times R/\mathfrak m_s,$$
so $R$ is a product of fields.
We consider the unit groups and deduce
$$\{1\} = R^* = (R/\mathfrak m_1)^* \times \dotsc \times (R/\mathfrak m_s)^*,$$
which shows that each field occuring is $\mathbb Z/2\mathbb Z$.

