Question about one-to-one and onto with functions

  • Thread starter kingerd
  • Start date
  • Tags
    Functions
If y< 1, then (y+1)/2< 1. That is, for any y, (y+1)/2 works. g is "onto".In summary, the given function f(x) is onto because for any integer y, there exists an integer x that satisfies g(x)=y. However, it is not one-to-one because there are two possible values of x for every y, making it impossible to have a unique x for each y. The use of 2y in the solution is not irrelevant and is necessary in proving the function to be onto. Additionally, the function g(x) from R to R defined by g(x)= x if x<= 1 and g(x
  • #1
kingerd
14
0
the following is a problem in the book.

[tex]
f(x)=\left\{\begin{array}{cc}\frac{1}{2}(x+1),&\mbox{ if x is odd}
\\\frac{1}{2}x, & \mbox{ if x is even}\end{array}\right
[/tex]

the solutions that's given is This function is onto because, for any [tex]y\epsilonZ, g(2y)=y.[/tex] It is not one-to-one because g(1) = g(2).

I understand where the numbers come from stating why it's not one-to-one, but I'm a little confused about the onto part, in that they got the 2
 
Last edited:
Physics news on Phys.org
  • #2
This is an integers-to-integers function.
Now, given any integer y, does there exist an integer x so that g(x)=y?
The number 2y is certainly an integer, it can qualify as an x, and g(2y) is indeed equal to y.
Thus, you have shown that g is onto.
 
  • #3
so the fact that they use 2y is irrelevant just so long as g(x)=y
 
  • #4
kingerd said:
so the fact that they use 2y is irrelevant just so long as g(x)=y
For any y, there exist x so that g(x)= y.

I wouldn't say the 2y was "irrelevant", a good way to show such and x exists is to tell how to find it! (And your original post had f(x), not g(x).)

What they are really doing is this:
Given such a y, how would you find the corresponding x?
If f(x)= y then either [itex]\frac{1}{2}x= y[/itex] in which case x= 2y (and is even) or [itex]\frac{1}{2}(x+1)= y[/itex] in which case x+ 1= 2y and x is odd. That shows that not only is there such an x, there are 2! Which is why it is not "one to one".

Here's another example: show that g(x), from R to R, defined by g(x)= x is x<= 1,
g(x)= 2x-1 if x> 1, is both one-to-one and onto.
To show that it is one to one, assume that g(x1[/sup])= g(x2). Because of the way the function is defined we would really need to consider 4 possibilities:
If x1, x2 are both less than or equal to 1, then we must have g(x1)= x1[/sup]= g(x2)= x2 so x1= x2- that was easy!
If x1, x2 are both greater than 1, then we must have g(x1)= 2x1-1= g(x2= 2x1-1 and again get x1= x2
The third possibility is x1[/sup] less than or equal to 1, x2> 1 so that g(x1)= x1= g(x2)= 2x2- 1. But if x2> 1 then 2x2> 2 so x1= 2x2-1> 1, a contradiction- that can't happen.
The fourth possibility is that x1> 1 while x2 is less than or equal to 1. Just reverse x1 and x2in the above to see that that can't happen.
If g(x1)= g(x2) then x1= x2 so g is one-to-one.

To see that g is "onto", assume that y is any real number and find x so that g(x)= y.
There are now two possiblities. If y is less than or equal to 1 then obviously, x= y works. If y> 1, does there exist x> 1 so that 2x-1= y?
Solving for x, we get x= (y+1)/2. But is that >1? Yes, if y> 1 then y+1> 2 and so (y+1)/2> 1.
 
Last edited by a moderator:

FAQ: Question about one-to-one and onto with functions

1. What is a one-to-one function?

A one-to-one function is a type of function in which each input has exactly one unique output. This means that no two inputs can have the same output. In other words, each element in the domain of the function is mapped to a unique element in the range of the function.

2. What is an onto function?

An onto function is a type of function in which every element in the range is mapped to by at least one element in the domain. This means that there are no elements in the range that are not mapped to by an element in the domain.

3. How can you determine if a function is one-to-one?

To determine if a function is one-to-one, you can use the horizontal line test. This involves drawing horizontal lines through the graph of the function. If the horizontal line intersects the graph at more than one point, then the function is not one-to-one. If the horizontal line only intersects the graph at one point, then the function is one-to-one.

4. How can you determine if a function is onto?

To determine if a function is onto, you can use the vertical line test. This involves drawing vertical lines through the graph of the function. If the vertical line intersects the graph at more than one point, then the function is not onto. If the vertical line intersects the graph at exactly one point, then the function is onto.

5. Can a function be both one-to-one and onto?

Yes, a function can be both one-to-one and onto. This type of function is called a bijective function. In a bijective function, each element in the domain is mapped to a unique element in the range, and every element in the range is mapped to by exactly one element in the domain.

Similar threads

Replies
3
Views
1K
Replies
14
Views
1K
Replies
3
Views
1K
Replies
23
Views
694
Replies
6
Views
820
Replies
10
Views
1K
Replies
7
Views
1K
Replies
3
Views
1K
Back
Top