Prove that if $p_1,...,p_k$ are distinct prime numbers, then $\sqrt{p_1p_2...p_k}$ is irrational.

I do not usually prove theorems, so any hint is appreciated. I have taken a look at this and tried to repeat that argument over and over, but I messed up. Perhaps there is an easier to do it. Thanks in advance.

Edit: For the case $k=1$, suppose that $\sqrt{p}=\frac{m}{n}, n\neq0$ and $gcd(m,n)=1$. It follows that $m^2=pn^2$, so $p\mid m$. Also, $p\mid n$. Therefore, $m$ and $n$ are not relatively prime. Contradiction.

  • $\begingroup$ Can you write up what you have done? Esp for the $ \sqrt{p_1} $ case. The general case is very similar. $\endgroup$
    – Calvin Lin
    Commented Jun 29, 2020 at 22:22
  • 3
    $\begingroup$ it's exactly the same as in the case of two prime numbers that you mention. $\endgroup$
    – alphaomega
    Commented Jun 29, 2020 at 22:24
  • $\begingroup$ Just edited to show what I did so far. I'm not so sure that's correct. $\endgroup$ Commented Jun 29, 2020 at 22:38

3 Answers 3


Assume ${p_1,...,p_k}$ are distinct primes, and assume (aiming for a contradiction) that ${\sqrt{p_1p_2...p_k}=\frac{a}{b}}$ for coprime positive integers ${a,b}$ (alternatively, you can write ${(a,b)=1}$). As before, squaring both sides and rearranging for ${a^2}$ yields

$${\Rightarrow a^2 = p_1...p_kb^2}$$

In other words,${a^2}$ contains ${p_1,...,p_k}$ as factors, and thus ${a}$ must contain ${p_1,...,p_k}$ as factors (since ${a^2}$ contains these primes as factors, this has to be the case because they are prime. This wouldn't be true for some random composite number).

Anyways, we rewrite ${a=p_1...p_ka^*}$. Plugging back in gives

$${\Rightarrow \frac{p_1...p_ka^*}{b}=\sqrt{p_1...p_k}}$$

And this implies

$${\Rightarrow \frac{p_1^2...p_k^2\left(a^*\right)^2}{b^2}=p_1...p_k}$$

You can rearrange this and get

$${b^2 = p_1...p_k\left(a^*\right)^2}$$

And we have got our desired contradiction. By the same argument as before, this would tell us ${b^2}$ has factors ${p_1...p_k}$, and because again these are primes that means ${b}$ contains factors ${p_1...p_k}$. This is a contradiction since we assumed that ${(a,b)=1}$ (that ${a,b}$ were coprime, hence could not share any common factors), and yet from assuming the rationality of our expression we have shown that ${a,b}$ both contained ${p_1,...,p_k}$ as factors!

QED. Or Quantum Electrodynamics if you are a Physicist :P


First, I will prove that if $\sqrt{p_1p_2...p_k}$ is a rational, then it must be an integer. Suppose there are $p, q\in\mathbb{N}$ with $\text{gcd}(p,q)=1$ such that $$\dfrac{p}{q}=\sqrt{p_1p_2...p_k}.$$ Using the Euclid algorithm, we can find two (relatively prime) integers $a, b$ such that $ap+bq=1.$ Now consider $$0=(p-q\sqrt{p_1p_2...p_k})(b-a\sqrt{p_1p_2...p_k})=bp-(ap+bq)\sqrt{p_1p_2...p_k}+aq(p_1p_2...p_k).$$ Hence $\sqrt{p_1p_2...p_k}=bp+aq(p_1p_2...p_k)\in\mathbb{Z}.$

Hence $p^2=p_1p_2...p_k.$ Now from elementary number theory, you can argue that $p_1$ s a prime factor of $p$ and, it implies that $p_1$ is also a prime factor of $p_2p_3...p_k,$ which is a contradiction.

  • $\begingroup$ Note that, this proof does not use any restriction on $k.$ In particular it can be used to derive $\sqrt{p}$ is irrational for any prime $p.$ $\endgroup$
    – Bumblebee
    Commented Jun 29, 2020 at 23:27

"and tried to repeat that argument over and over"

that's all you have to do but you only have to do the argument once.

Let $a,b$ be integers where $(\frac ab)^2 = p_1.....p_n$ so

$a^2 = bp_1......p_n$. So for any of those prime $p_i$ (it doesn't matter which one) then $p_i|a^2$ and by Euclid's Lemma[*] the $p_i|a$ so $p_i^2|a^2$ and so $a*\frac {a}{p_i} = b\frac {p_1..... p_n}{p_i}$

For notation let $\frac a{p_i} = a'$ and let $\frac {p_1.....p_n}{p_i} = P= p_1p_2...p_{i-1}p_{i+1}....p_n = \prod_{j=1;j\ne i}^n p_i$.

so $aa' = p_ia'^2 = bP$. So $p_i|bP$.

So by Euclid's Lemma either $p_i|b$ or $p_i|P$. But $P = \prod_{j=1;j\ne i}^n p_i$ is not divisible by $p_i$. So $p_i|b$.

$p_i|a$ and $p_i|b$ so $\frac ab$ where not in lowest terms.

Now we could argue that we only claimed $a,b$ where integer, we never said they had to be in lowest terms. But we can argue if $a,b$ exist then we can repeat this infinitely (as $p_i|b$ then if $\frac b{p_i} = b'$ then we have $(\frac {a'}{b'})^2 = p_1..... p_n$ so we can repeat over and over.) This means we have an infinite series of $ a = p_ia'=p_i^2a_2=p_i^2a_3 =..... =p_k^2a_k=...$. But as $p_i > 1$ this mean $a > a' >a_2>a_3>.....$. That's clearly impossible as there are only a finite number of natural numbers less than $a$[**].

So we have proven the result.

[*] Euclid's lemma: If $p$ is prime and $p|ab$ for integers $a,b$ then either $p|a$ or $p|b$ (or both).

Everything hinges on that. (Which presumably you have proven one way or another already.

[**] This is the well-ordered principal. Every set of natural numbers must have a minimal element. Sa $a> a'> a_2 > a_3.....$ then the set $\{a,a', a_i\}$ must have a smallest $a_k$ which means it only has $k$ elements and eventually we must get $\frac ab$ in lowest terms.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .