Show that the curve $x^2+y^2-3=0$ has no rational points

Suppose to the contrary that there is a rational solution of the equation. Then there exist integers $a$, $b$, and $q$, with $q\ne 0$, such that $a^2+b^2=3q^2$, and $a$, $b$, and $q$ have no common factor greater than $1$.

Note that $a$ and $b$ must both be divisible by $3$. For if an integer $m$ is not divisible by $3$, then $m^2$ has remainder $1$ on division by $3$. So if one or both of $a$ and $b$ is not divisible by $3$, then $a^2+b^2$ has remainder $1$ or $2$ on division by $3$, and therefore cannot be of the shape $3q^2$.

Thus both $a$ and $b$ are divisible by $3$. It follows that $q$ is divisible by $3$, contradicting our assumption that $a$, $b$, and $q$ have no common divisor greater than $1$.