Question about one-to-one and onto with functions

  • Thread starter Thread starter kingerd
  • Start date Start date
  • Tags Tags
    Functions
AI Thread Summary
The discussion focuses on the function f(x) defined piecewise for odd and even integers, analyzing its properties of being onto and not one-to-one. It is established that the function is onto because for any integer y, there exists an integer x (specifically 2y) such that g(x) = y. The confusion arises around the relevance of using 2y, but it is clarified that any x satisfying g(x) = y suffices. The function is not one-to-one as both g(1) and g(2) yield the same output. An additional example is provided to illustrate a different function that is both one-to-one and onto, demonstrating the method of proving these properties.
kingerd
Messages
14
Reaction score
0
the following is a problem in the book.

<br /> f(x)=\left\{\begin{array}{cc}\frac{1}{2}(x+1),&amp;\mbox{ if x is odd}<br /> \\\frac{1}{2}x, &amp; \mbox{ if x is even}\end{array}\right<br />

the solutions that's given is This function is onto because, for any y\epsilonZ, g(2y)=y. 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
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.
 
so the fact that they use 2y is irrelevant just so long as g(x)=y
 
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 \frac{1}{2}x= y in which case x= 2y (and is even) or \frac{1}{2}(x+1)= y 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:
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...

Similar threads

Back
Top