Ring without zero divisors that has positive characteristic must have prime characteristic

Let $R$ be an integral domain and suppose $R$ has characteristic $n > 0$. Prove that $n$ must be prime.

I just proved this exercise, but I think it needs extra conditions. We can prove the statement if $R$ is ring without zero divisors. It's not needed $R$ to be commutative or to have an identity.

Here is the proof.

Let $n$ is characteristic which is not prime. So $n = mk$ and neither $m$ nor $k$ are characteristic so exists $a,b\in R$ for $ma\ne0$ and $kb\ne 0$. So we have $0 = n(ab) = mk(ab)=(ma)(kb)$ which contradicts that $R$ hasn't zero divisors.

What is wrong with this proof?

Definition 2.16 If $R$ is an arbitrary ring and there exists a positive integer $n$ such that $nr = 0$ for every $r \in R$ (i.e. $r$ added to itself $n$ times is the zero element) then the least such positive integer $n$ is called the characteristic of $R$, and $R$ is said to have positive characteristic. If no such positive integer $n$ exists, $R$ is said to have characteristic $0$.

Your proof does not work for the zero ring (fortunately, that is not an integral domain). It has non-prime characteristic $1$. Apart from that, your proof is ok.
• @user10024395 If your unital ring has characteristic $p$, then $p$ is zero. – Mike Pierce Sep 14 '18 at 16:09