TITLE: prove that if $p$ is a prime number, then $\sqrt{p}$ is an irrational number.
QUESTION [5 upvotes]: $\sqrt{p}$ is rational. 
$\sqrt{p}=\frac{a}{b}$, where $a,b$ are integers with $\gcd(a,b)=1$.
$a^2=b^2p$. 

Since $p$ divides $a^2$, $p$ divides $a$.

$a=kp$. 
$a^2=k^2p^2=b^2p$ 
$p=\frac{b^2}{k^2}\Rightarrow\sqrt{p}=\frac{b}{k}\Rightarrow\frac{a}{b}=\frac{b}{k}$
$b^2=ak\Rightarrow b=\sqrt{ak}$.
$\sqrt{p}=\frac{a}{b}=\frac{a}{\sqrt{ak}}=\frac{\sqrt{a}\sqrt{a}}{\sqrt{a}\sqrt{k}}$ which has $\gcd(a,b)=\sqrt{a}\neq 1$ , a contradiction.

($a\neq 1$ because the only number that divides 1 is 1, but 1 is not a prime from $a=kp$)
Hence, $p$ is irrational. Is this legit?

REPLY [2 votes]: Every square number has an even number of prime divisors. Hence the number of prime divisors of $a^2$ is even where their number in $pb^2$ is odd.