Is my proof that $\sqrt{p}$ is irrational ($p$ is a prime) valid?

77 Views Asked by At

I'm learning mathematical proofs, and here I'm trying to prove that $\sqrt{p}$ is irrational, where $p$ is a prime number.

Usually, the statement is proven by contradiction, assuming $\sqrt{p}$ is rational and there exist $m,n \in N$ without common factors such that $\sqrt{p}=\frac{m}{n}$, then showing that $p$ must divide both numerator and denominator, which contradicts the assumption that $m,n$ have no common factors.

Here, my proof is slightly different:

  1. Assume $p$ is a prime, $\sqrt{p}$ is rational.
  2. Then there must be $m,n \in N$ without common factors such that $\sqrt{p}=\frac{m}{n}$.
  3. Square both sides. $p=\frac{m^2}{n^2}$
  4. All prime numbers are integers. Therefore, $p$ is an integer.
  5. If $p$ is an integer and $m,n$ have no common factors, then the denominator ($n^2$) must be equal to $1$.
  6. If $n^2=1$, then $p=m^2$.
  7. But that contradicts the assumption that $p$ is a prime number. Therefore, the assumption that $\sqrt{p}$ is rational must be false.
  8. Hence, $\sqrt{p}$ is irrational.

I'm not sure whether the steps 5-6 are logically correct. Are they? Overall, is the proof valid? If not, why?