Sorry in advance for my poor maths skills. I've picked up maths in a computing course after over a decade of being away from the subject. I have a question where I need to show if the below function is injective and / or surjective.
$f: \mathbb{Z}{\times}\mathbb{Z} \to \mathbb{Z}$ $f(a,b)=a + b + 3$
If I use a non-pair I know how to solve this, I would say $f(a) = f(b)$ and solve this and see if it works for integer numbers. But with a pair as the input I'm a bit confused as to how to show whether this is injective / surjective or not.
for example:
$f(a_0, b_0) = f(a_1,b_1) \\ a_0 + b_0 + 3 = a_1 + b_1 + 3 \\ a_0 + b_0 = a_1 + b_1$
If I then say $ a_0 = 0, b_0 = 1, a_1 = 1, b_1 = 0$
$ 0 + 1 = 1 + 0 $
So the equation works even though the inputs were different. Is this proof that this function is not injective?
You indeed proved that $f$ isn’t injective. It is surjective as any element $c \in \mathbb Z$ is the image of $(c, -3)$.