Prove $\sqrt{2}$ is irrational using prime number properties I found the following argument in a textbook that uses a number theory approach. However I do not understand the last two sentences that seems to use some number theory properties, can someone please help explain them?
Let 
$$
a^2 = 2b^2, \quad (a,b)=1, \quad a,b\in \mathbb{N}
$$
Rearranging, 
$$
b^2 = (a+b)(a-b)
$$
Let $p$ be a prime factor of $b$, then 
$$
p \mid (a+b)\quad or\quad p\mid (a-b)
$$
If $p$ divides any of the above, then $p$ divides both of them, hence $p$ must divide $a$. Then $p$ would be a common divisor of $a$ and $b$, a contradiction.
 A: (a+b) - (a-b) =2b ,so as their difference is divisible by p(it is obviuosly divisble by b and hence p), if any one (a-b) or (a+b) then other should also be divisible , hence their sum is divisble by p , sum is 2a.
A: The conclusion that $p\mid(a+b)$ or $p\mid(a-b)$ comes from the property of primes that if $p\mid(rs)$ then $p\mid r$ or $p\mid s$. This, in fact, is the defining property of prime elements in a ring.
For the next sentence: if $p$ divides $a+b$ then it divides $(a+b)-2b=a-b$; if $p$ divides $a-b$ then it divides $(a-b)+2b=a+b$. The author didn't need this step to conclude that $p$ divides $a$, however; they could have simply proceeded as in Malkoun's comment: if $p$ divides $a+b$ then $p$ divides $(a+b)-b=a$; if $p$ divides $a-b$ then $p$ divides $(a-b)+b=a$.
The final sentence of the proof just uses the assumption that $p\mid b$ and the conclusion that $p\mid a$ to infer that $p$ is a common divisor of $a$ and $b$, which violates the earlier assumption $(a,b)=1$.
A: Assume $\sqrt{2} = \frac{a}{b}$ with $\{ a, b \} \in \mathbb{N}$ and reduced form.  Then $$2 b^2 = a^2 .$$
The number of prime factors on the left is odd; the number of prime factors on the right is even.  From the fundamental theorem of arithmetic (unique prime factorization), this cannot occur.
QED
