1

I read the following proof in a book while I seeing the proof that is irrational if $n$ is not a perfect square number. The proof is as follows-

Let, if possible, there exists rational number $\frac pq$=$\sqrt n$ ($p $ and $q$ are co-prime). Squaring both sides $p^2=n*q^2$.

From above we get $n$ is a factor of $p^2$. Now, it is written that we can deduce $n$ is a factor of $p$.

Similarly it is also proved that n is a factor of q. From that we get that $p$ and $q$ both have some common factor $n$ which contradicts the hypothesis that $\frac pq$ is co-prime. So our assumption was wrong.

Now, my question is, how can it be said that if $n$ is a factor of $p^2$ it will also be a factor of $p$? Take an example- $72$ is a factor of $12^2=144$ but it is not a factor of $12$.

Where am I wrong? Please explain.

Soham
  • 9,990
  • The proof has to be adjusted. If you look at a prime factor with odd exponent in the factorization of $n$ (such a prime factor must exist because $n$ is not a perfect square), you get the desired contradiction. – Peter Aug 15 '15 at 12:19
  • It should be assumed that $p/q$ is reduced, so also $p^2/q^2$ is reduced. Then the proof goes as usual see here. – Dietrich Burde Aug 15 '15 at 12:21

3 Answers3

1

The correct proof would be as follows :

Assume , $n>1$ is not a perfect square. Then, there exists a prime factor $s$, for which the exponent in the prime factorization is odd. Now, assume

$p^2=nq^2$ with $(p,q)=1$. Then it follows that $s$ divides $p$. But the exponent of $s$ in the left number is even, the exponent of $s$ in the right number is odd. So, the numbers cannot coincide.

Peter
  • 84,454
  • 1
    Your method works if you have unique prime factorization. However, the theorem can be generalized to any ring in which there is $\gcd$ and it is not necessary to have unique factorization, as my answer shows. – user21820 Aug 15 '15 at 12:26
  • 1
    Yup. It's just that I prefer showing proofs that use the bare minimum of assumptions as it reveals most about the underlying structures. – user21820 Aug 15 '15 at 12:31
  • 1
    Ockham would be happy about that :) – Peter Aug 15 '15 at 12:33
0

The proof is wrong and you have given a correct counter-example.

The theorem, however, is correct. One way to prove it (besides the countless existing ones you see on this same question in Math SE) is as follows:

$p^2 = \gcd(p^2,nq^2) \mid \gcd(p^2,n) \gcd(p^2,q^2) \mid \gcd(p^2,n) \gcd(p,q)^2 = \gcd(p^2,n)$

Thus $p^2 \mid n$, which since $p^2 = n q^2$ implies that $q^2 = 1$ and hence $n = p^2$.

user21820
  • 57,693
  • 9
  • 98
  • 256
0

An elementary proof (only based on the property that a non-empty set of natural numbers has a smallest element).

By contraposition: let $x = \sqrt{n}$ and let $y$ be its decimal part: $y=x-\lfloor x\rfloor$. Suppose $x$ is rational; all we must show is $\;y = 0$.

$\{\,k\in\mathbf N*\mid qx\in \mathbf N\,\}\neq\varnothing\;$ since it contains at least the denominator of $x$. Let $q$ the smallest such number. Then $\;q' = qy\;$ is an integer too. On another hand, $$ q'x = q( x-\lfloor x\rfloor)x = qx^2 - \lfloor x\rfloor qx=qn-\lfloor x\rfloor q, $$ which shows $q'x$ is an integer. However $q$ is the smallest positive integer with this property, and $\,0 \le q' < q\,$ since $0\le y<1\,$; thus $q' = 0$, whence $y = 0$.

Bernard
  • 175,478