User:LkNsngth/irrationality of root two

Let p and q be coprime integers such that p/q = √2. Then we get 2q2=p2. Now, by unique factorization, we can write $$p=\prod P_i^{n_i}$$ and $$q=\prod Q_i^{m_i}$$ where Pi and Qi are all prime integers with ni and mi also integers. Now, plugging our unique factorization into the above equations gives $$2\prod Q_i^{2m_i} =\prod P_i^{2n_i}$$ Now, notice that if $$\prod P_i^{2n_i}$$ is a multiple of 2, then one of the Pi must be 2 because 2 is prime and therefore has no non unit divisors. Therefore as said, the right hand side has an even power of 2 while the left side has an odd power of 2. By unique factorization, both of these cannot be right, contradiction. Thus √2 is irrational. Q.E.D.