# If $P$ and $Q$ are distinct primes, how to prove that $\sqrt{PQ}$ is irrational?

$P$ and $Q$ are two distinct prime numbers. How can I prove that $\sqrt{PQ}$ is an irrational number?

• I assume you want $P$ and $Q$ to be two distinct prime numbers. – Hagen von Eitzen Oct 23 '14 at 15:39
• More generally: If $X^2-n$ has a rational root, then it has an interger root. – Hagen von Eitzen Oct 23 '14 at 15:41
• You should be able to adapt the proof that $\sqrt 2$ is irrational. Do you know that proof? That seems to be a logical place to start. – MJD Oct 23 '14 at 15:42
• I've seen the proof that $\sqrt 2$ is irrational. I am very fresh in Infi and don't feel confident in this yet. – Dean Oct 23 '14 at 16:19

If $$\sqrt{pq}=\frac{m}{n}, \quad (m,n)=1,$$ then $$n^2pq=m^2, \tag{\star}$$ which means that $$p\mid m^2$$ and hence $$p\mid m$$. Thus $$m=pm_1$$, and $$(\star)$$ becomes $$n^2q=pm_1^2.$$ But this means that $$p\mid qn^2$$, and as $$p\ne q$$ and hence $$p\not\mid q$$, then $$p\mid n^2$$, and thus $$p\mid n$$. Therefore, $$n=pn_1$$.
This is a contradiction, since $$p\mid m$$ and $$p\mid n$$, and we had assumed that $$(m,n)=1$$.
• $(m,n)=1$ means that $m$ and $n$ are relatively prime - i.e., they do not have any common divisor other than 1. – Yiorgos S. Smyrlis Oct 23 '14 at 16:26
• Once you get to $n^2pq=m^2$ you're actually done - because a prime number has to appear an even number of times in the prime decomposition of a number squared, and in this case since $p ≠ q$ both will appear an odd number of times in the prime decomposition of $m^2$, since either they appear an even number of times in $n^2$, or they don't at all and either way it's an odd number of appearances in the left side of the equation - which is a contradiction. – Elad Avron Mar 26 '15 at 17:19
Proof: Assume, to the contrary, that $$\sqrt{pq}$$ is rational. Then $$\sqrt{pq}=\frac{x}{y}$$ for two integers $$x$$ and $$y$$ and we further assume that $$gcd(x,y)=1$$. Observe that $$pqy^2=(qy^2)p=x^2$$. Since $$qy^2$$ is an integer, $$p\mid x^2$$ and by Euclid's Lemma, $$p\mid x$$. Thus $$x=pd$$ for some integer $$d$$ and so $$pqy^2=x^2=(pd)^2$$ and so $$qy^2=p(d^2)$$. Hence, $$p\mid qy^2$$. Since $$p,q$$ are distinct primes, $$p \neq q$$ and so $$p \nmid q$$, which means $$p\mid y^2$$. Thus, $$p\mid y$$. This contradicts our assumption that $$gcd(x,y)=1$$.
If you follow through the usual proof that $\sqrt 2$ is irrational, it goes through in this case as well. One of them (for $\sqrt 3$) is here, but a search for irrational+sqrt will find many choices