Wednesday, June 10, 2026

Rational roots of integers are integers

is this true: given an integer n, sqrt(n) is rational only if sqrt(n) is an integer

Yes—assuming we mean the real square root, this is true.

If \(n\) is an integer and \(\sqrt n\) is rational, write

\[ \sqrt n=\frac{a}{b} \]

where \(a,b\) are integers with no common factor and (b>0). Squaring gives

\[ n=\frac{a^2}{b^2} \]

so

\[ a^2=nb^2. \]

That means \(b^2\) divides \(a^2\). But since \(a\) and \(b\) have no common factor, \(a^2\) and \(b^2\) also have no common factor. Therefore \(b^2=1\), so \(b=1\).

So \(\sqrt n=a\), an integer.

Therefore:

\[ \boxed{\sqrt n \in \mathbb{Q} \implies \sqrt n \in \mathbb{Z}} \]

for integer \(n\ge 0\). Negative \(n\) has no real square root, so it is not a counterexample in the real numbers.