Proof of the irrationality of $\sqrt n$, where $n$ is square free I am trying to review some old algebra, and in particular I wanna show that $\sqrt2$ is irrational
Since integers are the only integral elements of $\mathbb Q$ over $\mathbb Z$, assume $r=\sqrt 2$ is rational, then $ r^2-2=0$ is a polynomial in wich $r$ is a root, so $r$ must be integer, but since $1<r<2$, this is a contradiction.
Am I doing this right? Can I from there generalize it?
 A: Sure you can try. Let $n$ be a square-free natural number, then you show $\sqrt{n}$ is irrational. You can use theory of polynomial to do this. To this end, if $x = \sqrt{n} \to x^2-n = 0$. Then if $\dfrac{p}{q}$ is a rational root,then $p \mid n, q \mid 1 \to q = \pm 1$. Thus any rational root of this equation must be of the form $x = p, p \mid n \to n = p^2$, contradiction to $n$ being square-free. Thus there is no rational root, it means $\sqrt{n}$ is irrational.
A: You seem to have the right idea in assuming a contradiction, that is, $r^{2}=2$ is rational where $r \in \mathbb{Q}$ . But then you could write it as $r=\frac{m}{n}$ for some integers $m,n \in \mathbb{Z}$. Then assume that $m$ and $n$ have no common factor, and if they did we could divide it out. 
So we have $2 = r^{2} = \frac{m^{2}}{n^{2}}$. Therefore, $m^{2}=2n^{2}$, so $m^{2}$ is even. We claim that $m$ is even; if not $m$ is odd.
Let $m = 2k+1$ for some $k \in \mathbb{Z}$. Then $$m^{2} = (2k+1)^{2}$$ $$m^{2}= (2k)^{2} + 2(2k) (1) + 1$$ $$m^{2}=2k(2k+1)+1$$.  
So $m^{2}$ is odd, and it is a contradiction. Therefore, $m$ is even, so $m=2p$ for some $p \in \mathbb{Z}$.
Similarly try to show that $n^{2}$ is even, which implies that $n$ is even.
Then $n=2q$ for some $q \in \mathbb{Z}$. So $m$ and $n$ have a common factor (can you guess what that common factor is?), which is a contradiction. 
Therefore, there is no rational number $r$ such that $r^{2}=2$. In other words, $\sqrt{2}$ is irrational. 
A: A generalized proof that the root of every positive integer $N$ is either an integer or an irrational number:
Suppose that $N=\dfrac{a}{b}$ with $(a,b)=1$
$$N^2=\dfrac{a^2}{b^2}$$
$$Nb^2=a^2$$
$$N | a^2 \to a^2=cN$$
where $c$ is a positive integer.
$$Nb^2=Nc$$
divide both sides by $N$:
$$b^2=c$$
and thus:
$$(a^2,b^2)=c$$
$c=1$ and thus $a=N$ and $b=1$
