I know the answer is obvious: In $\mathbb{Z}$ the only solutions of $xy=-1$ are $x=-y=1$ and $x=-y=-1$. My problem is that I want to formally prove it and I don't know how to write it. Where do you even begin for such a trivial statement?
Edit: I would like to prove it viewing $\mathbb{Z}$ as a ring. This is, just using the sum and product of integers. No order, no absolute value, etc...
if $xy=-1$, then we we have $|x||y|=1$, that is we must have $|x|=1$ and $|y|=1$.
Also, determinining $x$ would completely determine $y$.
Hence we only need to examine what happends when $x=1$ and $x=-1$.