# Why is 1 not a prime number?

**URL:** <https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549>\
**Category:** Factual Questions\
**Created:** [April 14, 2019, 7:57pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549 "2019-04-14T19:57:40Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deltree](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Deltree](https://boards.straightdope.com/u/Deltree)\
**Post date:** [April 14, 2019, 7:57pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/1 "2019-04-14T19:57:40Z")

</div>

According to [Wikipedia](https://en.wikipedia.org/wiki/Prime_number), “1 is not prime, as it is specifically excluded in the definition.” Why is 1 excluded? What’s the reasoning for not including it? Does it lead to some sort of contradiction that I’m not seeing?

Thanks in advance for your answers.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [April 14, 2019, 8:08pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/2 "2019-04-14T20:08:32Z")

</div>

For most mathematical facts that apply to prime numbers, it’s simpler if 1 isn’t one of them. Most notably is the Unique Prime Factorization Theorem: Any positive integer can be expressed as the product of primes in exactly one way. For instance, 42 = 2_3_7. But if we allowed 1 as a prime, then we could also say that 42 = 1_2_3_7, or 42 = 1_1_1_1_2_3\*7, or whatever.

---

<div class="post-metadata">

**Author:** ![yorick73](https://avatars.discourse-cdn.com/v4/letter/y/b5a626/32.png) [@yorick73](https://boards.straightdope.com/u/yorick73)\
**Post date:** [April 14, 2019, 11:06pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/3 "2019-04-14T23:06:15Z")

</div>

Interesting article on the subject:

> **[Why Isn't 1 a Prime Number?](https://blogs.scientificamerican.com/roots-of-unity/why-isnt-1-a-prime-number/)**
>
> And how long has it been a number?

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [April 15, 2019, 3:44am UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/4 "2019-04-15T03:44:56Z")

</div>

It’s a matter of convenience. Historically, 1 was often considered prime. But if 1 is prime, then it turns out there’s a lot of stuff where you have to say “for all prime numbers, except 1” to get it to work. So a consensus evolved that the definition of prime numbers would exclude 1.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [April 15, 2019, 4:19am UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/5 "2019-04-15T04:19:21Z")

</div>

Primes (excluding 1) are like single-character strings, of length 1; “a”, “b”, “c”, “d”.

1 is like the empty string, of length 0; “”.

Composite numbers are like strings of length \> 1; “hi”, “jack”, “afkafshaf”, etc. They’re made up of multiple single-character strings stuck together. Every string decomposes in an essentially unique way as a composition of single characters.

The single-character strings have much, much more in common with each other than they do with the empty string. And so it is convenient to have a nice name for them. (In string-world, we call them “characters” or “letters”. In the multiplying-numbers-world side of this analogy, we call them “prime numbers”).

It’s true that if you consider the property “My only substrings are myself and the empty string” (i.e., “I am a string of size ≤ 1”), it is satisfied by both the single-letter strings and the empty string satisfy. Sometimes one might care to consider this property; it might as well be given a name too, if you find yourself using it a lot. But much less often does this concept naturally come up.

---

<div class="post-metadata">

**Author:** ![Derleth](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Derleth](https://boards.straightdope.com/u/Derleth)\
**Post date:** [April 15, 2019, 7:40am UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/6 "2019-04-15T07:40:04Z")

</div>

> [@Indistinguishable](#):
>
> Composite numbers are like strings of length \> 1; “hi”, “jack”, “afkafshaf”, etc. They’re made up of multiple single-character strings stuck together. Every string decomposes in an essentially unique way as a composition of single characters.

True, but only if you define string concatenation to commute, such that “a” : “b” is considered to be the same string as “b” : “a”, and this doesn’t usually work in most contexts where strings are being concatenated.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [April 15, 2019, 8:15am UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/7 "2019-04-15T08:15:59Z")

</div>

The inequality li(x) \> π(x) [holds for all small numbers](https://en.wikipedia.org/wiki/Skewes%27s_number), and perhaps for all positive integers less than 10^316. Nobody has ever demonstrated a specific exception to li(x) \> π(x), although it is now known that there are many googols of such exceptions near 10^316.

Even ignoring x=1, if the definition of prime is changed to include 1, then 2, 3 and 4 would all be exceptions to li(x) \> π(x).

---

<div class="post-metadata">

**Author:** ![D18](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@D18](https://boards.straightdope.com/u/D18)\
**Post date:** [April 15, 2019, 10:51am UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/9 "2019-04-15T10:51:31Z")

</div>

Are -2, -3, -5, … primes? I’m guessing not because they would be divisible by -1 in addition to 1 and themselves.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [April 15, 2019, 12:28pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/10 "2019-04-15T12:28:59Z")

</div>

> [@D18](#):
>
> Are -2, -3, -5, … primes? I’m guessing not because they would be divisible by -1 in addition to 1 and themselves.

If you count negative integers as numbers, then you have to take them into account and yes, they are; units like 1 and -1 are not counted in the factorization.

It might also be simpler to think of a prime number as one for which whenever p divides ab, then p divides a or p divides b (and p is not zero or a unit).

---

<div class="post-metadata">

**Author:** ![Jasmine](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/jasmine/32/2964_2.png) [@Jasmine](https://boards.straightdope.com/u/Jasmine)\
**Post date:** [April 15, 2019, 12:51pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/11 "2019-04-15T12:51:48Z")

</div>

In school we were taught that one is not a prime number based on this definition of a prime number: “A prime number is a whole number greater than 1 whose only factors are 1 and itself.”

The fact that one IS itself makes it suspiciously odd even to a grade school student. LOL

---

<div class="post-metadata">

**Author:** ![Saint\_Cad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/saint_cad/32/18907_2.png) [@Saint\_Cad](https://boards.straightdope.com/u/Saint_Cad)\
**Post date:** [April 15, 2019, 1:28pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/12 "2019-04-15T13:28:35Z")

</div>

Because it is a [unit](https://en.wikipedia.org/wiki/Unit_(ring_theory)) and units are not prime.  
This is also why -1 is not prime in the integers and there are no primes in the rationals

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [April 15, 2019, 4:32pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/13 "2019-04-15T16:32:35Z")

</div>

Since it is a matter of definition, we define prime in the most convenient way possible. And that is to exclude 1 (and -1) for all the reasons mentioned above. It is just simpler that way. The primes are the atoms of the numbers and we don’t count nothing as an atom.

Incidentally, if you look at the Gaussian integers, numbers of the form a + bi, where a and b are integers and i is the square root of -1, you now have to exclude 1, -1, i, and -i from being counted as primes. Also 2 = (1+i)(1-i) is no longer prime. Nor is 5 = (2+i)(2-i). But 1+i, 2+i, and 3 are all prime.

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [April 15, 2019, 5:44pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/14 "2019-04-15T17:44:49Z")

</div>

> [@Derleth](#):
>
> True, but only if you define string concatenation to commute, such that “a” : “b” is considered to be the same string as “b” : “a”, and this doesn’t usually work in most contexts where strings are being concatenated.

Sure; I’m not saying it’s an exact isomorphism (although it is exact up to commutativity), just that this is an analogy to another example one might think about where the same phenomenon is in play, of why “things of simplicity level exactly 1” tends to be a more natural concept than “things of simplicity level either 0 or 1”.

The prime numbers all have far more in common with each other than they do with 1, even though both are “simpler” than composite numbers, in just the same way that the single letters all have far more in common with each other than they do with the empty string, even though both are “simpler” than longer strings.

And this same kind of phenomenon arises over and over elsewhere in mathematics as well (see [too simple to be simple in nLab](https://ncatlab.org/nlab/show/too+simple+to+be+simple), though this will not be a useful page for anyone who is not already a certain kind of mathematician).

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [April 15, 2019, 5:54pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/15 "2019-04-15T17:54:04Z")

</div>

> [@DPRK](#):
>
> It might also be simpler to think of a prime number as one for which whenever p divides ab, then p divides a or p divides b (and p is not zero or a unit).

The parenthetical exclusion of units will seem ad hoc, but should be unified with the rest of the definition:

A prime number, in this sense, is one which only divides the product of some list of values when there is some value in that list which it divides. This is true not just of lists of 2 values, but also lists of 3 values, lists of 4 values… and even lists of 0 values.

A prime only divides the product of an empty list (which comes out to 1) when there is some value in that list which it divides (which of course can’t happen, since the list is empty); thus, a prime is not allowed to divide 1.

So the exclusion of 1 and other units from the prime numbers in this sense is hardly ad hoc; it’s just part of the same divisibility condition. (The exclusion of zero from the primes is genuinely a separate condition here, though; it would otherwise be a, well, prime example of such a thing.)

---

<div class="post-metadata">

**Author:** ![D18](https://avatars.discourse-cdn.com/v4/letter/d/c57346/32.png) [@D18](https://boards.straightdope.com/u/D18)\
**Post date:** [April 15, 2019, 6:38pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/16 "2019-04-15T18:38:11Z")

</div>

Guy who asked about negative numbers here …

So most properly, the list of primes is …-5, -3, -2, 2, 3, 5 …, eh?

If I ever found the largest prime, I would take its negative and say I found the smallest prime, just to see how the popular media would deal with that!

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [April 15, 2019, 8:02pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/17 "2019-04-15T20:02:12Z")

</div>

> [@D18](#):
>
> Guy who asked about negative numbers here …
> 
> So most properly, the list of primes is …-5, -3, -2, 2, 3, 5 …, eh?

It depends on the context.

Most commonly, when people talk about prime numbers, they’re working with the set of natural numbers (positive integers), in which the primes would only be positive 2, 3, 5, … You wouldn’t include -2, -3, -5, … because they don’t exist _within that context_. In other contexts, they do exist, but they might or might not be prime depending on what _other_ numbers exist.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [April 15, 2019, 8:35pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/18 "2019-04-15T20:35:47Z")

</div>

> [@Indistinguishable](#):
>
> The parenthetical exclusion of units will seem ad hoc, but should be unified with the rest of the definition:
> 
> A prime number, in this sense, is one which only divides the product of some list of values when there is some value in that list which it divides. This is true not just of lists of 2 values, but also lists of 3 values, lists of 4 values… and even lists of 0 values.
> 
> A prime only divides the product of an empty list (which comes out to 1) when there is some value in that list which it divides (which of course can’t happen, since the list is empty); thus, a prime is not allowed to divide 1.
> 
> So the exclusion of 1 and other units from the prime numbers in this sense is hardly ad hoc; it’s just part of the same divisibility condition. (The exclusion of zero from the primes is genuinely a separate condition here, though; it would otherwise be a, well, prime example of such a thing.)

Since this might be clearer with some examples: Suppose that I want to know if 6 is prime. I can compare it to the list {4,7,9}, for instance. 6 does not divide any of those numbers… but if I multiply them all together, I get 252, and 6 does divide 252 (252 = 6\*42). So since there is a list of numbers that 6 doesn’t divide, but it does divide their product, 6 is composite.

By contrast, suppose I try that with 7. I could try the list {1,10,11,14}, and the product of that list is 1540, and 7 divides that (1540 = 7\*220)… but 7 also divides 14. Alternately, I could use {5,12,13,27,242} as my list, and 7 doesn’t divide any of those… but neither does it divide the product. No matter what list I try, either 7 doesn’t divide the product, or it does divide one of the numbers on the list. So 7 is prime.

Now we try it with 1: No matter what (non-empty) list of numbers I come up with, 1 always divides _all_ of the numbers on that list. So it’s not prime, but it’s not-prime in a different way than 6 is not-prime. It’s a unit.

Or 0, of course: No matter what list of numbers I come up with, 0 never divides the list’s product, because 0 doesn’t divide anything. It’s yet another kind of non-prime, but there’s no special name for that kind of non-prime, because 0 is the only one.

And this definition also works when we expand our scope to include negative integers, or complex integers. I suppose that you could even extend it to the rationals or reals, but that’s kind of boring, because in those contexts, everything (except 0) is a unit.

---

<div class="post-metadata">

**Author:** ![Quercus](https://avatars.discourse-cdn.com/v4/letter/q/7ab992/32.png) [@Quercus](https://boards.straightdope.com/u/Quercus)\
**Post date:** [April 15, 2019, 9:41pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/19 "2019-04-15T21:41:02Z")

</div>

> [@Indistinguishable](#):
>
> The parenthetical exclusion of units will seem ad hoc, but should be unified with the rest of the definition:
> 
> A prime number, in this sense, is one which only divides the product of some list of values when there is some value in that list which it divides. This is true not just of lists of 2 values, but also lists of 3 values, lists of 4 values… and even lists of 0 values.
> 
> A prime only divides the product of an empty list (which comes out to 1) when there is some value in that list which it divides (which of course can’t happen, since the list is empty); thus, a prime is not allowed to divide 1.
> 
> So the exclusion of 1 and other units from the prime numbers in this sense is hardly ad hoc; it’s just part of the same divisibility condition. (The exclusion of zero from the primes is genuinely a separate condition here, though; it would otherwise be a, well, prime example of such a thing.)

It’s a nice, clean definition, but I have no doubt that what actually happened was, as **freido** (and **Chronos** ) said, mathematicians realized they talked about {prime numbers not including one} far more than {prime numbers including one} and so agreed to define “prime numbers” to exclude one, to save having to say “except one” all the time when they talked primes. Only after that agreement was there a reason to find a definition of prime that naturally excludes one (after all, it must be admitted that that definition is much less clear and intuitive than the usual ‘no factors except itself and one’).

---

<div class="post-metadata">

**Author:** ![naita](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/naita/32/5862_2.png) [@naita](https://boards.straightdope.com/u/naita)\
**Post date:** [April 15, 2019, 9:57pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/20 "2019-04-15T21:57:30Z")

</div>

If negative numbers are included in the definition of prime numbers you no longer have unique prime factorization. 35 will be both 5_7 and -5_-7 for instance.

---

<div class="post-metadata">

**Author:** ![DPRK](https://avatars.discourse-cdn.com/v4/letter/d/4491bb/32.png) [@DPRK](https://boards.straightdope.com/u/DPRK)\
**Post date:** [April 15, 2019, 10:51pm UTC](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549/21 "2019-04-15T22:51:52Z")

</div>

> [@naita](#):
>
> If negative numbers are included in the definition of prime numbers you no longer have unique prime factorization. 35 will be both 5_7 and -5_-7 for instance.

This was glossed above; you need to be precise in that case what you mean by “unique factorization”. If p equals q times a unit, so that p divides q and also q divides p, then p and q are not really different primes. So, in your example, 5_7 and -5_-7 are not truly different factorizations.

Now for a counterexample you can try adjoining √-5 to the integers. Then you really do lose unique factorization, since, e.g., 6 = 2\*3 = (1+√-5)(1-√-5).

[Next page](https://boards.straightdope.com/t/why-is-1-not-a-prime-number/832549.md?page=2)
