apriiori

is zero a prime number

definitely not

Betteridge’s law of headlines will get the right answer to this one. Nonetheless, it’s often struck me as a little odd how often introductions to the idea of the prime number will explicitly call out one as controversial, while zero is entirely unremarked upon. Admittedly, this is probably because the case for including one can be made with only elementary mathematics, whereas you probably need to know a decent amount of ring theory before you will have any reaction other than bafflement at the idea that someone might consider zero to be prime.

The primality of one

Some definitions of “prime number” you might hear:

The first two definitions exclude one pretty much by fiat, by introducing some clause that is clearly only meant to rule out one as a prime number. The third and fourth do somewhat better—I especially like how the fourth gestures11 I say “gestures” because k-almost primality isn’t quite the same notion as divisor count. So maybe you should be thinking more about ({1}, primes, prime squares, square-free semiprimes and prime cubes, …). at the idea of the primes as being the 1−almost primes, contextualizing them in a sequence that starts ({1}, primes, semiprimes, triprimes, 4-almost primes, …). The fifth definition as stated simply includes one as a prime, though Loucka later says

The only factor of 1 is 1! That means 1 has only one factor, and prime numbers must have two. Because of this rule, 0 is also not a prime number.

On the other hand, Loucka also says

Prime numbers are always positive because positive numbers are the only numbers that can have only two factors. 3 has two factors, 1 and 3. On the flip side, -3 has four! They are 1, -3, -1, and 3.

and

so I have to admit I’m not greatly impressed.

I find these “greater than one” shenanigans a little upsetting. It’s so… clunky. I propose that the best definition is “a prime number is a natural number that has a unique factorization into natural numbers, modulo commutativity.” This is our first listed definition, except we dropped the clause explicitly excluding 1. We can do this because 1 actually has two factorizations: 1*1 and .

Okay, if you stare at that claim for a minute you will probably notice some issues. Like, does 2 have the two distinct factorizations 2*1 and 2*1*1? If we collapse those and say adding extra ones doesn’t count, do we also collapse 1*1 and ? Is really “a factorization into natural numbers” at all? Maybe this is a bad approach. I’m going back to the “exactly two divisors” definition.

Why did 1 get excluded, exactly? Historically mathematicians used to include it. The issue is that they kept finding themselves writing “the primes except 1.” Nowadays you still sometimes see people write “odd prime”, but it’s far less ubiquitous than “the primes except 1” used to be. In particular, excluding one makes the Fundamental Theorem of Arithmetic much nicer.

Euclid’s lemma and prime ideals

Euclid’s lemma—If a prime p divides the product ab of two integers a and b, then p must divide at least one of those integers a or b.

This is an important lemma in the proof of the Fundamental Theorem of Arithmetic. It’s a sufficiently fundamental lemma that it might be insightful to ask yourself which integers satisfy this property. The primes do, of course. The negatives of the primes clearly do as well.

And then there are three more: 1, -1, and 0. 1 and -1 satisfy it somewhat vacuously—they both divide every integer, and in fact divide every element of every ring33 Furthermore, 1 divides every element of every rig.. Zero is less vacuous—to say that Euclid’s lemma holds for zero is to say that the integers satisfy something called the zero-product property, which they’d better, because a commutative44 A noncommutative ring without the zero-product property is merely a domain. ring is an integral domain if and only if it satisfies the zero-product property, and it would be very upsetting if the integers failed to form an integral domain.

Now, ring theorists are fancy. Instead of saying “p divides ab”, they want to say

$$ ab \in (p) $$

where (p) = (-p)55 Actually, p = (up) where u is any unit, or invertible element, of R. In the Gaussian integers Z[i] for example, the units are 1, -1, i, and -i. In the dyadic rationals Z[1/2], the units are 1, -1, and integer powers of 2. I think.

7̲ That is, 2 to the power of an integer, not the powers of 2 which are also integers
is the ideal generated by p—that is, the smallest subset (p) of the rg R such that

Where the latter two conditions are what ensure that (p) is an ideal at all66 You (allegedly, I haven’t been entirely convinced) want ideals to be nonempty, but that's covered by saying it contains p..

The definition of a prime ideal 𝖕 is simply a proper ideal—that is, an ideal which is a proper subset of R—which satisfies Euclid’s lemma in the sense that

$$ ab \in \mathfrak{p} \implies a \in \mathfrak{p} \text{ or } b \in \mathfrak{p}. $$

The prime ideals of the integers Z are simply the ideals generated by the primes:

$$ \begin{align} (2) = (-2) &= \{..., -4, -2, 0, 2, 4, ...\}\\ (3) = (-3) &= \{..., -6, -3, 0, 3, 6, ...\}\\ (5) = (-5) &= \{..., -10, -5, 0, 5, 10, ...\}\\ &\;\;\vdots\\ (p) = (-p) &= \{..., -2p, -p, 0p, p, 2p, ...\} \end{align} $$

alongside the zero ideal

$$ (0) = (-0) = \{..., 0, 0, 0, 0, 0, ...\}. $$

If you’ve ever been annoyed by considering factorization among the integers, the observation that n and -n generate the same ideal might be helpful for sorting out the issues there.

The requirement that a prime ideal be a proper ideal specifically excludes only the unit ideal (1) = (-1) = Z. This has gone back to feeling slightly cheaty, like when we were including clauses like “greater than one” or whatever specifically to exclude one. But whatever, it usually makes sense in practice.

However, the notion of a prime ideal tends to be more useful in ring theory even though the maximal ideals arguably correspond more closely to the prime numbers. Indeed, nLab considers zero to be a prime element of Z, even if it isn’t a prime number. On the other hand, LessWrong appears to consider zero, one, and minus one to all be prime elements of Z, although it seems to thereby consider (1) to be a prime ideal. I think LessWrong might not be very authoritative on this topic.

Probably if you want to actually, like, form good opinions on this topic you need to, among other things, consider the theory of prime spectra in further depth than I have. But my dumb opinion is that one is highly overrated as a prime compared to zero.

  1. I say “gestures” because k-almost primality isn’t quite the same notion as divisor count. So maybe you should be thinking more about ({1}, primes, prime squares, square-free semiprimes and prime cubes, …).

  2. To be fair, the next sentence is “Prime numbers, besides 2, have to be odd.”

  3. Furthermore, 1 divides every element of every rig.

  4. A noncommutative ring without the zero-product property is merely a domain.

  5. Actually, p = (up) where u is any unit, or invertible element, of R. In the Gaussian integers Z[i] for example, the units are 1, -1, i, and -i. In the dyadic rationals Z[1/2], the units are 1, -1, and integer powers of 2. I think.

    7̲ That is, 2 to the power of an integer, not the powers of 2 which are also integers

  6. You (allegedly, I haven’t been entirely convinced) want ideals to be nonempty, but that's covered by saying it contains p.