[Math] show a cartesian product in function is injective or surjective

functions

I had previously figured out injectivity/surjectivity on basic functions but I am stumpted when it comes to showing functions which are cartesian products are injective/surjective.

The first one:
$$f: \Bbb{Z} \to \Bbb{Z}\times\Bbb{Z},$$ where $\Bbb{Z}$ is integers set.

$$f(n) = (2n, n+3)$$

I had shown that f was injective by contrapositive:

suppose $f(x) = f(y)$

then $(2x, x+3) = (2y, y+3)$

but I am unsure if this proof is complete..

When showing onto, I could not think of any counter examples. When dealing with basic functions I would just show that $f(x) = y$ but I am unsure how to show that with cartesian products.

Best Answer

From $ (2x, x + 3) = (2y, y + 3) $ it follows that $ 2x = 2y $ and $ x + 3 = y + 3$, equalities which will only be true if $ x = y $.

Then you must notice (with a bit of given practice) the function is not surjective. The reason is every element in the range of $f$ is of the form $ (2n, n + 3) $ for some integer $n$. But there are plenty points on the lattice $ \Bbb Z \times \Bbb Z$ that are not of this form. Find one such point and assume there is $ x \in \Bbb Z $ for which $ f(x) = $ to the said point and try to arrive at a contradiction. One of the easiest one's to try is the point $( 0, 0 )$.

Related Question