Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 7

The Fundamental Theorem of Arithmetic: Proof using Euclid's Lemma

Recommended resources

Welcome to the second module of our course. Having built a solid foundation with the Division Algorithm, GCDs, and Euclid's Lemma, we are now ready to tackle one of the most central results in all of number theory. This lesson will focus on a theorem whose name declares its own importance: the Fundamental Theorem of Arithmetic.

In our previous lessons, we assembled a powerful toolkit. We saw how the Euclidean Algorithm gives rise to Bézout's Identity, which in turn provides a direct path to proving Euclid's Lemma: if a prime divides a product , then must divide either or . Today, you will see how this lemma serves as the master key to unlocking the proof of the Fundamental Theorem, which asserts that every integer has a unique prime factorization. This lesson will not only guide you through the formal proof but also explore the very logic of its discovery.

1. Why is this Theorem "Fundamental"?

At first glance, the idea that any number can be broken down into a unique set of prime factors might seem obvious. If you factor the number 120, whether you start with or , you always end up with three 2s, one 3, and one 5. It feels inevitable.

However, this property of "unique factorization" is not a universal truth of all number-like systems. It's a special, profound feature of the integers we work with. To appreciate why this theorem isn't trivial and is truly "fundamental," it helps to see what happens when it fails.

Why is this "Fundamental" to Arithmetic?

This video from PolyaMath provides excellent motivation by questioning the "obviousness" of the theorem and constructing number systems where unique factorization breaks down.

Please watch the first part of the video, from the beginning to this point. Pay close attention to the two examples: The "unnatural numbers" ending in 1. The set of numbers of the form a + b\sqrt{-5}. These examples demonstrate that the intuitive feeling of uniqueness is not guaranteed. They highlight that a rigorous proof is necessary to establish this property for the integers.


2. Stating the Theorem

The video you just watched helps us appreciate the depth of the theorem. Let's now state it with formal precision. The Fundamental Theorem of Arithmetic (FTA) consists of two distinct claims: one about existence and one about uniqueness.

Olympiad Number Theory Through Challenging Problems

This text by Justin Stevens provides a concise statement and proof of the theorem. We will use it to structure our formal argument.

In Section 1.3, "Fundamental Theorem of Arithmetic," on page 22, please read the statement of Theorem 1.3.1. It explicitly states that every integer n \geq 2 has a unique factorization. Then, notice how the proof is immediately divided into two parts: proving existence and proving uniqueness.

As the text lays out, we must prove two things:

  1. Existence: Any integer can be written as a product of prime numbers.
  2. Uniqueness: This factorization is unique, except for the order in which the prime factors are written.

3. The Proof, Part I: Existence

The existence part of the theorem aligns well with our intuition. It feels right that we can always break a number down until we're left with only primes. The standard way to formalize this is with strong induction or, equivalently, by considering a minimal counterexample. This latter approach is a classic problem-solving strategy in Olympiad mathematics.

The mathematician Timothy Gowers wrote an excellent blog post exploring how one might "discover" the proof of the FTA from first principles. This perspective is perfectly suited to your interest in the "why" behind the mathematics.

Proving the fundamental theorem of arithmetic | Gowers's Weblog

This blog post by Timothy Gowers walks through the thought process of constructing the proof. We'll start with his exploration of the existence part.

Please read the first two sections of the article: Stating the problem and analyzing a minimal counterexample. As you read, focus on how the argument works: It assumes, for the sake of contradiction, that there is a set of integers that cannot be factored into primes. By the Well-Ordering Principle, this set must have a smallest element, let's call it n. The argument then shows why this n cannot be prime and must be composite. Finally, it uses the fact that the factors of n are smaller than n to derive a contradiction.

The logic is elegant. If is the smallest integer that cannot be written as a product of primes, it cannot be prime itself (as that would be a factorization of one prime). So, must be composite, meaning where . But since and are smaller than , they are not counterexamples and therefore do have prime factorizations. By combining the prime factors of and , we immediately get a prime factorization for . This contradicts our initial assumption that had no such factorization.

Thus, every integer must have a prime factorization.


4. The Proof, Part II: Uniqueness

Proving uniqueness is the more profound and challenging part of the theorem. This is where all our hard work from the previous module pays off. The entire proof rests on the power of Euclid's Lemma.

Let's return to Gowers's blog post to see how one might discover the necessity of Euclid's Lemma.

Proving the fundamental theorem of arithmetic | Gowers's Weblog

This part of the post brilliantly reduces the entire problem of uniqueness to a single, essential property of prime numbers.

Continue reading from section 3 through to the end of section 10, where the argument connects to Bézout's theorem. The logical steps are: Assume a minimal counterexample to uniqueness: n = p_1 \dots p_r = q_1 \dots q_s, where the set of p_i primes is different from the set of q_j primes. The argument shows that this reduces the problem to proving a core claim: if a prime p divides a product ab, then it must divide a or b. The post then shows how trying to prove this claim naturally leads to the need for multiplicative inverses modulo p, which in turn leads directly to an equation of the form ca + mp = 1. This is precisely Bézout's Identity.

This line of reasoning is a beautiful illustration of mathematical discovery. It shows that proving the uniqueness of prime factorization is not just an application of Euclid's Lemma; rather, the quest for that proof is what motivates the discovery of Euclid's Lemma and Bézout's Identity in the first place. You have walked this exact logical path over the last few lessons.

Now that we understand the strategy, let's see the formal, concise proof. Suppose we have an integer with two different prime factorizations:

Since the prime divides the left side, it must also divide the right side.

Now, we apply Euclid's Lemma repeatedly. Since divides the product, it must divide at least one of the factors. But all the factors are themselves prime numbers. The only way one prime can divide another is if they are the same prime. Therefore, must be equal to one of the .

We can then cancel this prime from both sides of the equation, leaving a smaller number with two different prime factorizations. By repeating this argument (formally, using induction), we can cancel all the primes one by one, showing that the two factorizations must have been the same to begin with.

Let's read the fully structured proof.

Olympiad Number Theory Through Challenging Problems

This text provides the final, polished proof of uniqueness, building on the ideas we've just explored.

Return to page 22 of the document and read the second part of the proof, titled "The second part of the problem is to prove uniqueness". Follow the logic as it uses Euclid's Lemma to cancel primes from two supposedly different factorizations until it arrives at a contradiction.

This elegant argument completes the proof of the Fundamental Theorem of Arithmetic.

This image, showing the Euclidean algorithm for GCD(34, 21), is a reminder of the deep foundations of our proof. The algorithm leads to Bézout's Identity, which proves Euclid's Lemma, the key to establishing unique factorization.

Conclusion

Today, we have reached the summit of our first major topic. The Fundamental Theorem of Arithmetic stands as a testament to the beautiful, rigid structure of the integers.

Key Takeaways:

  • The Theorem: Every integer can be expressed as a product of primes, and this factorization is unique up to the reordering of factors.
  • Existence Proof: This is established by strong induction or by considering the smallest counterexample, a proof by contradiction.
  • Uniqueness Proof: This is the deeper part of the theorem. Its proof is a direct consequence of Euclid's Lemma, which states that if a prime divides a product, it must divide one of the factors.
  • Logical Chain: We have now seen the complete logical progression: The Division Algorithm allows for the Euclidean Algorithm, which proves Bézout's Identity, which proves Euclid's Lemma, which in turn proves the uniqueness portion of the Fundamental Theorem of Arithmetic.

In our next lesson, we will delve deeper into the conceptual significance of unique factorization. We will return to the strange number systems you saw in the video—those that lack this property—to understand what unique factorization allows us to do and why its absence creates such a different mathematical world.