I am working on proving that $\sqrt{5}$ is irrational. I think I have the proof down, there is just one part I am stuck on.
How do I prove that $x^2$ is divisible by 5 then $x$ is also divisible by $5$?
Right now I have $5y^2 = x^2$
I am doing a proof by contradiction, where I show that both x and y are divisible by 5. where $\sqrt{5} = x/y$
We can quote Euclid's Lemma. If the prime $p$ divides the product $ab$, then $p$ divides $a$ or $p$ divides $b$ (or $p$ divides both).
At a more elementary level, we can show by $4$ separate computations that if $x$ has remainder $1,2,3,4$ on division by $5$, then $x^2$ is not divisible by $5$.
For example, if $x$ has remainder $2$ on division by $5$, then $x=5k+2$ for some integer $k$. Then $x^2=25k^2+10k+4=5(5k^2+2k)+4$, so $x^2$ has remainder $4$ on division by $5$, and in particular is not divisible by $5$.