25

In Euclid's infinite prime numbers proof, the logic is as follows:

Assume a set $S$ of all prime numbers in existence is finite (there are a finite amount of primes)

Then there must be a greatest prime $p$

$$n = (2 \cdot 3 \cdot 5\cdots p) + 1$$

$n > p$, and under the proof's assumption, $n$ cannot be prime.*

This is where the logic confuses me. Why is it that given that the if a number is not prime, then it is automatically divisible by a prime. I can't think of an example to contradict, but that's not proof that there exists no number that is not prime and non divisible by primes.

Jake Byman
  • 361
  • 1
  • 3
  • 7
  • 4
    Well, $1$ is not. But all other positive integers are. – André Nicolas Aug 28 '14 at 04:15
  • 2
    It is not true that Euclid's proof was by contradiction, although many great mathematicians have written that it is. See my answer below. – Michael Hardy Aug 28 '14 at 04:20
  • @TylerHG, that isn't true though? All numbers divisible are not prime, but that doesn't mean all nonprime numbers are divisible by 2. For example, 21 isn't prime and it isn't divisible by 2. – Jake Byman Aug 28 '14 at 04:51
  • 4
    Euclid's Elements itself makes this fact explicit, see Book VII, proposition 31, "Any composite number is measured by some prime number". – Jeppe Stig Nielsen Aug 28 '14 at 09:58
  • "Why is it that given that the if a number is not prime, then it is automatically divisible by a prime." This is the result known as the fundamental theorem of arithmetic. Every positive number greater than 1 can be written as a prime , or as a product of primes uniquely (up to order). – john Dec 02 '19 at 08:02

4 Answers4

26

One can prove this for all integers greater than $1$ by induction: we know that $2$ is a prime. Now for ou inductive step assume that for all $i<n$, $i$ is either prime or divisible by a prime. Case 1: $n$ is prime; we're done. Case 2: $n$ is composite, so $ab = n$ for $a, b < n$. So each of those is divisible by a prime. We're done.

Essentially the same argument shows that all integers greater than $1$ can be written as a product of primes.

  • 'Essentially the same argument shows that all integers greater than 1 can be written as a product of primes.' -- except prime numbers I would assume. – krowe Aug 28 '14 at 06:24
  • 16
    @krowe A product of only one number is still considered a product in mathematics. :) (Actually, the product of no numbers is usually defined to be $1$, so one could say that $1$ can be written as a product of primes, too.) – JiK Aug 28 '14 at 07:25
  • I have heard that said before but I've always assumed that is because, 31 ~ 3. I guess this is where my disconnect lies. If I'm understanding you right then you are saying that it's because 3NULL ~ 3. Also, you are saying that NULLNULL ~ 1. I'm sorry but I reject any math based on what appears to be the concept that NULL ~ 1 when multiplying. The way I see it, 3NULL ~ NULL and NULL*NULL ~ NULL. Fortunately, so does every computer language I've ever used. – krowe Aug 28 '14 at 09:36
  • 2
    I think your proof should mention (at least one of) $a>1$ and $b>1$. They easily follow from $b<n$ respectively $a<n$, but in such elementary proofs it seems useful to make clear that one is applying the inductive hypothesis to numbers in the range for which it is being proved (here: the integers greater than $1$). – Marc van Leeuwen Aug 28 '14 at 10:08
  • 7
    @krowe: When forming the product of $n$ numbers, only $n-1$ multiplications are involved. Hence in forming the product of one number, no (zero) multiplications are performed; no notion of NULL is involved at all. Calling it a product is only a manner of speaking, or better, is a notion that is defined in terms of multiplication, but without necessarily invoking any multiplication in each concrete case. Actually, the product of $0$ numbers (which would normally involve $-1$ multiplications, obviously absurd) is purely conventionally defined to be the neutral element $1$ for multiplication. – Marc van Leeuwen Aug 28 '14 at 10:16
  • @MarcvanLeeuwen: for that matter, it requires at least some justification that $a$ and $b$ aren't greater than $n$. The usual definition of composite is "at least one factor other than itself and 1", so an elementary proof would need to show $1 <$ that factor $< n$, using axioms that relate multiplication to $<$ – Steve Jessop Aug 28 '14 at 10:21
  • 4
    @krowe - What do you mean by "NULL"? Perhaps you would find this Wikipedia article: http://en.wikipedia.org/wiki/Empty_product useful in helping you to understand why mathematicians find it natural to make the convention that the product of no numbers at all is 1. – Hammerite Aug 28 '14 at 10:22
  • 1
    @SteveJessop: With that definition of composite, I would write the proof even differently (you then get just one factor from the definition, but that suffices, at least in your first paragraph proof). But why not define a (positive) number composite if it can be written as product of two positive numbers${}>1$? That's easier, and gives you what you want right away (but you must show the product strictly larger than the factors). – Marc van Leeuwen Aug 28 '14 at 10:22
  • @MarcvanLeeuwen: Because for the questioner's proof above we want to assert that the constructed number $n$ is necessarily either prime or composite. So either we have to use definitions that immediately prove the theorem "every number $>1$ is either prime or composite", or else we have to go to the trouble of proving that if $n$ is not prime then it is composite-by-your-definition. Which is exactly the little extra thing we're saying an elementary proof needs. We have to prove that somewhere. – Steve Jessop Aug 28 '14 at 10:27
  • @SteveJessop: I think we agree. – Marc van Leeuwen Aug 28 '14 at 10:28
  • @MarcvanLeeuwen: indeed, and Mike can make whatever he wants of our nit-picking ;-) – Steve Jessop Aug 28 '14 at 10:29
  • I understand this answer gives insight in how it works but in my opinion it is not the answer at all. the questioner essential asks, "why is every number either prime or divisible by prime?" and one of the first things you say "assume that for all i<n, i is either prime or divisible by a prime". You give no proof of that at all, you give a conclusion based on the assumption that it is true – Ivo Aug 28 '14 at 13:33
  • @IvoBeckers This is known as mathematical induction. I neglected to prove that, e.g., 2 is a prime or divisible to prime, but I'll add this. –  Aug 28 '14 at 14:20
  • 1
    @SteveJessop You do make an important distinction! But in this case and context I would rather sacrifice clarity for brevity. Here is the rest of the argument, in case someone wants it: I define prime to be "divisible by no positive integers other than one and itself"; composite to be "not prime". Then if a number is composite, it is (by definition of divisibility) of the form $ab$ for positive integers $a$ and $b$, neither of the form $1$ or $p$ (by definition of composite). But if $a \neq 1$ is a positive integer, then $a > 1$, and thus $n = ab > b$. Similarly for $b > 1$, $n > a$. –  Aug 28 '14 at 14:27
  • (I am glad to ignore the existence of negatives when they displease me; e.g., now.) –  Aug 28 '14 at 14:28
  • Please define what you mean by composite number. There seems to be different definitions of composite number. – john Dec 02 '19 at 08:17
  • @user98602 This looks like the proof of the fundamental theorem of arithmetic – john Dec 02 '19 at 08:29
  • @SteveJessop Can you elaborate on your comment "Then if a number is composite, it is (by definition of divisibility) of the form $ab$ for positive integers $a$ and $b$, neither of the form $1$ or $p$" How do you get this by using the definition of divisibility. I understand the definition of composite number should be, there exists a non trivial divisor other than 1 and itself, since that is the negation of prime number. But I want to understand how you get two non trivial divisors. Specifically show that "If $n$ is composite then there exist integers $a,b$ such that $ 1 < a,b< n $ and $n=ab$ – john Dec 02 '19 at 08:49
  • @john: So, if $n$ is composite then it has a non-trivial divisor. Let's call it $a$. But what is the definition of divisor: how do we actually write "$a$ is a divisor of $n$"? Btw that wasn't my comment, it was directed at me, but that's what I take it to mean. – Steve Jessop Dec 06 '19 at 15:09
10

Lemma $\ $ The least factor $>1\,$ of $\ n>1\,$ is prime.

Proof $\ $$\,n>1$ has at least one factor $> 1,\,$ viz. $\,n.\,$ Let $\,p\,$ be its least factor $>1.\,$ Then $\,p\,$ is prime (else $\,p\,$ has a proper divisor $\,1 < d < p\,$ and $\,d\mid p\mid n\,\Rightarrow\,d\mid n,\,$ contra minimality of $\,p).$

Remark $\ $ More generally it proves prime the least element of any set $\,S\,$ of integers $> 1$ that is closed under divisors $> 1,\,$ i.e. $ $ if $\,S\,$ contains $\,n\,$ then $\,S\,$ contains every divisor $> 1$ of $\,n.\,$ Above the set $\,S\,$ is the set of factors $>1$ of $\,n.$

We can interpret the proof constructively as follows. Suppose we have an algorithm $\,n\mapsto f(n)\,$ that yields a proper factor of every nonprime $\,n > 1.\,$ Then iterating the algorithm must eventually terminate at a prime factor of $\,n,\,$ for otherwise it would yield an infinite strictly descending sequence of proper factors (see below), contra $\,\Bbb N\,$ is well-ordered

$$ n > f(n) > f(f(n)) > f(f(f(n))) >\, \cdots$$

Bill Dubuque
  • 272,048
4

You are in good company in your error. Some great mathematicians, including Dirichlet, have made the same mistake: falsely reporting that Euclid's proof was by contradiction.

Euclid's proof says that if you take any finite set of prime numbers (for example, $2$, $11$, and $19$) and multiply them and then add $1$, the resulting number is not divisible by any of the primes in the finite set you started with (thus $(2\cdot11\cdot19)+1$ is not divisible by $2$, $11$, or $19$ because its remainder on division by any of those numbers is $1$.

Therefore, the finite set you started with can be extended to a larger finite set: the prime factors of (in this example) $(2\cdot11\cdot19)+1$.)

The reason the number $(2\cdot11\cdot19)+1$ must be divisible by some prime is that if it is not divisible by any prime other than itself, then it is prime and it is of course divisible by itself.

PS: Some people commenting below are unhappy with my last paragraph above, so I'll add this: Let's do a proof by contradiction on this one: Consider the smallest number $N$ that is not divisible by any prime. It cannot be divisble by anything smaller than itself except $1$, since that not-necessarily-prime factor, being smaller than the smallest counterexample, would be divisible by some prime, and then $N$ would be divisible by that prime. So not being divisible by anything except itself and $1$, $N$ would be prime, and hence divisible by some prime, namely itself.

  • 6
    This is not an answer to the question (which is not about history). – Bill Dubuque Aug 28 '14 at 04:24
  • 2
    ^True, but still very interesting! – Jake Byman Aug 28 '14 at 04:34
  • @Jake This is by now very-well-known, having been mentioned here many times, going back to the dawn of the site $4$ years ago e.g. here. It was widely popularized on sci.math long ago. – Bill Dubuque Aug 28 '14 at 04:53
  • 1
    @BillDubuque : It does answer the question, after the comments about history. But you'll notice that the question itself began with comments about history, and the confusion had to be cleared up. – Michael Hardy Aug 28 '14 at 05:07
  • @BillDubuque : . . . and yet I keep encountering mathematicians who don't know it. One of those was Andrew Odlyzko, just last spring. – Michael Hardy Aug 28 '14 at 05:08
  • @Michael You don't answer the OP's question "Why is it that if an integer > 1 is not prime, then it is divisible by a prime?" Rather, you give a different way to proceed. – Bill Dubuque Aug 28 '14 at 05:24
  • 4
    @MichaelHardy You end your answer with "if it is not divisible by any prime other than itself, then it is prime and it is of course divisible by itself.", which is the starting point of the question. – JiK Aug 28 '14 at 07:27
  • @JiK : No, that is not the starting point of the question. Maybe you need to read more carefully. It said "Why is it that given that the if a number is not prime, then it is automatically divisible by a prime." Remember I said $N$ would be the smallest number not divisible by any prime. Then either it's divisible by some smaller number or it's not. In the former case it's divisble by a prime factor of such a smaller number (which has a prime factor because it's smaller than the smallest number that doesn't) and in the latter case we also get a contradiction. – Michael Hardy Aug 28 '14 at 22:48
-2

The answer by @Don Larynx gives me an idea without further looking at the unique factorization theorem.

Why a non-prime is always divisible by a prime? When a number P is divisible by n1 then n1 is a factor of P. For example P = n1 x n2 x n3. So P is divisible by either n1, n2, n3 (the quotient is a positive whole number) and these 3 numbers are factors of P. Lets say we want to factor P, we can start with 2 factors, P = n1 x n2. If both n1 and n2 are primes then we have answered the question. If any of the factor is non-prime, then we can continue to break down that non-prime factor until eventually all the factors is a prime (divisible by itself and 1). For example:

1.) 200 = 10 x 20
2.) 200 = (5 x 2) x (5 x 4)
3.) 200 = (5 x 2) x (5 x (2 x 2))
200 = 5 x 2 x 5 x 2 x 2

1.) 200 = 100 x 2
2.) 200 = (25 x 4) x 2
3.) 200 = (5 x 5) x (2 x 2)) x 2
200 = 5 x 5 x 2 x 2 x 2

So we can say a prime can only be a product of itself and 1. A non-prime can eventually be reduced to a product of 2 or more prime numbers. Therefore a non-prime is always divisible by a prime.