# Prove: The Square Root of a Prime Number is Irrational.

In our previous lesson, we proved by contradiction that the square root of 2 is irrational. This time, we are going to prove a more general and interesting fact. We will also use the proof by contradiction to prove this theorem.

That is, let [latex]p[/latex] be a prime number then prove that [latex]\sqrt p[/latex] is irrational.

But first, let’s define a prime number. A prime number is a positive integer greater than [latex]1[/latex] that has **exactly two** positive integer divisors: namely, [latex]1[/latex] and itself.

To see it for yourself, below is the list of the first ten (10) prime numbers. Notice that each of them is only divisible by [latex]\large{1}[/latex] and itself. Just a side-note, the number [latex]2[/latex] is the only EVEN prime number.

- [latex]2[/latex]
- [latex]3[/latex]
- [latex]5[/latex]
- [latex]7[/latex]
- [latex]11[/latex]
- [latex]13[/latex]
- [latex]17[/latex]
- [latex]19[/latex]
- [latex]23[/latex]
- [latex]29[/latex]

To prove this theorem, we will use the method of Proof by Contradiction. We will assume the negation (or opposite) of the original statement to be true. That is, let [latex]\color{red}p[/latex] be a prime number and [latex]\sqrt {\color{red}p} [/latex] is a rational number. Now, the line of thought is to prove that [latex]\sqrt {\color{red}p} [/latex] is rational. However, we expect a contradiction such that we discard the assumption, and therefore claim that the original statement must be true, which in this case, the square root of a prime number is irrational.

Since we assume that [latex]\sqrt p [/latex] is rational, it means there exists two positive integers [latex]a[/latex] and [latex]b[/latex] but [latex]b \ne 0[/latex] that we can express as a ratio like the one below.

An essential part of this proof is to further assume that the greatest common divisor of [latex]a[/latex] and [latex]b[/latex] is [latex]1[/latex]. We can write it symbolically in math as [latex]\gcd \left( {a,b} \right) = 1[/latex].

This equation is asking to be squared on both sides, and see what we can make sense of it after doing so.

[latex]\left( {\sqrt p } \right)^2 ={ \Large{{\left( {{a \over b}} \right)^2}}}[/latex]

Multiply both sides of the equation by [latex]b^2[/latex] to get rid of the denominator. This is the result.

[latex]\Large{{\color{red}p}\,{b^2} = {a^2}}[/latex]

I want to move around the equation so that it is much easier to understand what it is trying to say. I hope you agree that the equation above is exactly the same as the one below.

Since [latex]a[/latex] is a positive integer greater than [latex]1[/latex] then you can express it as a product of unique prime numbers with even or odd powers. However, by raising [latex]a[/latex] to the power of [latex]2[/latex], [latex]a^2[/latex] must have prime factorizations wherein each unique prime number will have an even exponent.

Let’s have an example to amplify what I meant above. Suppose [latex]a = 3,780[/latex]. Breaking it down as a product of prime numbers, we get [latex]a = 2 \cdot 2 \cdot 3 \cdot 3 \cdot 3 \cdot 5 \cdot 7[/latex]. We can condense the prime factorization by rewriting it as [latex]a = {2^2} \cdot {3^3} \cdot 5 \cdot 7[/latex]. Notice how we removed duplicates of prime numbers by expressing it as factors of primes with each unique prime having the appropriate power. The exponent tells how many times the prime number appears in the prime factorization.

Notice that in the prime factorization of integer [latex]\color{blue}\large{a}[/latex], the prime numbers can either have an odd or even exponent. This is an important observation that we will take advantage of later.

The next step is to square the integer [latex]\color{blue}\large{a}[/latex], thus we have [latex]\color{blue}\large{a^2}[/latex].

Apply the Power of a Power Rule of Exponent. We will use this property to square the integer [latex]\color{blue}\large{a}[/latex]. In a nutshell, this exponent rule will allow us to distribute the outermost exponent [latex]2[/latex] to the exponents of the unique prime numbers inside the parenthesis.

After squaring the integer [latex]\color{blue}\large{a}[/latex], the exponents of the unique prime factors of [latex]\color{blue}\large{a}[/latex] are now ALL **even** numbers. It is the case since the product of [latex]2[/latex] and any integer will always be an even number. This is the most important observation that we can take from this step. We will definitely revisit this result.

Why did we spend some time prime factorizing the integer above? The reason is to demonstrate or illustrate by example the Fundamental Theorem of Arithmetic which is central to the proof of this theorem.

**The Fundamental Theorem of Arithmetic**

The Fundamental Theorem of Arithmetic states that for every integer [latex]n[/latex] greater than one, [latex]n > 1[/latex], we can express it as a prime number or product of prime numbers. The theorem further asserts that each integer has a unique prime factorization thus it has a distinct combination or mix of prime factors. In other words, the prime factorization of an integer is so unique because each prime factor always appears in the same amount or quantity thereby the arrangement doesn’t matter.

In order to have uniformity in our application of the fundamental theorem of arithmetic, we have to agree that we write the prime factors of an integer in **ascending order**. This way we can clearly see without any doubt that each integer’s prime factorization (greater than [latex]1[/latex]) is clearly unique.

**Examples:**

[latex]100 = 2 \cdot 2 \cdot 5 \cdot 5 = {2^2} \cdot {5^2}[/latex]

[latex]126 = 2 \cdot 3 \cdot 3 \cdot 7 = 2 \cdot {3^2} \cdot 7[/latex]

[latex]5,070 = 2 \cdot 3 \cdot 5 \cdot 13 \cdot 13 = 2 \cdot 3 \cdot 5 \cdot {13^2}[/latex]

[latex]12,375 = 3 \cdot 3 \cdot 5 \cdot 5 \cdot 5 \cdot 11 = {3^2} \cdot {5^3} \cdot 11[/latex]

The next logical step is to **generalize** the factorization of any integer greater than 1 using the fundamental theorem of arithmetic.

Recall that in Equations #1, #2, and #3, it is clear that we must show how to factorize integers [latex]a[/latex] and [latex]b[/latex] in general form. And more importantly, we will need to examine what happens to the prime factorizations of integers [latex]a[/latex] and [latex]b[/latex] when we square both of them, that is [latex]a^2[/latex] and [latex]b^2[/latex].

- Here is the factorization of integer [latex]\large{a}[/latex] into its prime constituents.

Observe: The exponents of the unique prime factors of integer [latex]\large{a}[/latex] are either even or odd integers. That means, [latex]{n_1},{n_2},{n_3},{n_4},â€¦{n_j}[/latex] are even or odd integers.

Then we square the prime factorization of integer [latex]\large{a}[/latex]. This is what we got.

Observe: The effect or consequence of squaring the unique prime factors of integer [latex]\large{a}[/latex] (raising to the power of [latex]2[/latex]) is that all exponents become even numbers since [latex]2[/latex] multiplied by any integer will always be an even number.

- By the same token, we will factorize integer [latex]\large{b}[/latex] and then square it.

**Notice:** The same observation from integer [latex]\large{a}[/latex] can be drawn for integer [latex]\large{b}[/latex]. The exponents of the prime factors of [latex]\large{b}[/latex] are either even or odd. But upon squaring it, the exponents all become even numbers.

We are now ready to put the strategy of the proof together. To do that, we will need to revisit Equation #3.

In a nutshell, this is the meaning of Equation #3 above. The left side of the equation is [latex]\large{a^2}[/latex]. As we have shown before in this lesson, the prime factorization of [latex]\large{a^2}[/latex] is a product of unique prime numbers with even powers. It implies that the right-hand side of the equation with the expression [latex]\large{p\,{b^2}}[/latex] must also be a product of unique prime factors with even exponents.

So the next logical step is to consider the two possible cases/scenarios below.

**1.** The prime number [latex]\large{\color{red}p}[/latex] occurs in the unique prime factorization of [latex]\large{b^2}[/latex].

**Answer:** If [latex]\large\color{red}p[/latex] occurs in the prime factorization of [latex]\large{b^2}[/latex], then we have [latex]\large\color{red}p[/latex] times [latex]\large{{p^{\,2k}}}[/latex] which is equal to [latex]\large{{p^{\,2k + 1}}}[/latex]. Thus, the resulting [latex]\large{p}[/latex] has an odd power which is [latex]2k+1[/latex]. This is obviously a **contradiction**.

**2.** The prime number [latex]\large\color{red}p[/latex] is **not** included (excluded) in the unique prime factorization of [latex]\large{b^2}[/latex].

**Answer:** If [latex]\large\color{red}p[/latex] does not occur in the prime factorization of [latex]\large{b^2}[/latex], then [latex]\large\color{red}p[/latex] must stand on its own. Thus, [latex]\large\color{red}p[/latex] has an odd power which is [latex]1[/latex]. This is unquestionably a **contradiction** as well.

**The Bottom Line:** In both cases, we have contradictions because [latex]a^2[/latex] implies that its unique prime factors must have even powers.

**Conclusion:** Since we have reached contradictions in both cases, we shall reject the assumption that [latex]\large\color{red}{\sqrt p }[/latex] is rational and therefore the original statement must be true that [latex]\large\color{red}{\sqrt p }[/latex] is irrational.

## WRITE THE PROOF

**THEOREM: **If [latex]\large{p}[/latex] is a prime number, then [latex]\large{\sqrt p }[/latex] is irrational.

**PROOF: **Let’s assume by contradiction that [latex]\large{\sqrt p }[/latex] is rational where [latex]\large{p}[/latex] is prime. Since [latex]\large{\sqrt p }[/latex] is a rational number, we can express it as a ratio/fraction of two positive integers [latex]\large{\sqrt p = }\Large{{a \over b}}[/latex] where [latex]a[/latex] and [latex]b[/latex] belong to the set of positive integers, [latex]b[/latex] is not equal to zero, and the Greatest Common Divisor (GCD) of [latex]a[/latex] and [latex]b[/latex] is [latex]1[/latex]. Now, squaring both sides of the equation, we obtain [latex]\large{p =} \Large{{{{a^2}} \over {{b^2}}}}[/latex]. We multiply both sides by [latex]b^2[/latex] to get rid of the denominator, thus we get [latex]p\,{b^2} = {a^2}[/latex]. Rearrange the equation by moving the expression on the left to the right, and the one on the right to the left. This gives us [latex]{a^2}={\color{red}p}\,{b^2}[/latex]. Now, let’s prime factorize both integers [latex]a[/latex] and [latex]b[/latex].

For [latex]a[/latex], we have [latex]\large{a = p_1^{{n_1}}\,p_2^{{n_2}}\,p_3^{{n_3}}\,p_4^{{n_4}}\,p_5^{{n_5}} \cdot \cdot \cdot p_n^{{n_j}}}[/latex]. The powers of the unique prime factors are even or odd numbers. Now, if we square [latex]a[/latex], we get [latex]\large{{a^2} = {\left( {p_1^{{n_1}}\,p_2^{{n_2}}\,p_3^{{n_3}}\,p_4^{{n_4}}\,p_5^{{n_5}} \cdot \cdot \cdot p_n^{{n_j}}} \right)^2}}[/latex] then simplify by multiplying the outermost exponent which is [latex]\color{red}2[/latex] to each and every exponent of the unique prime factor to obtain [latex]\large{{a^2} = p_1^{2{n_1}}\,p_2^{2{n_2}}\,p_3^{2{n_3}}\,p_4^{2{n_4}}\,p_5^{2{n_5}} \cdot \cdot \cdot p_n^{2{n_j}}}[/latex]. Thus, after squaring the integer [latex]a[/latex], we can clearly see that the exponents of all unique prime factors become all even numbers since any integer multiplied by [latex]2[/latex] is always an even number.

Similarly, we can do the same for integer [latex]b[/latex]. Here is its unique prime factorizations: [latex]\large{b = q_1^{{m_1}}\,q_2^{{m_2}}\,q_3^{{m_3}}\,q_4^{{m_4}}\,q_5^{{m_5}} \cdot \cdot \cdot q_m^{{m_k}}}[/latex]. After squaring integer [latex]b[/latex], its prime factors will have even powers with the same reasoning that of [latex]a^2[/latex]. That is, [latex]\large{{b^2} = {\left( {q_1^{{m_1}}\,q_2^{{m_2}}\,q_3^{{m_3}}\,q_4^{{m_4}}\,q_5^{{m_5}} \cdot \cdot \cdot q_m^{{m_k}}} \right)^2}}[/latex] which can be simplified as [latex]\large{{b^2} = q_1^{2{m_1}}\,q_2^{2{m_2}}\,q_3^{2{m_3}}\,q_4^{2{m_4}}\,q_5^{2{m_5}} \cdot \cdot \cdot q_m^{2{m_k}}}[/latex].

Since [latex]{a^2}={\color{red}p}\,{b^2}[/latex], it implies that right hand side of the equation which is [latex]{\color{red}p}\,{b^2}[/latex] is comprised of unique prime factors with even powers. This means, we will have to examine if in [latex]{\color{red}p}\,{b^2}[/latex] that [latex]\color{red}p[/latex] **occurs** or **does not occur** in the prime factorizations of [latex]b^2[/latex].

**Case 1:** Consider that [latex]\color{red}p[/latex] **occurs** in the prime factorization of integer [latex]b^2[/latex], that means we have [latex]p\left( {p_n^{2{n_j}}} \right) = {p^{1 + 2{n_j}}}[/latex] which is a prime number with an odd power. This contradicts our assumption of our main equation [latex]{a^2}={\color{red}p}\,{b^2}[/latex] where [latex]{\color{red}p}\,{b^2}[/latex] must contain **only** prime numbers with even powers.

**Case 2:** Consider that [latex]\color{red}p[/latex] **does not occur** in the prime factorization of integer [latex]b^2[/latex], this means the prime number [latex]\color{red}p[/latex] is unique and does not have the same copy in the prime factorization of [latex]b^2[/latex] which means [latex]\color{red}p[/latex] has an odd power of one since [latex]\color{red}p^1[/latex]. Again, this contradicts the supposition of our main equation [latex]{a^2}={\color{red}p}\,{b^2}[/latex] where [latex]{\color{red}p}\,{b^2}[/latex] must contain **only** prime numbers with even powers.

Since we have reached contradictions in **Case 1** and **Case 2**, we must reject the assumption and accept the original statement. Therefore, we have proved that the square root of a prime number is irrational. â—¼ï¸Ž

**You may also be interested in these related math lessons or tutorials:**