[Math] Proof: the square root of the product of two distinct primes is irrational

abstract-algebranumber theoryprime numbers

I'd like to prove that the product of the roots of two distinct primes $p_1$ and $p_2$ is irrational.
That is,
$$
\sqrt{p_1 p_2} \notin \mathbb{Q}
$$

Would the following be a valid proof?

Suppose $\sqrt{p_1 p_2} \in \mathbb{Q}$.

Then $\sqrt{p_1 p_2} = \frac{a}{b}$ for $a,b \in \mathbb{Z}$ such that $\gcd(a,b) = 1$.
$$
p_1 p_2 = \frac{a^2}{b^2} \implies p_1p_2b^2 = a^2 \implies p_1, p_2 \mid a^2 \implies p_1, p_2 \mid a.
$$
So $a = p_1 p_2 n$, for nonzero $n \in \mathbb{Z}$.

Let the unique prime factorization of $a = p_1 p_2 (p_{i_1} \cdots p_{i_n})$ and of $b=p_{j_1} \cdots p_{j_m}$.

Then
$$
p_1p_2 = \frac{a^2}{b^2} = \frac{p_1^2 p_2^2 (p_{i_1}^2 \cdots p_{i_n}^2)}{p_{j_1}^2 \cdots p_{j_m}^2} = p_1 p_2 \underbrace{\left( \frac{p_1 p_2 (p_{i_1}^2 \cdots p_{i_n}^2)}{p_{j_1}^2 \cdots p_{j_m}^2} \right)}_{=1}
$$
But this implies that $p_1 = p_{j_t}$ and $p_2 = p_{j_s}$ for $t, s \in [1,m]$. That is $p_1, p_2 \mid b$.

Therefore, $p_1$ and $p_2$ are divisors of both $a$ and $b$, which contradicts $\gcd(a,b)=1$.

Hence, $\sqrt{p_1 p_2} \notin \mathbb{Q}$.

P.S. Sorry for the double subscripts.

Best Answer

Once you get at $p_1 p_2 b^2 = a^2$ I'd just point out that, say, $p_1$ appears an odd number times on the left and an even number of times on the right.