Verification of my proof for irrationality of $\sqrt2$ Here's my proof:

Let us suppose for sake of contradiction, $\sqrt2$ is rational. Then, we can write
$$\sqrt2=\frac{a}{b}$$
for non-zero coprime integers $a$ and $b$.
Squaring our equation,
$$2=\frac{a^2}{b^2}$$
Here, LHS is an integer, but since $a^2$ and $b^2$ are coprime, RHS is not an integer. This is a contradiction, and so our original assumption was wrong. Therefore, $\sqrt2$ is irrational.

Is this valid? Thanks in advance.
 A: *

*You need to point out that $\sqrt 2 =\frac ab$ where $a,b$ are relatively prime that $b \ne 1$.

That's easy enough.  You just have to show there is no integer so that $n^2 = 2$ and there obviously aren't as $|n| \ge 2 \implies n^2 \ge 4$ and $|n| < 2\implies |n| \le 1\implies n^2 \le 1$ so there are no integer square roots of $2$ or $3$.

*

*You need to point out that $a,b$ are relatively prime (and $b\ne 1$) that would imply $a^2$ and $b^2$ are relatively prime (and $b^2 \ne 1$).

If we have the fundamental theorem of arithmetice (all integers have unique prime factorizations)  and/or euclid's lemma (if $p$ is prime and $p|nm$ then $p|n$ or $p|m$) that's short work.
$b\ne 1$ so $b^2 \ne 1$ and $b^2$ must have a prime factor and that prime factor, call it $p$ must, by Euclid's, lemma divide $b$.  By transitivity that prime factor must divide $a^2$ and must therefore divide $a$.  But that contradicts $a,b$ are relatively prime.

*

*Then your proof is complete.  As $a^2,b^2$ are relatively prime and $b^2 \ne 1$ then $b^2$ is not itself a factor of $a^2$ and $\frac {a^2}{b^2}$ can not be the integer $2$.

If you don't have the FTA or EL then you have your work cut out for you.  Better to just do the classic.
(That is proving that if $m$ is even/odd then $m^2$ is even/odd and therefore $2 =\frac {a^2}{b^2}$ must imply $a,b$ are both even and thus not relatively prime.)
(This assumes that all rationals can be written as a pair of relatively prime integers.  Although that is not a basic definition and should be proven, I'll allow that one to go assumed.)
A: Suppose that $\sqrt{2}$ is rational number then exists $p$, $q$ coprime natural numbers such that $\sqrt{2} = \dfrac{p}{q}$. Implies $2q^2 = p^2$, so $p^2$ is divisible by 2. So on $p\vdots 2$, assume that $p=2p_1$ then $q^2=2p_1^2$, implies $q\vdots 2$, So $\gcd(p, q)\vdots 2$ is contradict $p$, $q$ are coprime.
