# Thread: One-to-one and Onto Functions

1. ## One-to-one and Onto Functions

Ok the question is:
Give an example of a function from N to N that is
(a) one-to-one but not onto
(b) onto but not one-to-one
(c) both onto and one-to-one
(d) neither one-to-one nor onto

(a) My answer is the function from {a,b,c} to {1,2,3,4} with f(a) = 2, f(b) = 3, f(c) = 1. Is this the correct example to this question?

What does it mean from N to N?

I kind of lost on how to show these examples. Thanks for any help!

2. Originally Posted by VGDude85
Ok the question is:
Give an example of a function from N to N that is
(a) one-to-one but not onto
(b) onto but not one-to-one
(c) both onto and one-to-one
(d) neither one-to-one nor onto

What does it mean from N to N?
Normally $\displaystyle \mathbb{N} = \left\{ {0,1,2,3, \cdots } \right\}$.
Some authors/texts do not include 0 in $\displaystyle \mathbb{N}$ so check your textbook.

Here is an example for (a) $\displaystyle f(n)=2n$.

3. Originally Posted by VGDude85
Ok the question is:
Give an example of a function from N to N that is
(a) one-to-one but not onto
(b) onto but not one-to-one
(c) both onto and one-to-one
(d) neither one-to-one nor onto

(a) My answer is the function from {a,b,c} to {1,2,3,4} with f(a) = 2, f(b) = 3, f(c) = 1. Is this the correct example to this question?

What does it mean from N to N?

I kind of lost on how to show these examples. Thanks for any help!

(c) $\displaystyle {\color{blue}n \mapsto n [\backepsilon n \in \mathbb{N}]}$
(d) $\displaystyle {\color{blue}1 \mapsto 2, 0 \mapsto 2}$

4. Thanks for the examples guys. So the N stands for natural numbers, I totally forgot what that meant. My old example I could tell was for Z.