Answer
See explanation
Work Step by Step
**Proof:**
Suppose, for the sake of contradiction, that \(n\) is an integer that is not a perfect square but that \(\sqrt{n}\) is rational. Then there exist positive integers \(m\) and \(k\) in lowest terms (i.e. \(\gcd(m,k)=1\)) such that
\[
\sqrt{n}=\frac{m}{k}.
\]
Squaring both sides gives
\[
n=\frac{m^2}{k^2} \quad \Longrightarrow \quad n k^2 = m^2.
\]
Now write the prime factorizations:
- Let
\[
n = p_1^{a_1} \, p_2^{a_2} \, \cdots \, p_r^{a_r},
\]
where the exponents \(a_i\) are nonnegative integers. Since \(n\) is not a perfect square, at least one exponent \(a_j\) is odd.
- Since \(m^2\) is a perfect square, every prime in its factorization appears with an even exponent.
- Similarly, \(k^2\) is a perfect square, so every prime in its factorization appears with an even exponent.
Thus, in the product \(n k^2\), each prime \(p_i\) appears with an exponent \(a_i + 2b_i\) (where \(2b_i\) comes from \(k^2\)). For the particular prime \(p_j\) for which \(a_j\) is odd, the exponent \(a_j + 2b_j\) is odd because the sum of an odd number and an even number is odd.
But \(n k^2 = m^2\) is a perfect square, so every prime in its factorization must have an even exponent. This contradiction shows that our assumption that \(\sqrt{n}\) is rational must be false.
Thus, if \(n\) is any integer that is not a perfect square, then \(\sqrt{n}\) is irrational.