Is 1 Prime, and Does It Matter?
161 comments
·April 21, 2025JJMcJ
JadeNB
> One reason that 1 is often excluded from the prime numbers is that if it was included, it would complicate the theorems, proofs, and exposition by the endless repetition of "not equal to 1".
This is true and compelling as things developed, but I think it's an explanation of where history brought us, rather than a logical inevitability. For example, I can easily imagine, in a different universe, teachers patiently explaining that we declare that the empty set is not a set, to avoid complicating theorems, proofs, and exposition by the endless repetition of "non-empty set."
(I agree that this is different, because there's no interesting "unique factorization theorem" for sets, but I can still imagine things developing this way. And, indeed, there are complications caused by allowing the empty set in a model of a structure, and someone determined to do so can make themselves pointlessly unpopular by asking "but have you considered the empty manifold?" and similar questions. See also https://mathoverflow.net/questions/45951/interesting-example....)
tux3
That's an interesting thought, but I think that'd break the usual trick of building up objects from the empty set, a set containing the empty set, then the set containing both of those and so forth.
That universe would be deprived from the bottomless wellspring of dryness that is the set theoretic foundations of mathematics. Unthinkable!
JadeNB
> That universe would be deprived from the bottomless wellspring of dryness that is the set theoretic foundations of mathematics. Unthinkable!
"Wellspring of dryness" is quite a metaphor, and I take it from that metaphor that this outcome wouldn't much bother you. I'll put in a personal defense for set theory, but only an appeal to my personal taste, since I have no expert, and barely even an amateurish, knowledge of set theory beyond the elementary; but I'll also acknowledge that set-theoretic foundations are not to everyone's taste, and that someone who has an alternate foundational system that appeals to them is doing no harm to themselves or to me.
> That's an interesting thought, but I think that'd break the usual trick of building up objects from the empty set, a set containing the empty set, then the set containing both of those and so forth.
In this alternate universe, the ZF or ZFC axioms (where C becomes, of course, "the product of sets is a set") would certainly involve, not the axiom of the empty set, but rather some sort of "axioms of sets", declaring that there exists a set. Because it's not empty, this set has at least one element, which we may extract and use to make a one-element set. Now observe that all one-element sets are set-theoretically the same, and so may indifferently be denoted by *; and then charge ahead with the construction, using not Ø, Ø ∪ {Ø}, Ø ∪ {Ø} ∪ {Ø ∪ {Ø}}, etc. but *, * ∪ {*}, * ∪ {*} ∪ {* ∪ {*}}, etc. Then all that would be left would be to decide whether our natural numbers started at the cardinality 1 of *, or if we wanted natural numbers to count quantities 1 less than the cardinality of a set.
murderfs
A good example of this is the natural numbers. Algebraists usually consider zero to be a natural number because otherwise, it's not a monoid and set theorists want zero because it's the size of the empty set. My number theory textbook defined natural numbers as positive integers, but I'm not entirely sure why.
mathgeek
> My number theory textbook defined natural numbers as positive integers, but I'm not entirely sure why.
Since both the inclusion and exclusion of zero are accepted definitions depending on who’s asking, books usually just pick one or define two sets (commonly denoted as N_0 and N_1). Different topics benefit from using one set over the other, as well as having to deal with division by zero, etc. Number theory tends to exclude zero.
gus_massa
Many (most?) results are easier to write if you allow the empty set. For example:
"The intersection of two sets is a set."
JadeNB
> Many (most?) results are easier to write if you allow the empty set. For example:
> "The intersection of two sets is a set."
Many results in set theory, yes! (Or at least in elementary set theory. I'm not a set theorist by profession, so I can't speak to how often it arises in research-level set theory.) But, once one leaves set theory, the empty set can cause problems. For the first example that springs to mind, it is a cute result that, if a set S has a binary operation * such that, for every pair of elements a, b in S, there is a unique solution x to a*x = b, and a unique solution y to y*a = b, then * makes S a group ... unless S is empty!
In fact, on second thought, even in set theory, there are things like: the definition of a partial order being a well ordering would become simpler to state if the empty set were disallowed; and the axiom of choice would become just the statement that the product of sets is a set! I'm sure that I could come up with more examples where allowing empty sets complicates things, just as you could come up with more examples where it simplifies them. That there is no unambiguous answer one direction or the other is why I believe this alternate universe could exist, but we're not in it!
dullcrisp
And if we treat zero as not a number, it would make division much easier to define. I wrote that sentence as a joke but now I wonder if maybe it’s true. Does addition really need to have an identity? Maybe we just saw that multiplication has an identity and got a bit carried away. I’m not too sure about this negative number business while we’re at it. Could be that we just took a wrong turn somewhere.
JadeNB
> And if we treat zero as not a number, it would make division much easier to define. I wrote that sentence as a joke but now I wonder if maybe it’s true. Does addition really need to have an identity?
It probably doesn't, but, if you want to allow negative numbers, then addition is partial unless you have 0. It's perfectly reasonable to disallow negative numbers—historically, negative numbers had to be explicitly allowed, not explicitly disallowed—but it does mean that subtraction becomes a partial operation or, phrased equivalently but perhaps more compellingly, that we have to give up on solving simple equations for x like x + 2 = 1.
jordigh
To be fair, 2 is also a very odd prime because it's even.
So many theorems have to say, "for every odd prime..."
https://math.stackexchange.com/questions/1177104/what-is-an-...
kordlessagain
The concept of “one” holds a dual role. It represents a countable unit: something you can put in a bowl and also stands for indivisibility itself. When you divide any quantity by an indivisible unit, you’re simply counting how many of those indivisibles fit within it. Then comes 2: the first number that is divisible, but only by itself and the indivisible one. That’s what makes it prime. A prime is a number divisible only by itself and by 1, the indivisible origin of all counting.
aleph_minus_one
> Then comes 2: the first number that is divisible, but only by itself and the indivisible one.
This does hold in the ring Z. In the ring Z[i], 2 = (1+i)*(1-i), and the two factors are prime elements.
brennopost
It's actually the least odd prime
bluepnume
It's hardly odd.
"Even" just means "divisible by 2"
"2 is the only prime that is divisible by 2" "3 is the only prime that is divisible by 3" "5 is the only prime that is divisible by 5"
...
"N is the only prime that is divisible by N"
thehappypm
Exactly, we could also have a word for multiple of three or multiple of five
latexr
Your explanation is true of every prime. I’m pretty sure GP just meant that “2 is the only prime with the additional characteristic of being an even number”. So it’s odd (read “interesting”) in that sense, like if it would be if (for example) any number were to be the sole prime composed of exactly X digits.
chrismcb
It isn't odd at all! And that I'm being pendantic. But you can't say it is very odd, and then I'm the next sentence day "for every odd prime..."
arcastroe
"2 is the only even prime number. Therefore, it's the oddest of them all!"
tikhonj
And the reason we'd have to constantly exclude 1 is that it behaves in a qualitatively different way than prime numbers—and understand what this means and why that's the case is the real insight here.
reaperman
Yes, it's more of a convention where we assume language like "...ignoring the trivial case of 1 being an obvious factor of every integer." It's not interesting or meaningful, so we ignore it for most cases.
seanhunter
Exactly. This is similar to the case of how the zero function provides a trivial solution to almost every differential equation.
gerdesj
I'm no expert but:
"...ignoring the trivial case of 1 being an obvious factor of every integer."
I remember quite a big chunk of GEB formally defining how integers are really not trivial! The main problem seems to be is that you soon end up with circular reasoning if you are not razor sharp with your definitions. That's just in an explainer book 8)
Then you have to define what factor means ...
Maxatar
Correct, it's impossible to specifically and formally define the natural numbers so that addition and multiplication work. Any definition of the natural numbers will also define things that look very similar to natural numbers but are not actually natural numbers.
drdeca
The previous poster didn’t describe the natural numbers as trivial. Rather, described a case as trivial.
Specifically, the case of the divisor being 1.
mystified5016
Seems that if we must add all these conditions to make the definition of prime consistent, maybe we shouldn't consider it prime?
wesselbindt
If 1 is prime, then the fundamental theorem of arithmetic goes from "every positive integer can be written as a product* of primes in one and only one way" to "every positive integer can be written as a product of primes greater than 1 in one and only one way". Doesn't quite have the same ring to it. So just from an aesthetic perspective, no I'd rather 1 isn't a prime number.
* empty products being 1 of course
apetresc
Not just that one; practically every useful theorem about primes would have to be rewritten to "if p is a prime other than 1".
pyfon
That is the first time I thought of 1 as being the product of []
Thay is enough justification for me of 1 not being prime. It has a factorisation!
tshaddox
It seems a little inconvenient to require acceptance that empty products equal 1, since that is also slightly subtle and deserving of its own explanation of mathematical terminology.
Of course, I generally hear the fundamental theorem of arithmetic phrased as “every integer greater than one…” which is making its own little special case for the number 1.
feoren
>It seems a little inconvenient to require acceptance that empty products equal 1
Only the contrary: it is extremely inconvenient to not allow the product of an empty sequence of numbers to equal 1. The sum of an empty sequence is 0. The Baz of an empty sequence of numbers, for any monoid Baz, is the identity element of that monoid. Any other convention is going to be very painful and full of its own exceptions.
There are no exceptions to any rules here. 1 is not prime. Every positive integer can be expressed as the unique product of powers of primes. 1's expression is [], or 0000..., or ∅.
tshaddox
That’s not what I meant. I agree that the empty product being equal to 1 is reasonable.
I meant that it’s inconvenient to require engaging with that concept directly in the everyday definition of prime numbers.
wesselbindt
Any convention comes with the inconvenience of definition and explanation. So to call the convention that the empty product equals 1 based on that alone seems a bit unfair. The reason the mathematical community has adopted this convention is because it makes a lot of proofs and theorems a bit easier to state. So yes, you lose a bit of convenience in one spot, and gain a bit in a whole bunch of spots.
And note that this convention is not at all required for the point I'm making regarding prime numbers. As you say yourself, restrict the theorem to integers greater than 1, and you can forget about empty products (and it is still easier to state if 1 is not prime (which it isn't)).
SketchySeaBeast
Isn't "every positive integer can be written as a product of primes greater than 1 in one and only one way" incorrect? A prime number is a only product of itself * 1, isn't it?
jdoliner
Mathematicians generally feel that a single number qualifies as a "product of 1 number." So 7 can be written as just 7 which is still considered a product of prime(s). This is purely a convention thing to make it so theorems can be stated more succinctly, as with not counting 1 as prime.
SketchySeaBeast
Ah, OK, thank you.
wesselbindt
1 is not greater than 1, and a product of one prime is still a product of primes
SketchySeaBeast
Yeah, I didn't understand you can have a product of a single number.
implements
Empty product and also 0! (Which is extra unintuitive because 0 isn’t empty ie the products of 0 are 0)
laweijfmvo
i remember something from math class about "1" and "prime" being special cases of "units" and "irreducible" (?) that made me think these kinds of definitions are much more complicated than we want them to be regardless.
wesselbindt
The first part of your comment is completely correct. The latter is a matter of taste, of course. I think the main thing that can be said for a lot of the definitions we have in algebra is that the ones we're using are the ones that stood the test of time because they turned out to be useful. The distinction between invertible elements (units) and irreducible elements, while complicated, also gave us a conceptual framework allowing us to prove lots of interesting and useful theorems.
robinhouston
Another very interesting article on the primality of 1 is Evelyn Lamb's _Why isn't 1 a prime number?_ (https://www.scientificamerican.com/blog/roots-of-unity/why-i...)
A slightly facetious answer might be that this is the wrong question to ask, and the right question is: when did 1 stop being a prime number? To which the answer is: some time between 1933 (when the 6th edition of Hardy's _A course in pure mathematics_ was published) and 1938 (when the 7th edition was published).
amavect
Some other definition fun: Should we define 0 both positive and negative, or neither positive and negative? Does monotonically increasing mean x<y -> f(y)<f(x) or x≤y -> f(x)≤f(y)? Should we deny the law of excluded middle and use constructive math? Does infinity exist? If infinity exists, is it actual (as an object) or potential (as a function)? Is the axiom of choice true? Or, is the axiom of determinacy true?
Should we use a space-time manifold, or separate space and time dimensions? Do future objects exist, and do past objects exist? Do statements about the future have a definite truth value? Does Searle's Chinese Room think? Which Ship of Theseus is the original: the slowly replaced ship, or the ship rebuilt from the original parts?
I find that so many philosophy debates actually argue over definitions rather than practical matters, because definitions do matter. Well, add your own fun definition questions!
LegionMammal978
What's worse, French typically uses positif to mean "greater than or equal to 0", so some people will act confused if you use English 'positive' instead of 'strictly positive' to mean "greater than 0".
null
scoofy
Just a note from your friendly philosophy degree holder:
Axioms are arbitrary. Use the axioms that are the most useful.
Spivak
Definitions are neither true nor false. They're either useful or not useful.
The question of whether or not the integer 1 is a prime doesn't make sense. The question is is it useful to define it as such and the answer is a resounding no.
gblargg
Agreed. Definitions are made to differentiate things in a way useful for some goal. The question "Is X an M?" without a context or goal basically picks up whatever vague goals or purposes a person has lingering below the surface of consciousness, differing from what other participants have below theirs, leading to different answers, with no way to select the best one. In the case of what is considered prime, it's a matter of what definition simplifies the things that use it. It could be that two concepts are better, one including 1 and the other not including it. Since it's just a language shorthand, it makes no fundamental difference other than efficiency and clarity in communication about math.
NoahZuniga
While axioms are in some sense arbitrary, it is helpful if they are consistent (informally: you can't prove something that "is false"; formally: you can't prove p and not p). Also other people like it if your axioms feel obvious.
scoofy
My point is that axioms "feeling obvious" is exactly a signal that they will be useful. The point of deductive reasoning based on axioms is that it is a shortcut to fill in problems of induction, which is what happens when we use pure empiricism.
If you really want to go down the road of solipsism, read Karl Popper.
edanm
And as is demonstrated by this article, arguing about axioms is a very useful way of doing math exposition :)
LudwigNagasena
You can’t axiom your way out of 1 apple and 1 apple being 2 apples together. So axioms are not really that arbitrary.
amavect
You implicitly used an axiom to ignore the differences between the apples. Someone else could use different axioms to talk about the sizes of the apples (1 large + 1 small = ?), or the color of the apples (1 red + 1 green = ?), or the taste of the apples (1 sweet + 1 sour = ?).
People "axiom" their way out of 1+1=2 in this way: by changing the axioms, they change the topic, so they change the conclusion. I observe this pattern in disagreements very often.
LudwigNagasena
I have used appropriate axioms, not arbitrary axioms. If you want to talk about size or color or taste, you would use “axioms” appropriate for you case.
scoofy
They are, by definition. The reason why we choose them is exactly to map a deductive framework onto an inductive reality.
LudwigNagasena
That doesn’t seem to match the definition of “arbitrary”.
munchler
Other good nerd-sniping math questions:
0^0 = 1? Yes, it’s simpler that way.
0! = 1? Yes, it’s simpler that way.
0/0 = ∞? No, it’s undefined.
0.9999… = 1? Yes, it’s just two ways of expressing the same number.
1+2+3+… = -1/12? No, but if it did have a finite value, that’s what it would be.
Affric
> 0.9999… = 1? Yes, it’s just two ways of expressing the same number.
More a question of place-value representation systems than what most people are thinking of which is 1 - ε.
margalabargala
> 1+2+3+… = -1/12? No, but if it did have a finite value, that’s what it would be.
The other ones, sure, but I'm not following this one.
munchler
margalabargala
Well that's really fun! I had no idea, thank you.
ForOldHack
You missed the lecture on the missuse of infinities.
If I have inf*k = inf,and dvide both sides by inf... ( The misuse) Then 1 = any K including 1/12. Now this is useless in calculus and number theory, but in quantium field theory it is a useful tool.
So inf = 1/12 and a non convergent series = a constant, but you have misused dividing infinity by itself to get it.
Infinity for division? It's useful, like counting chickens starting at zero. L'Hoptals rule is a very useful tool, but do not misuse it.
glacier5674
[dead]
rvba
If we try to define division by zero, shouldnt 0/0 be 1?
Or even more abstract "every element on y". Which I think could sort of work
croes
But that would mean (0/0) * 2 = 2 but (0/0) * (2/1) = (0 * 2) / (0 * 1) = 0/0 = 1
null
meroes
0^0 got Gemini 2.5 pro the other day for me. It claimed all indeterminate forms (in the context of limits) are also undefined as a response to a prompt dividing by zero. 0^0 is the most obvious exception, it's typically defined as =1 as you said.
cogman10
I'm sure it depends on the definition of prime. I've always been partial to "Any integer with exactly 2 divisors". Short, simple, and it excludes 1 and negative numbers.
JadeNB
> I'm sure it depends on the definition of prime. I've always been partial to "Any integer with exactly 2 divisors". Short, simple, and it excludes 1 and negative numbers.
Depending on your definition of divisor, it excludes everything except 1 and -1, whose two integer divisors are 1 and -1. But then, if you specify that "divisor" means "positive integer divisor", it no longer automatically excludes the negative numbers, since the two positive integer divisors of -2 are 1 and 2. (Incidentally, plenty of algebraists, myself included, are perfectly comfortable with including -2 as a prime.)
sepidy
I think 1 is so different from other numbers, it seems that in the past, some people did consider 1 to be a prime number. However, by the early 1900s, mathematicians agreed to exclude 1 from the list of primes to keep mathematical rules clear and consistent.
dullcrisp
This is like a "do arrays start at 0 or 1" question, except as they mention, algebraic number theory pretty much settles it. Whether 0 is a natural number though is still open for bikeshedding.
fpoling
I always thought that 0-based indexes were superior until few years ago I needed to deal with Fortran code and I realized that 1-based arrays allowed to use 0 as a non-existing index or sentinel, not size_t(-1) hack as found in C/C++. Like the article explains, depending on the domain one or the other convention can be advantageous.
And then C/C++ compilers are subtly inconsistent. If 0 is valid index, then null should correspond to uintptr_t(-1), not 0 address. That lead to non-trivial complication in OS implementations to make sure that the address 0 is not mapped as from hardware point of view 0 is absolutely normal address.
IshKebab
No, this article makes the case for 0-based indexing. Let's ignore the reality that computer fundamentally use 0-based indexes... The article says 1 is not prime because maths gets more awkward if it is.
In the same way we index from 0 because indexing gets way more awkward if we index from 1.
In-band sentinels are both quite rare, and also equally convenient with -1 or 0. In fact I would say -1 is a bit more elegant because sometimes you need multiple sentinel values and then you can easily use -2 (what are you going to use 0 and 1 and then index from 2?).
The more common operations are things like indexing into flattened multidimensional arrays, or dealing with intervals, which are both way more elegant with 0-based indexing.
0 is a valid index into an array. It's even a valid index into global memory in some environments. Not mapping memory to address 0 is completely trivial. I'm not sure what non-trivial complications you're thinking of.
jconder
Odd to see an article about prime numbers with no mention of ideals. If (1) was a prime ideal then it would be the only non-maximal prime ideal. And it would be the only closed point in Spec(Z)...
scythe
1 is not a prime number because it would ruin the Euler product formula for the Riemann zeta function.
null
One reason that 1 is often excluded from the prime numbers is that if it was included, it would complicate the theorems, proofs, and exposition by the endless repetition of "not equal to 1".