Here is an elementary proof (adapted from Hardy's A Course of Pure Mathematics) that for any integer $k$, $\sqrt{k}$ is either irrational or integral.
- Suppose $\sqrt{k}$ is rational, $\sqrt{k} = \frac{m}{n}$, $m$ and $n$ have no common factor.
- Then $m^2=kn^2$
- Every factor of $m^2$ must divide $kn^2$
- As $m$ and $n$ have no common factor, every factor of $m^2$ must divide $k$
- Hence $k = \lambda m^2,$ $\lambda \in \mathbb{Z}$
- Hence $1 = \lambda n^2 \rightarrow \lambda = n = 1$
- Hence $k=m^2$
So $\sqrt{k}$ is either irrational or integral.
Q.E.D.
My question regards one step in this proof, present here and also in Hardy's proof - step 4. We conclude that, because $m$ and $n$ have no common factors, all of $m^2$'s factors must be factors of $k$ - because none of them could be factors of $n^2$. We've subtly used the 'fact' here that:
The relative primality of $m$ and $n$ implies the relative primality of $m^2$ and $n^2$
And this is where I am concerned, because I can't quite pinpoint why this must be true. Further, this statement we have assumed as 'obvious' is as strong as the whole proof. Indeed, a weak form of the the contrapositive is:
If $m^2 = kn^2, k\in\mathbb{N}$ then $m$ and $n$ have a common factor.
And straight from this, if $k$ is not a perfect square then $\sqrt{k}$ is irrational.
This is my problem - I cannot see why the first statement highlighted above must be true. Of course, it is obvious from the fundamental theorem of arithmetic, but the whole proof is obvious from the fundamental theorem of arithmetic!
How could you prove the first highlighted statement above without FTOA?
Thank you very much :)