$f : \mathbb{Z} \rightarrow \mathbb{Z}, f(x)= 2x+1$
$f : \mathbb{R} \rightarrow \mathbb{R}, f(x)= 2x+1$
I was told that 1) is 1-1, but not onto because the image only contains odd integers, whereas 2) is a Bijection.
Why is this so? Isn't a domain of odd integers a subset of all integers? i.e. if x = 3, the function would spit out 7 which is an odd integer.
Also:
- $f : \mathbb{Z} \rightarrow \mathbb{R}, f(n)= \pm n$
This is not a function as a single input will yield two values, namely a positive and negative value.
However,
- $f : \mathbb{Z} \rightarrow \mathbb{R}, f(n)= n$
Is this a function? Considering that any integer will yield another integer, and since integers are a subset of real numbers, is this a valid function?
To the first question, a surjective function explicitly requires that it covers the entire codomain, not just a subset. If the definition allowed for mappings to a subset of the codomain, then every function is surjective, and the term is meaningless. Yes, $f(3) = 7$, but for what value of $x$ does $f(x)=10$?
As for your second function, why do you think it wouldn't be a valid function? A function simply requires that every member of the domain has an image, and only one image. What has you concerned here?