I have a proof for it. I just want to make sure it's correct.
Assume, for the sake of contradiction, that $\sqrt{2}$ is rational.
Then, $\sqrt{2} = \frac{a}{b}$ (1) , where a and b are integers and gcd(a,b)=1.
Note that $\sqrt{2}$ is non-integer. Thus, b does not divide a
Squaring both sides of equation (1),
2 = $\frac{a^2}{b^2}$. This means that $b^2|a^2$
Let p be a prime where p|$a^2$. Then $p|a$
Now assume that p| $b^2$. Then p|b. However, this is a contradiction because $gcd(a,b)= 1$
Therefore, $gcd(a^2, b^2)=1$. However, this contradicts the earlier conclusion that $b^2|a^2$
Hence, $\sqrt{2}$ cannot be rational.
Therefore, $\sqrt{2}$ irrational.
Is there something wrong with this proof?