Why is $1$ not considered a prime number?

Or, why is the definition of prime numbers given for integers greater than $1$?

Parcly Taxel
  • 89,705
  • 18
  • 102
  • 171
  • 8,471
  • 12
  • 37
  • 33
  • 27
    Given how often "let p be an odd prime" shows up in theorems, sometimes I wonder if we'd be better off defining 2 as non-prime too ;) – user7530 Oct 04 '11 at 20:12
  • 4
    Note the uniqueness of factorisation argument is not wholly compelling on its own because $-2\times -3=6$ - only when Ideals are in question does the issue become more acute. – Mark Bennet Jun 19 '14 at 18:15
  • 3
    @user7530 But still $2$ has a lot more in common with the odd primes than $1$ does: an irrational square root, a non-integer reciprocal, two distinct divisors in $\mathbb{Z}^+$, etc. –  Dec 16 '14 at 17:59
  • 5
    $1$ is the power of other primes. $1=2^0=3^0=5^0$… no other prime is the power of another prime. Perhaps this isn't super-important, though… – Akiva Weinberger Apr 15 '15 at 16:08
  • 6
    The non-primality of 1 is the most elementary example of a general principle in mathematics: a trivial object is [too simple to be simple](http://ncatlab.org/nlab/show/too+simple+to+be+simple) – Eric Stucky May 07 '15 at 06:31
  • 1
    @user7530 Or you could just call them "odd primes". Nothing particularly special about 2 being even, 17 is the only prime number divisible by 17, too. – Abhimanyu Pallavi Sudhir Apr 28 '18 at 12:07
  • Curiously if $1$ were a prime number then by definition every prime number, $p$, would also be a [semiprime](https://en.wikipedia.org/wiki/Semiprime), namely, $1 \cdot p$. In particular if $p\neq 1$ then $1 \cdot p$ would be squarefree and so if $\varphi$ were the Euler totient function we would have $\varphi(1\cdot p)=(1-1)(p-1)=0.$ – Antonio Hernandez Maquivar Aug 30 '18 at 15:41

15 Answers15


One of the whole "points" of defining primes is to be able to uniquely and finitely prime factorize every natural number.

If 1 was prime, then this would be more or less impossible.

Justin L.
  • 13,646
  • 22
  • 60
  • 73
  • 6
    In the same way, it's often convenient for a variety of reasons *not* to consider hte unit ideal as prime (e.g. for unique factorization in Dedekind domains). – Akhil Mathew Jul 20 '10 at 21:15
  • 3
    That's a good way of looking at it, but I wouldn't call it a proof. We simply define 1 as a prime, there is no proof of that fact; it's a definition. – Edan Maor Jul 20 '10 at 22:48
  • 1
    @Eden Maor -- you are right, proof is definitely **not** the right word to use there. I'll make a change. – Justin L. Jul 20 '10 at 22:53
  • @Justin L.: "There are some more complex subtleties to that, to make it rigorous" - you still make it sound like a proof – Casebash Jul 20 '10 at 23:24
  • The last sentence is the real reason. – BlueRaja - Danny Pflughoeft Jul 21 '10 at 01:10
  • 2
    Akhil's reason is the real reason... –  Jul 21 '10 at 08:51
  • This is probably my worst answer and it has the most votes of any of my answers =/ – Justin L. Jul 21 '10 at 09:29
  • You can still edit though, can't you? – bryn Jul 25 '10 at 11:17
  • @Justin L.: Isn't it now impossible to factorize 1. How does 1 being a prime make factorization of every natural number impossible? I'm no math genius :) – StackedCrooked Aug 10 '10 at 16:56
  • 8
    @Stacked let's say I wanted to prime factorize 6. It is 2*3, but it's also 2*3*1. It is also 2*3*1*1, and 2*3*1*1*1; that is, 6 no longer has a unique prime factorization – Justin L. Aug 10 '10 at 23:06
  • 19
    @Stacked: “Isn’t it now impossible to factorize 1?” Good question… it’s not impossible; it takes lateral thinking. 1 is the product of *the empty list* of factors (just as 0 is the sum of an empty list). See the answers to http://math.stackexchange.com/questions/6832/why-is-two-to-the-power-of-zero-equal-to-binary-one for discussion of this! – Peter LeFanu Lumsdaine Nov 21 '10 at 08:57
  • @Stacked let's say I wanted to prime factorize 6. It is 2*3, but it's also 2*3*1. It is also 2*3*1*1, and 2*3*1*1*1; that is, 6 no longer has a unique prime factorization – Justin L. But 6 is a perfect number, the sum of its factors viz. 1+2+3 You can't have it both ways guys –  Jul 28 '12 at 12:55
  • 5
    @user36712 A factor is not the same as a _prime_ factor. – user50229 Apr 08 '13 at 10:02

It's important to understand that this is not something that can be proved: it's a definition. We choose not to regard 1 as a prime number, simply because it makes writing lots of theorems much easier.

Noah gives the best example in his answer: Euclid's theorem that every positive integer can be written uniquely as a product of primes. If 1 is defined to be a prime number, then we'd have to change that theorem to: "every positive integer can be written uniquely as a product of primes, except for infinite multiplications by 1". So we choose to go with the easier path of defining 1 to not be a prime.

Edan Maor
  • 1,928
  • 3
  • 18
  • 20

The main point of talking about prime numbers is Euclid's theorem that every positive integer can be written uniquely as a product of primes. As Justin remarks, this would break horribly if $1$ were considered prime, for example we could factor $2$ as $2\times1\times1\times1\times1\times1$. Instead we say that $1$ is not a prime, but it is the product of zero primes (see Why is $x^0 = 1$ except when $x = 0$? to understand why any prime multiplied by itself $0$ times is $1$) so Euclid's theorem works out nicely!

Noah Snyder
  • 9,445
  • 3
  • 37
  • 58
  • 4
    Euclid's theorem could easily be modified to work with 1 as a prime. The reason why 1 isn't a prime is either because it makes a whole lot of different results nicer, or an accident of history, not because of one specific theorem – Casebash Jul 20 '10 at 23:25
  • 2
    I take it by "Euclid's theorem" you don't mean "Euclid's theorem" in the sense that we have more prime numbers than any assignable magnitude, but rather mean "the fundamental theorem of arithmetic" which did first get proven by Euclid, but isn't quite the same as what say wkipedia calls Euclid's theorem http://en.wikipedia.org/wiki/Euclid%27s_theorem – Doug Spoonwood Aug 22 '11 at 21:16
  • 7
    Hence the sentence "Euclid's theorem that every positive integer can be written uniquely as a product of primes" and then referring back to it later. – Noah Snyder Aug 23 '11 at 00:33
  • 2
    I have a problem with statement *product of zero primes*, since 0 is not natural number. Is such factorization even unique? :) – mykhal Apr 24 '17 at 22:01

actually 1 was considered a prime number until the beginning of 20th century. Unique factorization was a driving force beneath its changing of status, since it's formulation is quickier if 1 is not considered a prime; but I think that group theory was the other force. Indeed I prefer to describe numbers as primes, composites and unities, that is numbers whose inverse exists (so if we take the set of integer numbers Z, we have that 1 and -1 are unities and we still have unique factorization up to unities).

We can always amend the defition of a prime number and say it is a number with exactly two divisors: in this way 1 is not a prime by definition :-)

  • 9,311
  • 3
  • 39
  • 70
  • https://oeis.org/A008578 – Charles Oct 04 '11 at 14:44
  • 10
    In the classical Greek system, 1 was not even called a "number", and "prime" was a subclassification of "odd", so both 1 and 2 were excluded then. – GEdgar Oct 04 '11 at 15:05
  • 1
    If you're talking about the integers, you're missing one. Every integer is prime, composite, a unit, or zero. – Tanner Swett Mar 07 '12 at 00:33
  • Euler definitely did not consider 1 a prime number. – bof Nov 15 '14 at 07:50
  • 1
    @TannerSwett I would call $0$ a composite number. In fact, it's the MOST composite in that $k\mid 0$ for **all** $k$. But it depends on your definition of composite number, I guess. –  Dec 13 '14 at 22:48
  • $0$, although so highly composite, is the only number that cannot be generated by multiplying primes and units! – PJTraill Jan 02 '17 at 15:48
  • @Bye_World the rich meaning of viewing $0$ as the most composite number is apparent in the p-adic number system. The presence of $0$ in a factorisation renders all other factors $p$ nullipotent, which is exactly what the presence of $p^{\infty}$ would do. – samerivertwice Jun 14 '17 at 12:42

It is worth emphasizing that, in addition to uniqueness of prime factorizations, there are further structural reasons underlying the convention that $1$ is excluded from the definitions of primes and prime ideals, but $0$ is not. Below I discuss some motivations for these differing conventions.

An important motivation for including the zero ideal as prime is that it facilitates powerful reductions. For example, in many ring theoretic problems on an ideal $\rm\,I\,$ we can reduce to the case $\rm\,I = P\,$ prime, and then reduce to $\rm\,R/P,\,$ therefore reducing to the case when the ring is a domain. In this case we say that we can factor out $\rm\,P\,$ so wlog we may assume $\rm\, P = 0\,$ is prime, hence the ring is a domain. For example, at the end of this post is an excerpt from Kaplansky's classic textbook Commutative Rings, section $1\!\!-\!\!3$: G-Ideals, Hilbert Rings, and the Nullstellensatz, where I've explicitly highlighted a few prototypical examples of such reductions - cf. reduce to...

Thus we have solid evidence for the utility of the convention that the zero ideal is prime. So why don't we adopt the same convention for the unit ideal $1$ or, equivalently, why don't we permit the zero ring as a domain? There are various of reasons. First, in domains and fields it often proves very convenient to assume that we have a nonzero element available, e.g. it enables proofs by contradiction to conclude by deducing $\,1 = 0.\,$ More importantly, it implies that the unit group is nonempty, so unit groups always exist. It'd be very inconvenient to have to always add the proviso (except if $\,\rm R = 0)$ to ubiquitous arguments on units and unit groups. More generally it's worth emphasis that common rules for equational logic are not complete for empty structures. That is why groups and other algebraic structures are always axiomatized to exclude nonempty structures (see here for more).

Below is the mentioned Kaplansky excerpt on reduction to domains by factoring out prime ideals.

Let $\rm\, I\,$ be any ideal in a ring $\rm\, R\,$. We write $\rm\, R^{*}\,$ for the quotient ring $\rm\, R/I\,$. In the polynomial ring $\rm\, R[x]\,$ there is a smallest extension $\rm\, IR[x]\,$ of $\rm\, I\,$. The quotient ring $\rm\, R[x]/IR[x]\,$ is in a natural way isomorphic to $\rm\, R^*[x].\,$ In treating many problems, we can in this way reduce to the case $\rm\, I = 0,\,$ and we shall often do so.

THEOREM $\bf 28$. $\,$ Let $\rm\, M\,$ be a maximal ideal in $\rm\, R[x]\,$ and suppose that the contraction $\rm\, M \cap R=N\,$ is maximal in $\rm\, R.\,$ Then $\rm\, M\,$ can be generated by $\rm\, N\,$ and one more element $\rm\, f.\,$ We can select $\rm\, f\,$ to be a monic polynomial which maps mod $\rm\, N\,$ into an irreducible polynomial over the field $\rm\, R/N$.

Proof. $\,$ We can reduce to the case $\rm\, N = 0,\,$ i. e., $\rm\, R\,$ a field, and then the statement is immediate.

THEOREM $\bf 31$. $\,$ A commutative ring $\rm\, R\,\,$ is a Hilbert ring if and only if the polynomial ring $\rm\, R[x] \,\,$ is a Hilbert ring.

Proof. $\,$ If $\rm\, \,\rm R[x]\,$ is a Hilbert ring, so is its homomorphic image $\rm\, R\,$. Conversely, assume that $\rm\, R\,$ is a Hilbert ring. Take a G-ideal $\rm\, Q\,$ in $\rm\, R[x]\,$; we must prove that $\rm\, Q\,$ is maximal. Let $\rm\, P = Q \cap R\,$; we can reduce the problem to the case $\rm\,P = 0,\,$ which, incidentally, makes $\rm\,R\,$ a domain. Let $\rm\, u\,$ be the image of $\rm\, x\,$ in the natural homomorphism $\rm\,R[x] \to R[x]/Q.\,\,$ Then $\rm\, R[u]\,$ is a G-domain. $\,$ By Theorem $23$, $\rm\,u\,$ is algebraic over $\rm\,R\,$ and $\rm\,R\,$ is a G-domain. Since $\rm\,R\,$ is both a G-domain and a Hilbert ring, $\rm\,R\,$ is a field. But this makes $\rm\,R[u] = R[x]/Q\,$ a field, proving $\rm\,Q\,$ to be maximal.

Bill Dubuque
  • 257,588
  • 37
  • 262
  • 861
  • This answer almost leads one to ask: [Why is 0 not a prime number?](http://math.stackexchange.com/questions/3698/why-doesnt-0-being-a-prime-ideal-in-z-imply-that-0-is-a-prime-number) (thread from 2010 Aug 31). – Jeppe Stig Nielsen Apr 15 '15 at 20:59
  • In a (unitary) ring the unit group always exists (is non-empty) since it contains $1$. What fails when $R=0$ is that $0$ is a non-unit. – Marc van Leeuwen May 06 '16 at 04:18
  • @Marc Not necessarily (it depends on definitions). There was prior discussion of this and related matters here but I cannot find it. See also [here.](http://math.stackexchange.com/questions/634783/whats-the-rationale-for-requiring-that-a-field-be-a-boldsymbolnon-boldsy#comment1349195_634932) – Bill Dubuque May 06 '16 at 13:53
  • Great answer! $\;$ – Arrow Oct 17 '18 at 21:37

As this question has been just bumped up, might as well mention this great article by Chris Caldwell (who maintains The Prime Pages) and Yeng Xiong:

The abstract:

What is the first prime? It seems that the number two should be the obvious answer, and today it is, but it was not always so. There were times when and mathematicians for whom the numbers one and three were acceptable answers. To find the first prime, we must also know what the first positive integer is. Surprisingly, with the definitions used at various times throughout history, one was often not the first positive integer (some started with two, and a few with three). In this article, we survey the history of the primality of one, from the ancient Greeks to modern times. We will discuss some of the reasons definitions changed, and provide several examples. We will also discuss the last significant mathematicians to list the number one as prime.

It shows that "There does not appear to be any period of time during which most mathematicians deemed one to be a prime" (to a large extent because "For much of history it did not even make sense to ask if the number one was a prime", as 1 was not considered a number). But just as a teaser, here are a couple more quotes (I've removed the references to make this readable):

Others who listed one as prime in this period are […] Wallis (1685), J. Prestet (1689), C. Goldbach (1742), J. H. Lambert (1770), A. Felkel (1776) and E. Waring (1782). [...]
Even after Gauss' pivotal text, many continued to write that unity was prime. Among these are: A. M. Legendre (1830), E. Hinkley (1853), M. Glaisher (1876), K. Weierstrass (1876), R. Frick & F. Klein (1897), A. Cayley (1890), L. Kronecker (1901), G. Chrystal (1904) and D. N. Lehmer (1914). [...]
G. H. Hardy listed one as a prime in several editions of his text A Course of Pure Mathematics.

Read the article; it's really interesting! They also have a "The history of the primality of one—a selection of sources".

  • 39,794
  • 7
  • 90
  • 125

Prime numbers are the multiplicative building blocks of the natural numbers in the sense that every natural number is either a prime or a product of primes (the empty product gives 1). Multiplicatively 1 does not contribute anything and so it is not a building block.

  • 208,399
  • 15
  • 224
  • 525

Choose some random composite integer $n$ that is a multiple of some prime $p$, other than $-1, 0,$ or $1$. Let's pull together the set of multiples of $n$ and call it $\mathfrak{n}$ (I'm a demon, so I like to make things confusing by using the same letter for different things). Clearly this set is infinite, but it does not contain all integers: $$\mathfrak{n} = \{\ldots, -2n, -n, 0, n, 2n, \ldots\}$$

For starters, it does not contain $p$, since $n$ is a multiple of $p$, not the other way around. Now let's pull together the set of multiples of $p$ and call it $\mathfrak{p}$. It's obvious that $p \in \mathfrak{p}$ and $n \in \mathfrak{p}$. In fact, we can say more than that: $\mathfrak{n} \subset \mathfrak{p}$.

But $\mathfrak{p}$ still does not contain all integers. If $n$ and $p$ are both positive, then $n > p$, but you could say that $\mathfrak{p}$ is larger than $\mathfrak{n}$.

Now let's see what happens if $p = 1$. It's still true that $\mathfrak{n} \subset \mathfrak{p}$. But now $\mathfrak{p}$ consists of all integers. This is a very different thing than what happens if $p$ is a number like $-7$ or $43$.

Let's also shoot down the notion that $0$ could be prime while we're at it. Pull together the set of all multiples of $0$. It turns out there is only one number in that set: $0$ itself!

$-1, 0, 1$ are very different from the prime numbers and from the composite numbers. Clearly these numbers are neither prime nor composite.

The reason that $1$ is not considered a prime number is because it is not a prime number.

I have invoked the concept of principal ideals, which is a concept some humans would like you to think is far too advanced for most other humans to comprehend.

The Short One
  • 872
  • 1
  • 7
  • 26

1 isn't a prime number for the same reason 0 isn't a basis vector.

Positive integers can be written as "almost a linear algebra" of the vector space $\mathbb{Z}_{>0}$ over the scalar field $\mathbb{Z_{\ge0}}$ (okay, this is not really a field -- it's a semiring, do what you want with it, but the idea is the same) with:

  • Primes as the "unit basis vectors"
  • Multiplication as "vector addition"
  • Exponentiation as "scalar multiplication" (e.g. $p^k$ represents the scalar $k$ multiplied by the vector $p$)
  • 1 as the vector 0
  • 1 as the scalar 1
  • 0 is the scalar 0

One may check this obeys all the axioms of linear algebra, except the existence of negatives (of vectors).

The reason you don't call the zero vector a basis vector is that it doesn't really add anything to the formalism if you consider "$0 + e_1 + e_2$" to be the same representation as "$e_1+e_2$", and if you consider it to be a different representation, you're violating the idea of each vector having a unique representation in a basis. Instead, 0 is just what you have when you haven't added anything, similarly 1 is just the empty product.

Note that this formalism has a lot of other interesting analogies -- for an example, co-primeness is "orthogonality". You could also extend the formalism to rationals $\mathbb{Q}$ over the scalar field $\mathbb{Z}$ -- then it would satisfy the existence of negativeness -- although co-primeness would be more complicated (e.g. 18 would be co-prime to 3/4).


No, 1 is not a prime number, and you can knock it off the list of primes without any hand-wringing over the fundamental theorem of arithmetic. Nor do you need to invoke algebraic number theory, though that is certainly way more appealing than whining about how horrendously complicated the FTA would be if 1 is considered prime.

In my opinion, the most convincing way to show that 1 is not prime is by examining what properties 2 and the higher odd primes have in common and then seeing if 1 also has these properties. So, for starters:

  • $\sqrt[k]{p} \not\in \mathbb{Q}$ for all integers $k > 1$, yet $\sqrt[k]{1} = 1$ for any integer $k$ whatsoever.
  • For some squarefree $d > 1$, the equation $x^2 - dy^2 = p$ has no solutions, but $x^2 - dy^2 = 1$ has solutions for all squarefree $d > 1$. (This gets a little bit into ANT, but you can still prove it by elementary methods).
  • $\sigma(p) = p + 1$ and $\phi(p) = p - 1$, yet $\sigma(1) = \phi(1) = 1$.
  • 70,356
  • 5
  • 80
  • 153
Robert Soupe
  • 14,268
  • 2
  • 27
  • 57
  • 1
    Your first paragraph is a trifle aggressive. – PJTraill Jan 02 '17 at 16:16
  • 1
    @PJTraill Well, I find that hand-wringing very irksome, and also quite arrogant, come to think of it. The numbers exist whether we do or not. The fundamental theorem of arithmetic is man's understanding of the properties of numbers. A mild inconvenience in stating our ephemeral understanding of eternal numbers should never be seen as determining their properties. – Robert Soupe Jan 03 '17 at 03:45

Prime numbers are the building blocks of numbers; every integer has one unique representation as the product of prime numbers.

Ex: $54 = 2 \times 3 \times 3 \times 3$.

Here $2$ and $3$ are the prime number building blocks. $2 \times 3 \times 3 \times 3$ is the only way to represent $54$ as the product of prime numbers. If one was a prime number, then there would be an infinite number of representations of $54$.

Ex: $(2 \times3 \times 3 \times 3 \times 1)$ or $(2 \times 3 \times 3 \times 3 \times 1 \times 1 \times 1)$.

This is one of the reasons mathematicians don't consider $1$ to be a prime number.

  • 164
  • 1
  • 7

$1$ is not a prime number, but it's important to understand that the ancient Greeks saw numbers mainly as geometric constructs, whereas we see them as algebraic constructs. We must also remember that the Greeks thought of the primes as "first numbers," and that survives in our terminology.

For example, let's say you have $n > 0$ square tiles all the same size. You can always arrange these tiles into a quadrilateral, but if you require each side of the quadrilateral to be at least $2$, then $n$ must be composite. If $n = 1$ or if $n$ is a prime, then it can be the side of a quadrilateral but it can't be the total area of a quadrilateral required to have sides greater than $2$.

But now we are more concerned with solving an equation like the one in Fermat's last theorem than we are with arranging tiles into quadrilaterals. In algebraic number theory, an important kind of number emerges: units. We see that $1$ doesn't fit in quite so well with the prime numbers, and it certainly isn't composite, but it's right at home with the units. It still has many unique properties that distinguish it even among the units, but definitely the units are where $1$ belongs.


No, $1$ is not a prime number, though human mathematicians were slow to recognize this fact. The most important reason that $1$ is not prime (or composite, for that matter) is that it is its own inverse; just the fact that it has an inverse in $\mathbb{Z}$ speaks volumes.

The Short One
  • 872
  • 1
  • 7
  • 26

(In essence the same as other answers; I'd rather put it as a comment if I could.)

The line of reasoning can be as follows:

  1. Each composite (e.g. 6, 10) can be written as a product of primes. We don't dispute this, it's just a matter of definition to set it straight.

  2. For a given number, one could say if a prime "goes in" it, and if it does, how many times. It's easier then to say simply how many times it appears, with the possibility of 0.

  3. Now, what if all the primes appear zero times in a number? That number must be 1. (If you are writing code to compute a product, you know to set initial value to be 1.) So 1 is a composite in a weird way: it is composed of no primes (which is literally plural).

Euler's product says the same thing with a formula: $$\sum_{n=1}^\infty \frac{1}{n} = \prod_p \frac{1}{1-p^{-1}} $$ where the product is over {2,3,5,...}. It's less elegant to always have to write $p\neq 1$.

It might make sense that 1 was demoted from being a prime at the same time that 0 was "promoted" to be a natural number. Some infinite series $\sum a_n$ naturally start with $n=0$, and others with $n=1$ (as the one above), and we always will need to deal with both. For primes, though, people haven't found a case in which 1 is naturally included.

  • 181
  • 2
  • 5

The Question should be _"Why is the word $prime$ used only for a positive non-invertible indecomposable integer?"_The Answer is that Positive-NonInvertible-Indecomposable-Integer is too long, except in German. If you need a name for numbers that are either prime or $1$, you may invent one!

  • 53,442
  • 4
  • 26
  • 68