Here , A=Z and B = Z+ . We need to give example of function f from A to B such that-
(a.) f is one-to-one but not onto.
Let "f(x) = \\begin{cases}\n 3x &\\text{if } x>0 \\\\\n 3|x|+1 &\\text{if } x\\leq 0\n\\end{cases}"
The function f(x) is one-to-one because f(a) = f(b) "\\implies" a = b.
Since the image of positive integers are divisible by 3 and the image of negative integers are not divisible by 3.
The function f(x) is not onto because not every integer is the image of an integer.
For Example , 2 cannot be written as "3x\\;or\\;3x+1" with "x\\isin Z^+" and thus 2 is not the image of any integer.
(b.) f is onto but not one-to-one.
Let "f(x)=|x|+1"
Here, f is not one-to-one because there are different integers that have the same image.
"x=1: \\;\\;f(1)=|1|+1=1+1=2\n\\\\x=-1: f(-1)=|-1|+1=1+1=2"
The function f is onto because every positive integer "x\\isin Z^+" is the image of "x-1" as
"f(x-1)=|x-1|+1=x-1+1=x" .
(c.) f is one-to-one and onto.
Let "f(x) = \\begin{cases}\n 2x &\\text{if } x>0 \\\\\n 2|x|+1 &\\text{if } x\\leq 0\n\\end{cases}"
The function f(x) is one-to-one because f(a) = f(b) "\\implies" a = b.
Since the image of positive integers is even and the image of negative integers is odd.
The function f(x) is onto because every positive integer is the image of an integer.
(Even integers are the image of positive integers and odd integers are the image of negative integers).
(d.) f is neither one-to-one nor onto.
Let "f(x)=1" .
The function is not one-to-one because every integer has the same image.
The function is not onto because every integer different from 1 is not the image of any integer.
Comments
Leave a comment