I saw this question:

Vidya wonders why numbers one and zero are neither composite numbers nor prime numbers. Could you please explain to Vidya what can happen if they are either composite numbers or prime numbers? Use an example to punch your points.

Apart from the fact that I cannot comprehend how to answer, I am also unable to understand how zero is not composite.

A number $n$ is composite if $k\mid n$, where $1<k<n$. $k\mid n$ if $kx=n$. Since, $0k=0$ for all $k$, shouldn't $0$ be some sort of "hyper-composite"?

Is it? If not, why not?

  • 2
    $\begingroup$ The same question is here. $\endgroup$ Nov 24, 2017 at 9:53
  • 2
    $\begingroup$ But it gives an answer to a part of your question, regarding "sort of HyperComposite". $\endgroup$ Nov 24, 2017 at 9:55
  • 3
    $\begingroup$ According to you 1<k<n , if we put n=0,, then inequality alters,, there any composite must be greater than 1 $\endgroup$ Nov 24, 2017 at 11:52
  • 4
    $\begingroup$ By your definition of "composite" (which may or may not be the proper definition, that is not my point), an integer $n$ must satisfy $n\geq3$ in order to have any chance of being composite (namely for such a $k$ to exist). Certainly $0$ (or any negative number) would not be composite by this definition. $\endgroup$ Nov 24, 2017 at 17:41
  • 1
    $\begingroup$ Primes and composites are mutually exclusive, yes, but they are not exhaustive of all integers. The integers 0 and 1 fall outside of each set. $\endgroup$ Nov 24, 2017 at 21:00

7 Answers 7


The answer they're looking for, I think, is that if $1$ is considered a prime or $0$ considered a composite, then we no longer have unique factorization. Or at least the statement of the unique factorization theorem becomes uglier.

For the first point, $6 = 2\cdot 3 = 1^5\cdot 2 \cdot 3$ gives two different prime factorizations of $6$. Ick.

For the second, $0 = 0*3 = 0 *2.$ So $3$ is a factor of the first product, but not the second. Again, ick. And this breaks even more things. What's gcd$(0,0)$, for instance?

  • 19
    $\begingroup$ "What's $\gcd(0,0)$, for instance?" — $0$ of course. In the divisibility order, $0$ is the largest number. Indeed, in some sense it's infinitely large. $\endgroup$
    – celtschk
    Nov 24, 2017 at 16:07
  • $\begingroup$ @celtschk Divisibility order? Doesn't "greatest" in gcd mean largest number in the traditional sense? $\endgroup$ Nov 24, 2017 at 19:23
  • 20
    $\begingroup$ @Carl By "divisibility order" we mean $a$ is larger than $b$ if $b|a$; this is only a partial order, but it agrees with the usual notion of order on positive integers where it is defined, and leads to the same definition of gcd. It is preferable to use the divisibility order to define gcd because it generalizes readily to other rings than the integers. $\endgroup$
    – Carmeister
    Nov 24, 2017 at 19:28
  • $\begingroup$ Hmm. I learn something new. $\endgroup$ Nov 25, 2017 at 16:41
  • $\begingroup$ How does your second statement about writing $0 = 0 \cdot 3 = 0 \cdot 2$ shows $0$ is not composite. I don't get it? I thought unique factorisation in $\mathbb{Z}$, meant writing a non-zero integer $n$ uniquely as $\text{sgn}(n) \prod\limits_{r} {p_r}^{e_r}$ with $p_r >1, e_r >0$? No? $\endgroup$
    – William
    Dec 13, 2021 at 11:03

While $0$ is indeed divisible by any prime, no product of primes will make $0$. Therefore, $0$ is not composite.

  • 5
    $\begingroup$ I like this. It asks "composite of what?" and shows that if you consider $0$ composite, you must also consider it a prime. Which we do not want by the accepted answer, or math.stackexchange.com/questions/3698 Also, a similar reasoning (if it's composite then it's a prime, or what should it be a composite of?) would apply to $1$! $\endgroup$ Nov 24, 2017 at 23:47
  • $\begingroup$ On second thought, and in the spirit of the question, there is a way out of this. One conventionally sets $1$ as the empty product -- so it is, uniquely, the composite of the empty set, hence rather composite than prime, "the composite of nothing". Then one could also say that $0$ is any "infinite product" of primes, "hypercomposite" as the OP says. Here however one would lose uniqueness, since there are infinitely many infinite products of primes. (But all this is not really true. It would make perfect sense though if one replaced numbers by ideals and multiplication by intersection.) $\endgroup$ Nov 26, 2017 at 22:03

We can of course assume that $0$ is a composite number. It would not break mathematics or anything. However it would make a lot of theorems and statements more tedious. For instance, we know that any composite number can be written as a product of a finite amount of primes. However If we let $0$ be composite then we have to either always say "Every composite except $0$ can be ..." or ignore such theorems.

To put it simply we let $0$ be non-composite because it is convenient.

One could also argue that "composite" numbers multiplied with each other should create a new composite number, and this is not true for $0$. But then this is more of a philosophical stance than a mathematical one I would claim.


A number $n$ is composite if [there is an integer $k$ such that] $k|n$, where $1<k<n$.

I found your statement of the definition of a composite number a little ambiguous, so I have inserted a few extra words emphasizing that there must actually exist one number that can be $k$ in the two conditions given.

As you observed, if $n=0$ then the first condition, $k\mid n,$ is satisfied by many integers--every one of them, in fact.

But according to the definition that you yourself gave, there is also a second condition that $k$ must satisfy: $1 < k < n.$ If $n = 0,$ is there any integer $k$ that satisfies this condition, that is, $1 < k < 0$? No, there is no integer that is both greater than $1$ and less than $0.$

Therefore, according to this definition, $0$ is not composite.

Other answers have indicated why it is desirable that $0$ not be composite, that is, why we would want to include the second condition in the given definition.


For the Fundamental Theorem of Arithmetic we usually assume that $n$ is a positive integer, and consider $n=1$ separate. Indeed, $1$ is neither a prime nor composite, according to your definition. Although zero satisfies $0k=0$ for $1<k<n$, it is not considered to be a positive integer. Hence it is not composite, i.e., not considered for having a prime decomposition. The usual prime numbers then start with $2,3,\ldots $, and the positive integers to be composed into these primes then start with $n=2,3,4,5,\ldots$

Wikipedia says for $n=1$: Using the empty product rule one need not exclude the number $1$, and the theorem can be stated as: every positive integer has unique prime factorization.

However, we exclude $0$.

  • $\begingroup$ I am asking why zero is not composite. $\endgroup$ Nov 24, 2017 at 9:47
  • 1
    $\begingroup$ Because zero is not a positive integer. It is divisible by all primes. $\endgroup$ Nov 24, 2017 at 9:48

In more general stuctures, rings, we define units, irreducible elements and prime elements. (What follows is slightly modified quotes from Wolfram MathWorld.)


A unit in a ring is an element $u$ such that there exists $u^{-1}$ where $u \cdot u^{-1}=1$.

Irreducible Element

An element $a$ of a ring which is nonzero, not a unit, and whose only divisors are the trivial ones (i.e., the units and the products ua, where u is a unit). Equivalently, an element a is irreducible if the only possible decompositions of a into the product of two factors are of the form $a=u^{-1}ua$, where $u^{-1}$ is the multiplicative inverse of $u$.

Prime Element

A nonzero and noninvertible element a of a ring $\mathbf R$ ... characterized by the condition that whenever $a$ divides a product in $\mathbf R$, $a$ divides one of the factors. The prime elements of $\mathbb Z$ are the prime numbers, $\mathbf P$.


In an integral domain, every prime element is irreducible, but the converse holds only in unique factorization domains. The ring $\mathbb Z[i \sqrt 5]$, where $i$ is the imaginary unit, is not a unique factorization domain, and there the element $2$ is irreducible, but not prime, since $2$ divides the product $(1-i \sqrt 5)(1+i \sqrt 5)=6$, but it does not divide any of the factors.

In the ring of integers, all irreducible elements are also prime elements.

Note that prime and irreducible elements cannot be zero or units.

So why omit zero?

Note that $0$ meets the definition of a prime number since, if $0$ divides $ab$, then zero divides $a$ or zero divides $b$.

But zero is not irreducible since every number divides $0$.

So if we want our prime numbers to also be irreducible, we must require that they not be equal to $0$.

  • $\begingroup$ Given the nature of the question, I would like to mention that $-2$, $-3$, $-5$, ... are also prime elements of $\mathbb{Z}$, but we do not usually consider them to be prime numbers. The prime numbers form a complete set of representatives for the equivalence classes of prime elements. $\endgroup$ May 25, 2021 at 18:47
  • $\begingroup$ @Gunnar - We consider two primes to be equivalent if they only differ by a unit factor. $\endgroup$ Jun 16, 2021 at 12:22

You cannot answer this question without a formal defintion of a composite number. Usual definitions exclude $0$ explicitly and there is nothing to prove.

$1$ is obviously not composite.

The case of primality is easier: you need to have exactly two distinct divisors, which is not achieved by $0$ nor $1$.

Had another convention been used, this would have broken the Fundamental Theorem of Arithmetic, because $0^m=0$ and $1^m=1$, causing indeterminacies.

  • 3
    $\begingroup$ I think the words 'exactly' and 'distinct' are there in the definition precisely for the purpose of excluding 0 and 1. :-) [note that you mean two positive divisors] $\endgroup$
    – Pablo H
    Nov 24, 2017 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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