# Math Help - Injective/Surjective.

1. ## Injective/Surjective.

I have a question here that asks to:

Give an example of a function N --> N that is

i) onto but not one-to-one
ii) neither one-to-one nor onto
iii) both one-to-one and onto.

If anyone could help me with any of these, it would be greatly appreciate. Thanks.

2. Originally Posted by GreenDay14
I have a question here that asks to:

Give an example of a function N --> N that is

i) onto but not one-to-one
ii) neither one-to-one nor onto
iii) both one-to-one and onto.

If anyone could help me with any of these, it would be greatly appreciate. Thanks.
i) $f(x)=1$ ... a simple constant function works here, because you can use all values of x in the natural numbers, but you just get one value for f(x) which is in the co-domain.

ii) not sure if this one is correct but what if we used $f(x)=-x$, in this case it is mapping the natural numbers to a co-domain that isn't the natural numbers, which is not onto, or one-to-one...

iii) $f(x)=x$ it is just mapping the natural numbers, to the natural numbers, therefore its onto and one-to-one, but you might want to do a formula proof of each of these using the definitions.

3. Originally Posted by ux0
i) $f(x)=1$ ... a simple constant function works here, because you can use all values of x in the natural numbers, but you just get one value for f(x) which is in the co-domain.
No, that's not "onto"- if fact, it's very badly not "onto"! Nothing is mapped into any number other than 1! An example of a function that is "onto" but not "one to one" would be f(1)= 1, f(2)= 1, f(n)= n-1 for n> 2.

i) not sure if this one is correct but what if we used $f(x)=-x$, in this case it is mapping the natural numbers to a co-domain that isn't the natural numbers, which is not onto, or one-to-one...
No, that isn't correct either. The problem specifically asked for a function from N to N (N->N) and that is not. Actually, your first example, f(n)= 1 for all n is neither "onto" nor "one to one".

$f(x)=x$ it is just mapping the natural numbers, to the natural numbers, therefore its onto and one-to-one, but you might want to do a formula proof of each of these using the definitions.
Yes, this works fine.

4. yup i'm a big dummy... even though the question didn't ask, if you had $f(x)=x^2$... would this be an example of a function that is one-to-one, but not onto, seeing you don't get the entire co-domain, but you do get a unique value for every x...

5. Originally Posted by ux0
yup i'm a big dummy... even though the question didn't ask, if you had $f(x)=x^2$... would this be an example of a function that is one-to-one, but not onto, seeing you don't get the entire co-domain, but you do get a unique value for every x...
If you mean from R to R, no, it is not "one to one" because f(-1)= f(1).

Getting "a unique value for every x" is the definition of function, not "one-to-one". A function if one to one if f(x)= f(y) only when x=y.

6. No, I meant it for this example... $N \rightarrow N$

7. Originally Posted by ux0
No, I meant it for this example... $N \rightarrow N$
Yes, if $f:\mathbb{N} \to \mathbb{N}$ is defined by $f(x) = x^2$ then it is:

(1) one-one: $x^2 = y^2 \Rightarrow x=y$

(2) not onto: What is the source of 3?