Proof: Let n be an integer. If sqrt n is not an integer, then sqrt n is irrational So I know there have been some answers to this question or similar questions. However, I am looking for the proof that includes taking fractional parts? My maths teacher mentioned it and briefly went through it but too quickly for me to follow. 

I do know that it is a proof by contradiction that starts out by assuming sqrt n does not = Z but sqrt n=a/b  (in it's lowest terms) a,b are elements of Z. 
Something about:
 0 is less than c/b = d/a is less than 1
 0 is less than c is less than 1
0 is less than d is less than a
 so a/b=d/c contradicts sqrt n=a/b in it's lowest terms thus the assumption is false.
However, how you get to this part from the assumption is what I don't understand.
Thanks!
 A: This is a proof by Cauchy, as far as I know. I've already posted an explanation, but I can't find it, so I'll rewrite it.
Let $x=\sqrt n$ and $y=x-\lfloor x\rfloor$ be its fractional part. We have to prove that, if $x$ is rational, then $y=0$.
For this, denote $q$ the least positive integer such that $qx$  be an integer. Note that $\; q'=qy$ is an integer since $\;qy=qx -q\lfloor x\rfloor$.
Claim : $q'x$ is an integer.
Indeed $\;q'x= q(x-\lfloor x\rfloor)x=qx^2-qx\lfloor x\rfloor=qn-qx\lfloor x\rfloor$.
However, since $0\le y<1$, we have $0\le q'=qy< q$. As $q$ is the smallest integer such that $qx$ be  an integer, this implies $qy=0$, i.e. $y=0$.
A: If $$\sqrt{n}=\frac{a}{b}$$ the $$b^2n=a^2$$
If $p$ is a prime that divides $n$ to power $k$, that is $n=p^k...$ then $p$ divides $a$, say to power $l$. We assume that $a$ and $b$ are relatively prime and thus we have 
$$k=2l$$. In other words all primes dividing $n$ do so to an even power and thus $n$ is a perfect square. 
A: Let $\sqrt{n}$ be not irrrational, so it can be expressed as $\sqrt{n}=\frac{p}{q}$ where $p,q\in \Bbb{Z}$, $q>0$ and $\gcd(p,q)=1$ i.e. they have no common factor.
If $q=1$, we are done.
If $q\neq 1, \sqrt{n}=\frac{p}{q} \implies n=\frac{p^2}{q^2}$ which is not an integer as it has denominator not equal to $1$.
