Irrationality of square roots of nonsquare integers If $n$ is a positive integer and is not a perfect square, how do you prove that $n^{1/2}$ is irrational? 
 A: $\,n = (a/b)^2\Rightarrow\, \color{#0a0}{a^2} = \color{#c00}nb^2.\, $ All primes occur to $\rm\color{#0a0}{even}$ power in the prime factorization of $\,\color{#0a0}{a^2},\,$ but, since $\,n\,$ is not a square, some prime occurs to $\color{#c00}{\rm odd}$ power in $\,\color{#c00}n,\,$ so odd power in $\,\color{#c00}nb^2\,\Rightarrow\!\Leftarrow$
Remark $ $ This argument using $\rm\color{#0a0}{par}\color{#c00}{ity}$ of powers of primes depends crucially on FTA = existence and uniqueness of prime factorizations, so it is essential to mention the use of this strong property when presenting the proof. We can also give proofs using closely related properties, e.g. the Rational Root Test (e.g. here) or Euclid's Lemma (e.g. here), or Bezout's gcd identity. Below is a simple proof employing Bezout  that I discovered as a teenager (motivated by Dedekind).
Theorem $\quad \rm r = \sqrt{n}\;\;$ is integral if rational, $\:$ for $\:\rm n\in\mathbb{N}$
Proof $\ \ $ Note that $\rm\,\ \color{#0a0}{r = a/b},\ \ \gcd(a,b) = 1\ \Rightarrow\ \color{#C00}{ad\!-\!bc \,=\, \bf 1}\;$  for some $\:\rm c,d \in \mathbb{Z}\ $ by Bezout.
$\rm\color{#C00}{That\,}$ and $\rm\: r^2\! = \color{orange}{\bf n}\:\Rightarrow\ \color{#0a0}{0\, =\, (a\!-\!br)}\, (c\!+\!dr) \ =\ ac\!-\!bd\color{orange}{\bf n} \:+\: \color{#c00}{\bf 1}\cdot r \ \Rightarrow\ r \in \mathbb{Z}\ \ \ $ QED
The proof easily generalizes to roots of monic quadratic polynomials (and to higher degree).
A: HINT:
Assuming the opposite, you have $\big(\frac ab\big)^2=\frac{a^2}{b^2}=n$ integer, so $b^2|a^2$ and $\frac ab$ not integer, so $b \nmid a$.
If $b \nmid a$, there is a prime factor $p$ of $a$ such that $p|a$ but $p \nmid b$. So $p|a^2$ and $p \nmid b^2$, a contradiction.
A: Assume that $n=(a/b)^2$ for some positive integers $a$ and $b$. Let $p_1\lt p_2\lt\dots\lt p_k$ be all the prime divisors of $nab$. The Fundamental Theorem of Arithmetic tells you that, if $x_1,\dots,x_k$ and $y_1,\dots,y_k$ are nonnegative integers, then
$$p_1^{x_1}p_2^{x_2}\cdots p_k^{x_k}=p_1^{y_1}p_2^{y_2}\cdots p_k^{y_k}\ \Rightarrow x_1=y_1,x_2=y_2,\dots,x_k=y_k.$$
Write $$n=p_1^{x_1}p_2^{x_2}\cdots p_k^{x_k},\ a=p_1^{\alpha_1}p_2^{\alpha_2}\cdots p_k^{\alpha_k},\ b=p_1^{\beta_1}p_2^{\beta_2}\cdots p_k^{\beta_k}$$
and use $n=(a/b)^2$ and the Fundamental Theorem to show that the $x_i$ are even, thus showing that $n$ is a perfect square.
A: Since $n$ is not a perfect square, there exists at least one prime number $p$ such that
$$n=p^\alpha q$$
where $q\in\mathbb N$ is coprime to $p$ and $\alpha\ge 1$ is odd.
Now, suppose that $n$ is a rational number, namely,
$$n^{1/2}=\frac{b}{a}$$
where $a,b$ are natural numbers and they are coprime to each other.
Then, we have
$$n=\frac{b^2}{a^2}\Rightarrow a^2n=b^2.$$
By the fundamental theorem of arithmetic, this implies that the number of $p$ in the left hand side is odd, and that the number of $p$ in the right hand side is even. This is a contradiction.
Hence, $n^{1/2}$ is an irrational number.
A: If $n$ is not a perfect square, then there is a prime $p$ dividing $n$ which occurs in the expansion of $n$ an odd number of times. From the equation $\sqrt n=a/b$ you get $b^2n=a^2$, in which that prime occurs evenly many times on the right, oddly many times on the left. Contradiction.
A: As shown in this answer, any algebraic integer that is rational is an integer. Since all roots of $x^2-n=0$ are algebraic integers (since the lead coefficient of $x^2-n$ is $1$), if they are not integers, they are not rational. Thus, since $n$ is not a perfect square, $n$ is irrational.
