All numbers could be prime or composite except $1$. But what about $0$, is it prime or composite?
-
Looking at wikipedia it seems composite is a definition for positive integers. It says "A composite number is a positive integer that can be formed by multiplying two smaller positive integers.". I guess under this definition $0$ is not a composite number (since it isn't a positive integer), moreover it is clear which of the positive integers are composite :) – Asinomás May 19 '21 at 01:03
-
2Related https://math.stackexchange.com/questions/2535010/why-is-zero-not-composite – Joe May 19 '21 at 01:03
-
1See https://math.stackexchange.com/questions/3698/why-doesnt-0-being-a-prime-ideal-in-mathbb-z-imply-that-0-is-a-prime-num – 2'5 9'2 May 19 '21 at 02:24
3 Answers
Actually, prime and composite numbers are defined only on the set of natural numbers greater than $1$. Since, 0 is not a natural number it isn't even eligible for classification as prime or composite.
Hope that answers your question.

- 479
- 4
- 11
-
2I believe that most modern treatments actually consider 0 to be a natural number. – Joe May 19 '21 at 01:06
-
1But that doesn't matter because you need to exclude $1$ anyway, and everyone (for the last several hundred years) agrees that is a natural number. – Troposphere May 19 '21 at 01:09
-
@Troposphere you're right. But the fact, that even I missed in my answer, is that prime and composite numbers are defined only on natural numbers > 1. So, I've now made the necessary edit. But, thanks for pointing it out. – Gaurav Chandan May 19 '21 at 02:03
A number is prime when it can only be divided by $1$ and itself but we choose to exclude $1$ as a prime because the Fundamental Theorem of Arithmetic would fail to produce a unique decomposition if we included it. For example $6$ uniquely decomposes as $2 \cdot 3$ but if we allowed $1$ then it could be decomposed as $1 \cdot 2 \cdot 3$ or $1^2 \cdot 2 \cdot 3$ which would give two distinct decompositions breaking uniqueness. Since $0 = 0^2$ it would also break uniqueness of the decomposition so it is excluded as a prime. Since a composite number has more than one prime in its decomposition $0$ is also not composite.

- 11,018
- 1
- 12
- 29
-
1Also, $0=0\cdot2, 0=0\cdot3$, etc, make the non-uniqueness issue even worse. – PM 2Ring May 19 '21 at 03:09
It cannot even be classified in your traditional prime/composite classification because it does not have a unique decomposition that, say, 211311 has. This is why the traditional prime/composite numbers extend only to positive integers.

- 982