Let $n$ be a positive integer Prove that if $\sqrt {n}$ is a rational number then it is actually an integer. Actually, it is obvious. But, I could not prove. Can you hint?
 A: Assume $\sqrt{n} \in \mathbb{Q} $ where $ n \in \mathbb{Z} $.
This means we can write $\sqrt{n}$ as a fraction. That is,
$$\sqrt{n}= \frac{a}{b}$$
where $\space a,b \in \mathbb{Z}$. From this, we can square both sides and rearrange to obtain the following:
$$n = \bigl(\frac{a}{b}\bigr)^{2} = \frac{a^{2}}{b^{2}} \implies b^{2}n = a^{2} $$
This is the definition of divisibility. That is:
$$ b^{2} | a^{2} $$
By the fundamental theorem of arithmetic, we must have the following:
$$ b | a$$
See this post for more information. This means that there exist an integer, say $m$, such that $ bm = a$ which gives us:
$$ \frac{a}{b} = \frac{bm}{b} = m \in \mathbb{Z} $$
Thus, $\sqrt{n} = \frac{a}{b} = m \in \mathbb{Z} \space\space \square $.
A: Here is a generalisation, you can take $k = 2$. Assume that $\sqrt[k]n = p/q$ where $p, q$ are nonzero coprime integers. If $nq^k = p^k$, $p^k$ must divide $n$ (that's a consequence of fundamental theorem of arithmetic). So $n = n' p^k$, $n'$ is again an integer and $n' q^k = 1$, so $n' = 1$ and $\sqrt[k] n = p$.
A: Set $n=p_1^{e_1}\cdots p_n^{e_n}$. If each $e_j$ is even then the claim holds. Otherwise there is at lease one odd $e_j$. Suppose WLOG that the odd $e_j's$ are $e_1,\ldots,e_k,\ k\leq n$. Then $\sqrt n=m\sqrt{p_1\cdots p_k}$ for some  $m\in\mathbb{N}$ and it is enough to show that $\sqrt{p_1\cdots p_k}$ is irrational; if $\sqrt{p_1\cdots p_k}=\frac{a}{b}$ for some $a,b\in\mathbb{N}$, then $p_1\cdots p_n b^2=a^2$, which is a contradiction (with the fundamental theorem of arithmetic) since the power of $p_1$ is odd in the LHS but even in the RHS.
A: If $A\subseteq B$ where $B$ is a finite set, then $A$ is a finite set and $|A| \le |B|$.
