# How to understand Apostol's proof of the irrationality of $\sqrt{n}$ if $n$ is not a perfect square?

Recently I am reading the textbook of Apostol, Mathematical Analysis, Second Edition. On page 7, there is a theorem 1.10: If $n$ is a positive integer with is not a perfect square, then $\sqrt{n}$ is irrational. Then Apostol gave a proof. But I can not understand the line 4 of its proof: " However, if $a^2$ is a multiple of $n,$ $a$ itself must be a multiple of $n,$ since $n$ has no square factors $>1.$" I can not figure out the details here. Actually, I re-express these lines as follows:

Proposition: Assume $n$ and $a$ are positive integers. If $n$ is not a perfect square and contains no square factor $>1,$ then we have: $n\mid a$, provided $n\mid a^2.$

I have tried to prove this proposition, but failed. Can anyone give me some clues?

• Use unique prime factorization. – Christopher A. Wong Feb 20 '14 at 7:52

By the Fundamental Theorem of Arithmetic every integer is the product of a unique set of primes. That is $n = q_1q_2..q_p$. But since $n$ contains no square factors each prime factor is distinct.
Now $n \ | \ a^2 \implies q_j \ | \ a^2$. By Euclid's Lemma $q_j \ | \ a$. And this is true for all $j = 1, 2, .. p$. Again, since the $q_j$'s are distinct primes $q_1q_2..q_p \ | \ a \implies n \ | \ a$.
• Ishfaaq, why "since the $q_j$'s are distince primes $q_1q_2... q_p\mid a\implies n\mid a$? Apostol's book do not give the corresponding result! – nuage Feb 20 '14 at 8:03
• @azhi: Right.. We have proven that each $q_i$ divides $a$. That is each $q_i$ is an element of the prime factorisation of $a$. Now if two of these are equal then the product need not divide $a$. Say $q_l = q_m = q$ and that $q_l$ and $q_m$ divide $a$. This only says that $q$ divides $a$ and does not mean $q^2 = q_lq_m$ is a factor of $A$. But if each of the $q_i$'s are distinct and each of them divide $a$ then the product should also divide $a$ since $q_i$ divides $a$ implies that $q_i$ is part of the prime factorisation of $a$. Hope this is clear.. – Ishfaaq Feb 20 '14 at 8:09
One example that, $q$ being a prime, if $q | a$, $q^2$ does not necessarily divides $a$ is seen by taking $n=20$, $c=5$, and $a=10$. We can write $a^2 = nc$, then $n | a^2$. Note that $n$ has a square factor $2$ [$n=2^2(5)$], and by Euclid's Lemma $2 | a$. However, $2^2$ isn't a factor of $a$, so $n$ does not divide $a$.