# Math Help - Prove that the square root of a non-square number is irrational

1. ## Prove that the square root of a non-square number is irrational

Prove: If integer N>1 is not a perfect square, then sqrt(N) is irrational.

2. ## Irrational numbers

Hello o&apartyrock
Originally Posted by o&apartyrock
Prove: If integer N>1 is not a perfect square, then sqrt(N) is irrational.
Assume that $\sqrt{N}$ is rational; in other words

$\exists\, p, q \in\mathbb{N},\, \sqrt{N} = \frac{p}{q}$

and assume further that $hcf(p,q)=1$; in other words, that the fraction $\frac{p}{q}$ is in its lowest terms.

Then $N = \frac{p^2}{q^2}$

$\Rightarrow p^2 = Nq^2 \Rightarrow p^2$ has a factor $N$, since $hcf(p,q) = 1$

$\Rightarrow p$ has a factor $N$ (For if not, then $N$ is the product of the squares of one or more of the prime factors of $p$, and is therefore a perfect square. Contradiction.)

$\Rightarrow p = Nr, r\in\mathbb{N}$

$\Rightarrow p^2 = N^2r^2 = Nq^2$

$\Rightarrow q^2 = Nr^2$

$\Rightarrow q$ has a factor $N$

$\Rightarrow hcf(p,q) \ge N > 1$

Therefore $\sqrt{N}$ cannot be expressed in the form $\frac{p}{q}$, and is therefore irrational.

3. ## Why is this line true?

has a factor (For if not, then is the product of the squares of one or more of the prime factors of , and is therefore a perfect square. Contradiction.)

$\Rightarrow p^2 = Nq^2 \Rightarrow p^2$ has a factor $N$, since $hcf(p,q) = 1$

$\Rightarrow p$ has a factor $N$ (For if not, then $N$ is the product of the squares of one or more of the prime factors of $p$, and is therefore a perfect square. Contradiction.)
Almost, but not quite. For example, $6^2$ has a factor $12$ but $6$ does not have a factor $12.$ You should take into account not only that $N$ is not a perfect square but also that $\frac{p^2}N=q^2$ is a perfect square (in this case $\frac{6^2}{12}=3$ is not a perfect square).

This is how I would write out the proof. Let $N=p_1^{n_1}p_2^{n_2}\cdots p_k^{n_k}$ where the $p_i$ are distinct primes. Then at least one of the $n_i$ must be odd since $N$ is not a perfect square, say $n_1$ is odd.

If $\sqrt N=\frac ab$ where $a,b\in\mathbb Z,$ $b\ne0$ and $\gcd(a,b)=1,$ then

$Nb^2\ =\ a^2$

$\Rightarrow\ N\mid a^2$

$\Rightarrow\ p_1\mid a^2$ (since $p_1\mid N)$

$\Rightarrow\ p_1\mid a$ (since $p_1$ is prime)

$\Rightarrow\ p_1$ divides $a^2$ an even number of times

This is a contradiction because $p_1$ divides $N$ an odd number of times and $p_1\nmid b^2$ and so $p_1$ divides $Nb^2$ an odd number of times.

5. Hmm... now you have me slightly more confused! The proof you have provided, proscientia is quite elegant.

I still think Grandad's proof is valid though. Of course "if N divides $p^2$ then N divides p" is not generally true as your counter example of N=12 and p=6 shows. But we are given some extra constraints here, namely $p^2 = Nq^2$ and $gcd(p,q)=1$.

But GrandDad's proof appears in Mathematical Analyis 2nd ed by Apostol Theorem theorem 1.10. So it must be correct. and my question still remains:

Given $p^2 = Nq^2$ and $gcd(p,q)=1, \Rightarrow N|q^2$, but how does this imply $N|q$?

6. Originally Posted by aukie
But we are given some extra constraints here, namely $p^2 = Nq^2$ and $gcd(p,q)=1$.
Thanks for the reminder! I had completely forgotten about $p$ and $q$ having to be coprime.

Originally Posted by aukie
Given $p^2 = Nq^2$ and $gcd(p,q)=1, \Rightarrow N|q^2$, but how does this imply $N|q$?
I’m afraid I’m totally confused about that as well.

7. Originally Posted by aukie
Hmm... now you have me slightly more confused! The proof you have provided, proscientia is quite elegant.

I still think Grandad's proof is valid though. Of course "if N divides $p^2$ then N divides p" is not generally true as your counter example of N=12 and p=6 shows. But we are given some extra constraints here, namely $p^2 = Nq^2$ and $gcd(p,q)=1$.

But GrandDad's proof appears in Mathematical Analyis 2nd ed by Apostol Theorem theorem 1.10. So it must be correct. and my question still remains:

Given $p^2 = Nq^2$ and $gcd(p,q)=1, \Rightarrow N|q^2$, but how does this imply $N|q$?

Apostol's argument's correct because he's assuming something that hasn't been assumed here, namely: N has no square factors or, as said in number theory, N is square-free, and this is all the difference; otherwise his argument would be wrong, or at least lacking, since he doesn't remind $p^2=Nq^2$ at the moment of argumenting that $N \mid p^2 \Longrightarrow N \mid p$, but he needs not to: if N doesn't divides p then some prime factor of N doesn't divide p (this can be also said in the case 12 divides 6^2 but 12 doesn't divide 6, since 12 has prime factors 2,2,3 and 6 only 2,3...but 12 is not square free), but this factor appears in $p^2=Nq^2$ and this can't be since it appears at the first power in N...!.

Now, $p^2=Nq^2\,\,\,but\,\,\,N \nmid p \Longrightarrow \exists prime\,\,\,r\,\,\,s.t.\,\,r \mid N \wedge r \nmid p$

But this prime factor appears on the right hand in $p^2=Nq^2$ and thus it must appear in the left hand: $r \mid p^2 \Longrightarrow r \mid p$ and we get our contradiction.

Tonio

8. I'm so confused ... you assume that sqrt(N) is a reduced fraction, and so N = p^2/q^2 ... but since (p,q)=1, that implies that N is a rational number, and so we have a contradiction since N is supposed to be an integer greater than 1 ... cuz after that, we are treating N as if it's a rational number, and in that case, we can't really use prime decomposition on it, nor can we use the definition of divisibility ....

Could we do this also:
N is an integer greater than 1 and is not a perfect square.
Assume that sqrt(N) is a rational number say p/q with (p,q)=1 (reduced fraction).
=> N = p^2/q^2 => q^2|p^2 (since N is an integer) => q^2 = 1 (since (p,q)=1) => N = p^2. Contradiction since N is not a perfect square ... so sqrt(N) is not a rational. Since N is positive, sqrt(N) is a real number and since it is not a rational, it must be irrational.

9. Originally Posted by Bingk
I'm so confused ... you assume that sqrt(N) is a reduced fraction, and so N = p^2/q^2 ... but since (p,q)=1, that implies that N is a rational number, and so we have a contradiction since N is supposed to be an integer greater than 1

$\color{red}\mbox{And who said q cannot be} \pm 1?$

tonio

... cuz after that, we are treating N as if it's a rational number, and in that case, we can't really use prime decomposition on it, nor can we use the definition of divisibility ....

Could we do this also:
N is an integer greater than 1 and is not a perfect square.
Assume that sqrt(N) is a rational number say p/q with (p,q)=1 (reduced fraction).
=> N = p^2/q^2 => q^2|p^2 (since N is an integer) => q^2 = 1 (since (p,q)=1) => N = p^2. Contradiction since N is not a perfect square ... so sqrt(N) is not a rational. Since N is positive, sqrt(N) is a real number and since it is not a rational, it must be irrational.
.

10. ## Putting right my error!

Hello everyone -

Since I wrote this line, six months ago,
$\Rightarrow p^2 = Nq^2 \Rightarrow p^2$ has a factor $N$, since $hcf(p,q) = 1$

$\Rightarrow p$ has a factor $N$ (For if not, then $N$ is the product of the squares of one or more of the prime factors of $p$, and is therefore a perfect square. Contradiction.)
I (like many others) have been puzzling over what I meant by it!

I was wrong: the conclusion " $p$ has a factor $N$" is not valid, and I apologise for the confusion this may have caused. I was attempting to modify the well known proof that $\sqrt2$ is irrational, and I was guilty of over-simplification.

What I should have said is that $p^2=Nq^2$ implies that there is a prime factor, $n$ say, of $N$,
for which the quotient $\frac{p^2}{N}$ is a multiple of $n$. (For if not, then $N$ is the product of even powers of one or more of the prime factors of $p$, and is therefore a perfect square. Contradiction.)

The proof then follows similar lines to my original 'proof', using $n$ rather than $N$:

$q^2=\frac{p^2}{N}=rn$, for some integer $r$

$\Rightarrow q^2$ has a prime factor $n$

$\Rightarrow q$ has a prime factor $n$

But $n|N$ and $N|p \Rightarrow n|p\Rightarrow \gcd(p,q)\ge n$, and this contradicts the initial hypothesis that $\gcd(p,q)=1$.

Further comment

I can fully understand where the problems arise as far as the part played by $q$ is concerned, and the confusion caused by the fact that $q$ is co-prime with $p$. The fact is, of course, that $\gcd(p,q)=1$ tends to bring with it a whole lot of contradictions - that's the
whole nature of the problem!

So at the risk of adding further confusion, may I attempt to amplify my argument, and so atone in some measure for my original error?

The statement $p^2 = Nq^2$ is clear enough, and it obviously means that $N$ is a factor of $p^2$. So forget for the time being that $q^2$ is the other factor of $p^2$, and concentrate on $N$. We'll use the fact that $p$ and $q$ are co-prime all in good time.

Since $N$ is not a perfect square, it therefore has, among its prime factors, at least one with an odd power. It is this prime number that I am calling $n$ (and which proscientia called $p_1$).

The fact that $p^2$, with its array of even-powered prime factors, has $N$ as a factor with its odd-powered prime factor $n$ means that when we simplify (by cancelling) the fraction $\frac{p^2}{N}$ there will inevitably be at least one $n$ left uncancelled in the numerator. That's where I get my statement from that $\frac{p^2}{N}$ is a multiple of $n$.

It's only at the end that we need to invoke the condition that $\gcd(p,q)=1$. It's when we try to do so too early that the confusion arises.

I hope that helps to clear things up.

11. No one said that q cannot be $\pm 1$ ... my problem is that someone should have said that q^2 MUST be 1 ...