Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.
  • Is zero a prime number?

  • Is zero odd or even?

  • Is zero a number?

If yes or no, then why?

share|cite|improve this question

closed as off-topic by avid19, Najib Idrissi, Joe Johnson 126, Aaron Maroja, Harish Chandra Rajpoot Sep 26 at 0:18

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – avid19, Najib Idrissi, Joe Johnson 126, Aaron Maroja, Harish Chandra Rajpoot
If this question can be reworded to fit the rules in the help center, please edit the question.

I don't think this question should be closed. The OP has asked quite a few questions on prime numbers today, and is asking them out of interest. Closing it because it lacks motivation is petty! –  user1729 Oct 25 '13 at 11:16
@user1729 About two years afterwards, is that fact that OP "asked quite a few questions [the same day two years ago]" still relevant? Wouldn't it have been better to edit the question at that time (or even do it today) instead? Because now the question is on the front page (one answer has been edited), and it's still badly missing context. It contains three different questions, and each answer is answering a mixture of the three indiscriminately. –  Najib Idrissi Sep 25 at 8:11
@Vitalie: Vandalizing your posts here is absolutely unacceptable. If you continue, you will almost certainly be suspended by the moderators. –  Zev Chonoles Sep 26 at 18:04
What @Zev said, Vitalie, do not vandalise your posts. –  Daniel Fischer Sep 26 at 18:10
@Vitalie: If you would Include some information about why you asked the question in the first place, this question would be a prime candidate for reopening. (And it's on hold precisely because it lacks any such information.) –  Cameron Buie Sep 26 at 18:24

10 Answers 10

up vote -11 down vote accepted

The definition of a prime number is such that it is a positive integer greater than $1$ that is divisible only by $1$ and itself.

Zero does not satisfy this condition. Hence zero is not prime.


share|cite|improve this answer
There are multiple other answers that say "no, by definition", one from nearly 2 years ago even. Why isn't this solution just an extremely late and redundant copy? That would be an important point to address if you are to improve the solution at all. –  rschwieb Sep 25 at 15:38

If you are willing to accept the integers as numbers, then you should have no trouble considering $0$ a number. For one willing to define even numbers as "integer multiples of $2$" then it's similarly clear that $0$ should be considered even. The question as to whether or not it should be considered prime is more interesting.

What should primes be?

After you learn about divisibility and factorization, this idea arises about breaking numbers down into smaller parts (sort of like describing matter with smaller and smaller parts). Divisibility makes a partial order on the nonegative integers. This just means that since $12=3\cdot 4$, the "smaller parts" 3 and 4 dividing 12, we can record this as $3\prec 12$ and $4\prec 12$. Furthermore $2\prec 4$ because $2$ divides $4$, and so on. Since $1$ divides everything, we would say that $1\prec n$ for any nonegative integer $n$.

In physics, we are interested in the smallest things from which everything is built from (the "atoms"!). The idea of atoms has two parts:

  • they should all be "small"
  • they should build everything else

Well, we can't let $1$ be such a thing, because it would be the only smallest thing, and moreover you can't build anything from $1$ alone. So it is in a sense, too simple.

The next best candidates are those things just above $1$. What just above means becomes clearer if you draw a picture:

divisibility diagram

This is a sort of Hasse diagram for the nonnegative integers partially ordered by divisibility. Since the diagram is infinite it's not really a Hasse diagram, and the lines to zero don't really come from any numbers, but this is good for our purposes.

From the diagram you can easily see that the primes lie in the first row above $1$, and so they are "as small as possible" without being $1$, and moreover, everything above them (excepting zero) is built out of various combinations of the primes. The gradeschool definition of prime number basically amounts to the fact that nothing lies between $1$ and $p$ for each prime.

Zero, paradoxically, is really aloof and nowhere near the rest of the primes: he doesn't seem very small after all. Moreover he is pretty useless for building numbers since $0n=0$ for any $n$.

So for reasons like these, $0$ is not considered as a prime: he doesn't make a good "atom."

share|cite|improve this answer
+1 Very nice! The partial ordering argument is one of the best I've seen. –  Cameron Buie Oct 29 '13 at 15:02
Nice answer +1. However when you wrote (about $1$) that "All of its multiples are just $1$", you must have been thinking of something different. Maybe "powers" instead of "multiples"? –  Marc van Leeuwen Feb 7 '14 at 8:05
@MarcvanLeeuwen your guess as to my state of mind at the time is as good as mine at this point :) I decided on just removing the line. Thanks for the careful reading! –  rschwieb Feb 7 '14 at 10:59

Zero is not a prime number out of almost every definition of prime numbers:

  1. Prime numbers are those natural numbers that are divisible solely by the unity ($1$) and themselves. $0$ is divided by every natural number! $5\cdot0=0,n\cdot0=0,\ldots$ (or not divided at all if you want to exclude zero from the definition of (natural) number).
  2. Prime numbers are the cornerstone of arithmetics from its fundamental theorem: every (non-zero) natural number has a unique representation in prime numbers. $0$ only represents itself and that representation is not unique: $0=0^1=0^2=0^{12807}\cdot2^{9987}\cdot97^1\ldots$

Zero is indeed even as even are defined as those numbers divisible by $2$, and $2\cdot0=0$, therefor $0$ is divisible by $2$. (Unless you want to exclude zero from the definition of (natural) number)

So, the final question: Is zero a number?

In most sets defined as numbers: Integers ($\mathbb Z$), Rationals ($\mathbb Q$), Reals ($\mathbb R$), Complex ($\mathbb C$), then $0$ is an important element. It cannot be excluded from the definition of number in those sets.

The question is about natural numbers ($\mathbb N$), and you can construct a number theory with $0$ as part of the natural numbers and without $0$ as part of the natural numbers. I like to include $0$ as a natural number as it seem to solve some problems more easily than excluding it, yet it adds some complexities.

Note that in the definitions of “prime number” it is better to explicitly exclude $0$, as zero has no purpose in the fundamental theorem of arithmetics, all arithmetics based on that theorem can be done in the set $\mathbb N\setminus\{0\}$ (this is the Natural numbers explicitly excluding $0$).

Let's write the fundamental theorem of arithmetics if $0\notin\mathbb N$ (by number then we mean any natural number except 0)

FTA with no zero

Every number $n$ has a unique representation in prime numbers $n=p_1^{k_1}\cdot p_2^{k_2}\cdots p_i^{k_i}$ (for a finite set of primes $p_j$).

And let's formulate it for $0\in\mathbb N$

FTA with zero

Every number $n$ (with $n\ne0$) has a unique representation in prime numbers $n=p_1^{k_1}\cdot p_2^{k_2}\cdots p_j^{k_j}\cdots$ (where $p_j$ is the $j$th prime number (and $k_j$ can be $0$)).

In the first formulation we cannot have $0$ as exponent, so we would strip all primes that don't divide $n$. We just won't include them in the formulation. In the second formulation we must except $0$ from every number, but we can, on the other hand, include all prime numbers and if $p_j$ does not divide $n$ then we set the exponent $k_j=0$.

share|cite|improve this answer
aded some ....... to validate post: tx u, Carlos. –  Vitalie Ghelbert Oct 25 '13 at 20:52
You can well upvote the answer for validation, @VitalieGhelbert. Or accept it. –  Carlos Eugenio Thompson Pinzón Oct 25 '13 at 20:56
At the moment could only accept, not sufficient days on the Earth to UpVote :p, first day on Math :) –  Vitalie Ghelbert Oct 25 '13 at 20:58
mmm, sorry, I'm laying! neet 15 points, to UpVote, lost some points on some recent posts. If the remuneration was in negatives, i'll be first one :p –  Vitalie Ghelbert Oct 25 '13 at 20:59
An integer number is prime when it has ${\bf\mbox{only two }}$ divisors and they are not equal. It excludes ONE. –  Felix Marin Oct 31 '13 at 8:18

A: No.

A: Even.

A: Yes.

share|cite|improve this answer
10x. Very useful article. –  Vitalie Ghelbert Nov 2 '14 at 12:15
@VitalieGhelbert To give more details to the third problem see my answer here. –  user153012 Nov 2 '14 at 12:36
Just added new question: Do we have negative prime numbers? –  Vitalie Ghelbert Nov 2 '14 at 12:39

By definition, a prime number is a non-$0$, non-unit integer $p$ such that for any integers $m,n$, if $mn$ is a multiple of $p,$ then $m$ or $n$ is a multiple of $p$. Aside from the whole non-$0$ condition, it fits perfectly.

It is even, as it is a multiple of $2$ (as it is a multiple of every number).

It is a (real/complex/integer) number.

share|cite|improve this answer
If 0 were a prime we would not have uniqueness in the fundamental theorem of arithmetic. Pretty good reason to leave 0 out. –  M.B. Oct 25 '13 at 10:54
@M.B. That, plus a whole load of very similar cases, is one reason $1$ isn't considered a prime either. –  Arthur Oct 25 '13 at 11:52

Zero is not prime, since it has more than $2$ divisors.

Zero is even, since $0 = 2 \cdot 0$, and $0$ is an integer.

If we use "number" in essentially any of the usual senses (integer, real number, complex number), yes, zero is a number.

share|cite|improve this answer
Dear @Bongers : I don't disagree with the observation in the first line, but in almost all sources, prime numbers are defined to be nonzero, and I think that kind of trumps anything you might say about divisors. I'm not suggesting you need to change anything: I just wanted to bring this to future readers' attention. Regards! –  rschwieb Oct 25 '13 at 12:46
@rschwieb I find the definition of prime numbers to be non-zero an exceptionally boring reason as to why zero is not a prime number. It implies that "zero is not a prime number because someone defined it that way", which isn't true. Zero is not a prime number because it has more than two divisors, and this allows people define it out. –  user1729 Oct 28 '13 at 20:19
@user1729 Aesthetically I totally agree with you :) I was just merely stating the reality of the printed situation. Since the "real" definition of prime requires you to exclude zero, I imagine that the "nonzero" condition appears in the "gradeschool" definition as an artifact, and they mostly just don't notice this convenience possible with their definition. What annoys me more is the fact that so many geometry texts insist a trapezoid has exactly two parallel sides... –  rschwieb Oct 29 '13 at 13:27
  • Zero is not a prime number as prime numbers are defined for integers greater than 1.

  • Zero is an even number. Definition of an even number with modular arithmetic:

$\forall x\in \mathbb{Z},\, x$ is even if and only if $x\equiv 0 \pmod 2$

As $0$ satisfies the definition, then it is an even number.

  • Of course $0$ is a number, because it is a member of some sets who contains only numbers (such as integers, real numbers, complex numbers etc.). If your question is "Is $0$ a natural number?", it's controversial. In some definitions $0$ is a natural number, but in some of them not. Mathematicians do not have an agreement on that, but I'm with the ones who do not accept it as a natural number, because some theorems which are satisfied by all natural numbers are not satisfied by $0$.
share|cite|improve this answer

No. Its factors are not just 1 and itself, but any number and itself.

share|cite|improve this answer
I sincerely hope you mean any number $but$ itself. –  Alex R. Nov 2 '14 at 15:17

Zero is not a prime number. By definition a prime number has to be greater than $1$.

share|cite|improve this answer

Q. Is zero a prime number?

No; but, this is basically just by convention. Here's why.

First, define

$$\mathbb{N} = \{0,1,2,3,\ldots\}$$

so that in particular, $0$ is a natural number.

Preliminary chitchat. A prime number could be defined as a natural number $p$ satisfying the following two conditions:

$$(0) \;\;\mathop{\forall}_{a,b \in \mathbb{N}}\;\;\;p \mid ab \rightarrow (p \mid a) \vee (p \mid b), \qquad (1) \;\;p \mid 1 \rightarrow \mathrm{FALSE}$$

Note that $\mathrm{FALSE}$ is the identity element with respect to Logical OR, which explains to some extent where condition (1) comes from.

If we accept this definition, then $0$ is prime, but $1$ is not.

The usual conventions. Despite the above discussion, we usually declare that $0$ is not prime. There's a couple of reasons for this:

  1. We want every non-zero natural number to have a unique factorization into primes.
  2. We want the primes to be precisely those elements of $\mathbb{N}$ that cover $1$ with respect to the divisibility order.
  3. We want primes to form an antichain with respect to divisibility.

So the definition of "$p$ is prime" becomes:

$$(0) \;\;\mathop{\forall}_{a,b \in \mathbb{N}}\;\;\;p \mid ab \rightarrow (p \mid a) \vee (p \mid b), \qquad (1) \;\;p \mid 1 \rightarrow \mathrm{FALSE}, \qquad (2)\;\; p = 0 \rightarrow \mathrm{FALSE}$$

Under these conventions, $0$ is not a prime.

Why somedays I disagree with the convention that $0$ isn't prime.

By a commutative monoid with $0$, I mean a commutative monoid $M$ together with an element $0 \in M$ satisfying $0a = 0$ and $a0 = 0$.

The way I like to think about the set $P$ of prime numbers is as follows: $P$ is the unique subset of $\mathbb{N}$ such that if $F(P)$ is the commutative monoid with $0$ freely generated by $P$, then the obvious monoid-with-$0$ homomorphism $$F(P) \rightarrow \mathbb{N}$$ is an isomorphism.

Under this definition, $0 \in P$.

share|cite|improve this answer
A more common definition of a prime number is as a natural number with exactly two positive divisors (1 and itself). This naturally excludes 0 and 1. The definition you propose is one that I have never seen. –  Morgan Rodgers Sep 25 at 14:57
@MorganRodgers The idea of primes has evolved over the history of math. The definition $p\mid ab\Rightarrow p\mid a$ or $p\mid b$ is the final definition of prime. We lie about it early on in math, using "prime" to mean "positive natural which is irreducible." (Or maybe not lie, but simply refer to a related concept, take your pick on the question of culpability.) –  anon Sep 25 at 15:05
@MorganRodgers, the definition I "propose" is standard in ring theory. Your definition is closer to the ring-theoretic notion of an irreducible element. –  goblin Sep 25 at 15:06
@goblin I see your point about this in ring theory, where you are working with ideals (and yes, I guess as a correction I have seen this definition when working in that context). While my initial impression was that this answer was not a good fit for the level of the question, after seeing more from the OP maybe it's as appropriate of an answer for him as any he's likely to get (unless someone wants to agree with him that zero is neither even nor odd). –  Morgan Rodgers Sep 25 at 15:33

protected by Zev Chonoles Sep 25 at 15:15

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.