Prove that $\sqrt 5$ is irrational

It is, but I think you need to be a little bit more careful when explaining why $5$ divides $p^2$ implies $5$ divides $p$. If $4$ divides $p^2$ does $4$ necessarily divide $p$?


Yes, the proof is correct. Using this method you can show that $\sqrt{p}$ for any prime $p$ is irrational. During the proof you essentially use the fact that when $p|u^2$ where $p$ is a prime, then it implies that $p|u$. This is true for primes, but is not true in general. You can prove this as below Let $n|u^2,\ \gcd(n,u)=d$. Then, let $n=rd,\ u=sd $. So, $$u^2=kn \Rightarrow s^2d^2=k r d\Rightarrow s^2d=kr$$ if we have $n\not{|}\ u$, since $\gcd(s,r)=1$, we have $$r|d$$ Then, with $d>1$, $n\not{|}\ u$, but $\ n|u^2$. If $n$ is prime, then $d=1\Rightarrow r=1$ unless $\ n|u$.