I was practicing some questions from the past Waterloo Hypatia competitions, and I came across this question:
And upon calculations, I got stuck here:
$$(q+r)(p+q) = -1$$
The solution claims that either $q + r = 1$ and $p + q = -1$ or $q + r = -1$ and $p + q = 1$, but I don't see why is has to be those exact values.
For instance, why can't $q + r = -0.5$ and $p + q = 2$? Integers can still satisfy these conditions, and the product is still -1.
There are only two solutions of the equation $xy=-1$ over the integers, because both $x$ and $y$ are divisors of $1$, i.e., $\pm 1$. So we have $(x,y)=(1,-1)$ and $(-1,1)$. The reason is that the unit group of $\mathbb{Z}$ is $\{ \pm 1\}$.
If $p,q,r$ are integers, so are $x=q+r$ and $y=p+q$.