Given a prime number $p$, show that there is no rational number a such that $a^2 = p$.
I tried assuming the equality is true then I took $a= \frac{m}{n}$ such that $m$ and $n$ are relatively prime then $$a^2= \frac{m^2}{n^2}= p\implies m^2=p \cdot n^2$$ then I got stuck.
From $m^2=pn^2$ we obtain a contradiction since
$$p|m^2 \implies p|m$$
that is
$$p^2l^2=pn^2 \implies n^2=pl^2\implies p|n$$