What rational numbers have rational square roots? All rational numbers have the fraction form $$\frac a b,$$ where a and b are integers($b\neq0$).
My question is: for what $a$ and $b$ does the fraction have rational square root? The simple answer would be when both are perfect squares, but if two perfect squares are multiplied by a common integer $n$, the result may not be two perfect squares. Like:$$\frac49 \to \frac 8 {18}$$
And intuitively, without factoring, $a=8$ and $b=18$ must qualify by some standard to have a rational square root.
Once this is solved, can this be extended to any degree of roots? Like for what $a$ and $b$ does the fraction have rational $n$th root?

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. 
