I've been working through various examples of functions that are 1-1, onto or both and came across an example that I didn't really know how to tackle.
Essentially we have a function $f(x,y) = (-1)^xy$ with a domain and codomain of $Z$.
Showing that this function isn't 1-1 is relatively straight forward through the use of a counterexample (say $f(2, 1)$, $f(4, 1)$), however, I am having some trouble showing that this function is onto.
I can see from the function definition that the function is onto (as you essentially have -1 or 1 * any integer) but don't know how to show this as an actual proof.