Irrationality of number using FTA

In this post showing that $\sqrt{12}$ is irrational, Prof. Lubin gives an answer which I didn't fully understand. Here is Prof. Lubin's answer :

If you’re willing to use the Fundamental Theorem of Arithmetic, which says that the decomposition of any nonzero integer as a product of primes is unique, then this proof, and all others for irrationality of $r$-th roots, drops right out.

Write $m^2=12n^2$. This contradicts FTA because there are evenly many $3$’s on the left but oddly many on the right.

The specific part of the proof which I'm not sure I understand correctly is where Prof. Lubin says there are evenly many $3$'s on the left but oddly many on the right. Is this because $m^2$ and $n^2$ are perfect squares? Also, since $12 = 2^23$ does this means there are evenly many $2$'s on both sides (which is why we are choosing $3$ instead of $2$ to prove that $\sqrt{12} \notin \mathbb Q$)?

Just to be sure, if we want to prove that $\sqrt{18}$ and $\sqrt{7}$ are irrational using the FTA we say that :

• For $\sqrt{18} : $$m^2 = 18n^2 so there are evenly many 2's on the left but oddly many on the right which contradicts the FTA. • For \sqrt{7} :$$m^2 = 7n^2$ so there are evenly many $7$'s on the left but oddly many on the right which contradicts the FTA.

Is that correct?

• Those all seem basically correct to me, yes. – Steven Stadnicki Jun 6 '17 at 21:11
• Yes you're exactly correct. What the author is saying is that writing $m$ and $n$ in terms of their prime decompositions gives: $m = p_1^{a_1}...p_j^{a_j}$ and $n = q_1^{b_1}...q_i^{b_i}$ for primes $p_k, q_k$ and integers $a_k, b_k$. Then $m^2 = 12n^2$ becomes $p_1^{2a_1}...p_j^{2a_j} = 3 \cdot 2^2 q_1^{2b_1}...q_i^{2b_i}$ and these must be the SAME representations in terms of primes. But then the power of 3 on the RHS is odd, even if some $q_k=3$ but the power of 3 on the LHS is even. – SEWillB Jun 6 '17 at 21:30
• @SEWillB This is exactly the answer I was looking for. Thanks! If you want you can write your comment as an official answer so I can accept it and close the topic. – user347616 Jun 6 '17 at 21:40

Just for completeness I'll add my comment as an answer. You're exactly correct yourself. What the author is saying is that writing $m$ and $n$ in terms of their prime decompositions gives:
$m = p_1^{a_1}...p_j^{a_j}$ and
$n = q_1^{b_1}...q_i^{b_i}$
for primes $p_k, q_k$ and positive integers $a_k, b_k$.
Then $m^2 = 12n^2$ becomes $p_1^{2a_1}...p_j^{2a_j} = 3 \cdot 2^2 q_1^{2b_1}...q_i^{2b_i}$
and these must be the SAME representations in terms of primes. But then the power of 3 on the RHS is odd, even if some $q_k=3$, but the power of 3 on the LHS is even. Hence we have reached a contradiction to the fact that these must be the same representations in terms of primes. So we cannot have $m^2 = 12n^2$ and hence cannot have $\frac{m}{n} = \sqrt{12}$.

$\sqrt{12}=2\sqrt{3}$ hence $\sqrt{12}\not\in\mathbb{Q}$ is equivalent to $\sqrt{3}\not\in\mathbb{Q}$.

If $\sqrt{3}$ were a rational number, $\sqrt{3}=\frac{p}{q}$, then $$p^2 = 3 q^2$$ would have some solution in $\mathbb{Z}^+\times\mathbb{Z}^+$. That is impossible. By defining $$\nu_3(m) = \max\{k\in\mathbb{N}: 3^k \mid m\}$$ for any $m\in\mathbb{Z}^+$ we have that $\nu_3(p^2)$ is always even while $\nu_3(3q^2)=1+\nu_3(q^2)$ is always odd, hence $p^2=3q^2$ cannot have any solution in $\mathbb{Z}^+\times\mathbb{Z}^+$ and $\sqrt{3},\sqrt{12}\not\in\mathbb{Q}$.

Straightforward consequence: if $n\in\mathbb{Z}^+$ and for some prime $p$ we have that $\nu_p(n)$ is odd, then $\sqrt{n}\not\in\mathbb{Q}$. Straightforward extension: if $n\in\mathbb{Z}^+$, $\sqrt{n}$ is a rational number iff $n=m^2$ for some $m\in\mathbb{Z}^+$.

I like to emphasize the part about GCD. Suppose there exist integers $u,v$ such that $$u^2 - 12 v^2 = 0.$$ Now, find $$g = \gcd(u,v)$$ and define $$x = \frac{u}{g}, \; \; \; y = \frac{v}{g}.$$ It is a lemma (prove!) that $$\gcd(x,y) = 1.$$ However, we still have $$x^2 - 12 y^2 = 0.$$

So far, we have a solution to $x^2 - 12 y^2 = 0$ in coprime integers $x,y.$

On the other hand, if $$x^2 - 12 y^2 \equiv 0 \pmod 9,$$ we can quickly prove that $3 |x,$ then in turn $3 | y.$

This gives us a contradiction, as both $x,y$ must be divisible by $3,$ so they cannot be coprime.