Functions – Proving Onto Functions in Cartesian Products

elementary-set-theoryfunctionsproof-writing

I've been working on this problem:

Suppose the function $f:\mathbb Z \times \mathbb Z \to \mathbb Z$ is defined by $f(n,m)=2nm-1$. Is this function onto?

After a while, I figured out that $4$ can't be output from the function $f$, and then I realized that this function can't output any even numbers either. It seems that because the function follows the formula $2k-1$ for odd numbers, that's why it only produces odd numbers.

Because of that, I know that this function can't be onto. However, I don't know where to begin to write an abstract proof of this. I could normally do this if it were for a domain that wasn't a Cartesian product, but I haven't been able to find examples on how this is usually done.

Thank you!

Best Answer

Every integer $k \in \mathbb{Z}$ of the form $k = 2nm$ with $n, m \in \mathbb{Z}$ is even. Thus $k' = 2nm - 1$ is always odd. Therefore $f: \mathbb{Z}\times \mathbb{Z} \to \mathbb{Z}, (n,m) \mapsto 2nm-1$ is not onto.

Related Question