Suppose $n \in \Bbb N$ has a square root that isn't whole, prove $\sqrt n$ is irrational. The exercise wants me to prove it in the following steps: Suppose $\sqrt n$ is rational, then there exists a minimal natural number $p$ such that $p \sqrt n$ is a natural number. Now, observe the number $q=p \sqrt n -p \lfloor \sqrt n \rfloor$.
I'm not really sure what I can infer from $q$, I tried squaring $q$ but I couldn't infer anything either.
$q<p$, and $q\sqrt{n}\in \mathbb{N}$, but $p$ was the minimal, so you get a contradiction