What rational numbers have rational square roots?

Solution 1:

A nice generalization of the fundamental theorem of arithmetic is that every rational number is uniquely represented as a product of primes raised to integer powers. For example:

$$\frac{4}{9} = 2^{2}*3^{-2}$$

This is the natural generalization of factoring integers to rational numbers. Positive powers are part of the numerator, negative powers part of the denominator (since $a^{-b} = \frac{1}{a^b}$).

When you take the $n$th root, you divide each power by $n$:

$$\sqrt[n]{2^{p_2}*3^{p_3}*5^{p_5}...} = 2^{p_2/n}*3^{p_3/n}*5^{p_5/n}...$$

For example:

$$\sqrt{\frac{4}{9}} = 2^{2/2}*3^{-2/2} = \frac{2}{3}$$

In order for the powers to continue being integers when we divide (and thus the result a rational number), they must be multiples of $n$. In the case where $n$ is $2$, that means the numerator and denominator, in their reduced form, are squares. (And for $n=3$, cubes, and so on...)

In your example, when you multiply the numerator and denominator by the same number, they continue to be the same rational number, just represented differently.

$$\frac{2*4}{2*9} = 2^{2+1-1}*3^{-2} = 2^{2}*3^{-2}$$

You correctly recognize the important of factoring, though you don't really want to use it in your answer. But the most natural way to test if the fraction produced by dividing $a$ by $b$ has a rational $n$th root, is to factor $a/b$ and look at the powers. Or, equivalently, reduce the fraction and determine if the numerator and denominator are integers raised to the power of $n$.

Solution 2:

We give a fairly formal statement and proof of the result described in the post.

Theorem: Let $a$ and $b$ be integers, with $b\ne 0$. Suppose that $\frac{a}{b}$ has a rational square root. Then there exists an integer $e$, and integers $m$ and $n$, such that $a=em^2$ and $b=en^2$,

Proof: It is enough to prove the result for positive $b$. For if $b$ is negative and $\frac{a}{b}$ has a square root, then we must have $a\le 0$. Thus $\frac{a}{b}=\frac{|a|}{|b|}$. If we know that there are integers $e$, $m$, $n$ such that $|a|=em^2$ and $|b|=en^2$, then $a=(-e)m^2$ and $b=(-e)n^2$.

So suppose that $b\gt 0$, and $a\ge 0$. Let $d$ be the greatest common divisor of $a$ and $b$. Then $a=da^\ast$, and $b=db^\ast$, for some relatively prime $a^\ast$ and $b^\ast$.

It will be sufficient to prove that each of $a^\ast$ and $b^\ast$ is a perfect square.

Since $\frac{a^\ast}{b^\ast}$ is a square, there exist relatively prime integers $m$ and $n$ such that $\frac{a^\ast}{b^\ast}=\left(\frac{m}{n}\right)^2$.

With some algebra we reach $$a^\ast n^2=b^\ast m^2.$$

By Euclid's Lemma, since $b^\ast$ divides the product on the left, and is relatively prime to $a^\ast$, we have that $b^\ast$ divides $n^2$. Also, because $n^2$ divides the expression on the right, and $n^2$ is relatively prime to $m^2$, we have $n^2$ divides $b^\ast$. Since $b^\ast$ is positive, we conclude that $b^\ast=n^2$. Now it is easy to show that $a^\ast=m^2$.

A similar theorem can be stated and proved for $k$-th roots.