Question: Alternate proof to "For any prime $p$, $\sqrt{p}$ not rational"? studying for a final right now, and one of the my study questions is,
If $p$ is prime then $\sqrt{p}$ is not rational (i.e., irrational).
I understand the standard proof by contradiction, where the contradiction is that $a, b$ are not coprimes when you represent $$\sqrt{p} = \frac{a}{b},$$
but I attempted a different way and want to see if it is acceptable or not (I'm assuming the latter case).
So,


*

*Assume $\sqrt{p}$ as a rational number then,

*$\sqrt{p} = \frac{a}{b}$, where $a, b$ coprimes

*$p = {\left(\frac{a}{b}\right)}^{2}$


Now, since $p$ is a prime number, then the only way to represent $p$ as a rational number is by $p = \frac{p}{1}$. So, $a = p$ and $b = 1$.


*So, we have $p = \frac{p^2}{1^2}$

*$p = p^2$, Contradiction. 
It follows that $\sqrt{p}$ cannot be rational (i.e., $\sqrt{p}$ is irrational). QED.
Is this acceptable? Or are steps (3) $\rightarrow$ (4) too much of a leap?
Any comments appreciated.
 A: $p = \frac{p}{1}$ is not the only way to represent $p$; $\frac{2p}{2}$, etc. would also work.
I think you are getting to the idea that $p = \frac{a^2}{b^2}$, for integers $a,b \in \mathbb{Z}$, would imply that $a^2 = p b^2$; and if you assume unique factorization into primes, this is a contradiction because $a^2$ has an even power of $p$ while $p b^2$ has an odd power of $p$. You can make a valid proof with this argument.
A: It strikes me that your proof is generally fine until you set $a=p$ and $b=1$. In particular, assuming $a$ and $b$ are coprime, one can also prove that $a^2$ and $b^2$ are coprime. Thus, when you reach
$$p=\frac{a^2}{b^2}$$
you would be allowed to say $a^2=p$ and $b^2=1$ because this is the only representation of $p$ as the quotient of two coprime natural numbers. Your method forgot to square $a$ and $b$ for using this equality. In fact, to this point in the proof, we have not used that $p$ is prime - this part of your argument establishes that the square root of an integer is either irrational or an integer.
From here, one merely needs to conclude that $p$ is not the square of an integer - which is easy since if $a^2=p$ then $a$ is a factor of $p$, meaning $a=1$ or $a=p$ since $p$ is prime, which of course are not solutions to $a^2=p$, finishing the proof.
A: There is another way to prove that $\sqrt p$ is not rational. 
$1)$ Show that if $n$ is not a perfect square, and if you assume$\sqrt n = \dfrac ab$, then $b \not = 1$
$2)$ If $a$ and $b$ are co-prime, $n = \dfrac ab \cdot \dfrac ab$, so $\dfrac {a^2}{b^2}$ is an unsimplifiable fraction
$3)$ Conclude that if the square root of a number $n$ can be represented by co-prime $\dfrac ab$, then the number $n$ cannot be an integer 
Let me know if you want me to fill in the details!
A: Let $p \in \mathbb{Z}$ be a prime number.
Suppose that 
$$p=\frac{a^2}{b^2}$$
with $a,b\in \mathbb Z$ coprimes. The only way of representing $p$ as a ratio of two coprime numbers number is $\frac p1$, so
$$a^2=p\implies a \mid p$$
But then either $a=p$ or $a=1$; both cases are absurd.
A: The step from $3$ to $4$ seems to be false.
The following are all valid representations of $p$:
$\frac{p}{1},\frac{2p}{2},\frac{3p}{3}$ and in general $\frac{kp}{k}$ where $k$ is a non-zero integer.
A: But you can represent primes in other ways. Remember, the only assumed that $a$ and $b$ are coprime. $3 = \displaystyle\frac{6}{2}$
