When trying to prove that a particular root (say $\sqrt{2}$ or $\sqrt{10}$) cannot be rational, I always see a particular indirect proof that goes something like this:
Suppose $\sqrt{x}$ were rational; then, there would be two integers $a$ and $b$ such that $a/b$ was $\sqrt{x}$. We can also assume that $a$ and $b$ have no common factors, because we can simplify $a/b$ as much as we want before we begin.
Then, $(a/b)^2 = x$, or $a^2/b^2=x$, or $a^2 = x * b^2$. But, if $a * a$ is a multiple of $x$ then $a$ must also be a multiple of $x$, so we can rewrite $a$ as $a = cx$ and substitute:
$(c * x)^2 = x * b^2$, or $x^2 * c^2 = x * b^2$. Divide by $x$ and we get that $b^2 = x * c^2$.
But we've now shown that both $a$ and $b$ have a factor of x, contradicting our original assumption; this means that $\sqrt{x}$ cannot be rational.
I see why this proof works, what I don't see is why you can't plug in a number with an actual rational root, like 16, and not form the same proof that $\sqrt{16}$ cannot be rational.
Best Answer
The statement $x|a^2\Rightarrow x|a$ is not generally true (Counter-example : $8|4^2$ but we have not $8|4$).
The proof works for $x$ prime, because, then, this statement is true by Euclid's lemma.