# Mapping functions

## Homework Statement

Hello. I was hoping I could get some help with a homework question.

"Draw the graph of f. State whether f is One to One and also whether it is Onto."

## Homework Equations

Equation 1 : f(x) = 1/x^2 if x≤-1

Equation 2 : f(x) = (x+3)/2 if -1≤x≤1

Equation 3 : f(x) = 2 + (1/x) if x≥1

## The Attempt at a Solution

http://img198.imageshack.us/img198/3589/20466997.gif [Broken]

I know it isn't Onto because it doesn't use all of the elements in the codomain, but I can't tell whether it's One To One.

All of the examples we've done in class have multiple domain elements mapped to single codomain elements (A and C mapped to B). We haven't done anything with single domain elements mapped multiple codomain elements (A mapped to B and C).

"One To One" suggests that A can only map to one value of B, and B can only map to one value of A. So in this question we have one value of A mapped to multiple values of B, which makes me think that the function f in this case is neither One To One nor Onto.

But I get caught out by things like this all the time.

Could anyone help me, please. I'd really appreciate it. Thanks

Last edited by a moderator:

Related Precalculus Mathematics Homework Help News on Phys.org
Cyosis
Homework Helper
Is the codomain assumed to be the reals in this case? I need to assume here that A is the domain and B is the co-domain, but it would be nice if you would specify what they are.

A function is an injection if and only if $f(a)=f(b)$ then $a=b$. You say that you have a single value from A mapping to multiple values of B. Could you give an example?

Edit: Are the various conditions on x for f (the inequalities correct)? Because as they are now the 'function' has various y values for one specific x value, which means it is not a function at all.

Last edited:
HallsofIvy
Homework Helper
Actually, the way that's given, it's not even a function! You have f(1) equal to both 2 and 3. I am going to assume that equation 3 is f(x)= 2+ 1/x for x> 1, not $x\ge 1$. (I would consider it bad practice to have "=-1" included in both equations 1 and 2 but since they give the same value, it doesn't hurt.)

While $1/x^2$ is not "one-to-one", restricting it to $x\le -1$ makes it so. If $1/a^2= 1/b^2$ then $b^2= a^2$ so $b= \pm a$. Since a and b are both negative, b= a.

(x+3)/2 is linear and so obviously "one-to-one". If (a+ 3)/2= (b+ 3)/2, multiplying on both sides by 2, a+ 3= b+ 3. Subtracting 3 from both sides, a= b.

2+ 1/x is "one-to-one". If 2+ 1/a= 2+ 1/b, subtracting 2 from both sides, 1/a= 1/b. Multiplying both sides by ab, b= a.

Now, the question is, "can two values of x in those different ranges give the same value?" That is, could we have $1/a^2= (b+3)/2$ for $a\le -1$ and $-1< b\le 1$? If $1/a^2= (b+3)/2$ then $a^2= 2/(b+3)$ so $a= -\sqrt{2/(b+3)}$ (I have used the fact that a must be negative). Since $-1\le b$, $2\le b+ 3$, $1/(b+3)\le 1/2$ and $2/(b+3)\le 1$. Since $b\le 1$, $b+3\le 4$, $1/(b+3)\ge 1/4$ and $2/(b+3)\ge 1/2$. That is, $1/2\le 2/(b+3)< 1$ so $\sqrt{2}/2\le \sqrt{2/(b+3)}< 1$ and $-1< \sqrt{2/(b+3)}\le -\sqrt{2}/2$. Thus, a could not be less than or equal to -1 and give the same result.

Similarly, is it possible for $1/a^2= 2+ 1/b$ with $a\le -1$ and b> 1?
If b> 1, then 0< 1/b< 1 so 2< 2+ 1/b< 3. The largest that $1/a^2$ can be is 1 so that is impossible.

Finally, is it possible for (a+2)/3= 2+ 1/b with $-1\le a\le 1$ and b>1? The largest possible value of (a+2)/3 is (1+2)/3= 1 while the smallest possible value of 2+ 1/b is larger than 2+ 1/1= 3. No, those can never be equal.

And, of course, since f(x) is never larger than 3, f is not onto the real numbers.

Cyosis
Homework Helper
HallsofIvy said:
Finally, is it possible for (a+2)/3= 2+ 1/b with LaTeX Code: -1\\le a\\le 1 and b>1? The largest possible value of (a+2)/3 is (1+2)/3= 1 while the smallest possible value of 2+ 1/b is larger than 2+ 1/1= 3. No, those can never be equal.
While it doesn't change the answer the problem statement gives (x+3)/2 not (x+2)/3. This makes it slightly harder to draw a conclusion since the largest value for (x+3)/2=2, and $2<2+1/x <3$.

Thanks for the quick replies. Is the codomain assumed to be the reals in this case? I need to assume here that A is the domain and B is the co-domain, but it would be nice if you would specify what they are.

A function is an injection if and only if $f(a)=f(b)$ then $a=b$. You say that you have a single value from A mapping to multiple values of B. Could you give an example?

Edit: The various conditions on x for f are the inequalities correct? Because as they are now the 'function' has various y values for one specific x value, which means it is not a function at all.
Sorry, I forgot to mention that both the domain and codomain are Real numbers. I used the A, B, C bit to try to explain what was happening. They wre meant to represent values. I hope that makes sense.

The graph (which my teacher mistakenly drew for us) shows the points (1,2) and (1,3), so x=1 is mapped to both y=2 and y=3. We haven't done anything like this in the inverse function work that the homework is related to, but the mapping work we did months ago suggests, as has been said, that f isn't a function.

We haven't done anything in the inverse work that has a single domain element mapped to multiple codomain elements.

Actually, the way that's given, it's not even a function! You have f(1) equal to both 2 and 3. I am going to assume that equation 3 is f(x)= 2+ 1/x for x> 1, not $x\ge 1$. (I would consider it bad practice to have "=-1" included in both equations 1 and 2 but since they give the same value, it doesn't hurt.)

While $1/x^2$ is not "one-to-one", restricting it to $x\le -1$ makes it so. If $1/a^2= 1/b^2$ then $b^2= a^2$ so $b= \pm a$. Since a and b are both negative, b= a.

(x+3)/2 is linear and so obviously "one-to-one". If (a+ 3)/2= (b+ 3)/2, multiplying on both sides by 2, a+ 3= b+ 3. Subtracting 3 from both sides, a= b.

2+ 1/x is "one-to-one". If 2+ 1/a= 2+ 1/b, subtracting 2 from both sides, 1/a= 1/b. Multiplying both sides by ab, b= a.

Now, the question is, "can two values of x in those different ranges give the same value?" That is, could we have $1/a^2= (b+3)/2$ for $a\le -1$ and $-1< b\le 1$? If $1/a^2= (b+3)/2$ then $a^2= 2/(b+3)$ so $a= -\sqrt{2/(b+3)}$ (I have used the fact that a must be negative). Since $-1\le b$, $2\le b+ 3$, $1/(b+3)\le 1/2$ and $2/(b+3)\le 1$. Since $b\le 1$, $b+3\le 4$, $1/(b+3)\ge 1/4$ and $2/(b+3)\ge 1/2$. That is, $1/2\le 2/(b+3)< 1$ so $\sqrt{2}/2\le \sqrt{2/(b+3)}< 1$ and $-1< \sqrt{2/(b+3)}\le -\sqrt{2}/2$. Thus, a could not be less than or equal to -1 and give the same result.

Similarly, is it possible for $1/a^2= 2+ 1/b$ with $a\le -1$ and b> 1?
If b> 1, then 0< 1/b< 1 so 2< 2+ 1/b< 3. The largest that $1/a^2$ can be is 1 so that is impossible.

Finally, is it possible for (a+2)/3= 2+ 1/b with $-1\le a\le 1$ and b>1? The largest possible value of (a+2)/3 is (1+2)/3= 1 while the smallest possible value of 2+ 1/b is larger than 2+ 1/1= 3. No, those can never be equal.

And, of course, since f(x) is never larger than 3, f is not onto the real numbers.
The third equation is x≥1.

I'm a bit confused as to what I'm meant to do with the question now. In class, we plotted graphs then worked out whether they were One To One, Onto or Both just from looking at them, and I thought I'd just have to do the same with this.

Through the first two equations I can see that f is One To One, but the third equations "spoils" it.

Ooh. Ooh. I think I just got it.

As the graph is, it's not even a function. But If I restrict the codomain to a maximum of y=2, what I'm left with will be both One To One and Onto, which are the requirements for a function to have an inverse.

That makes much more sense now. It just clicked as I kept thinking about your replies.

Thank you so much. Cyosis
Homework Helper
Specifying the co-domain as $y<=2$ is not enough, you will also need to specify a lower bound. Your domain needs to be adjusted as well.

Specifying the co-domain as $y<=2$ is not enough, you will also need to specify a lower bound. Your domain needs to be adjusted as well.
Ah, I see what you mean. We've only restricted domains in class, and now I'm really confused.

Again. The question only says to cut down the codomain to give f an inverse if it isn't Onto. I'm wondering if I can get away with just stating that I'll restrict it and why, then follow it up with the graph of the inverse.

Unless that's also more complicated than we did in class. EDIT : Restrict the codomain to [0,2] perhaps? That will remove the plot of the third equation and seems to "fit" with the inverse graph.

Cyosis
Homework Helper
Okay according to you if we restrict the codomain to a maximum value of y=2 then it is both injective and surjective. If that is true then there is an x in the domain such that f(x)=-10. Can you give me that value of x?

Cyosis
Homework Helper
Matty R said:
=EDIT : Restrict the codomain to [0,2] perhaps? That will remove the plot of the third equation and seems to "fit" with the inverse graph.
That codomain is correct, however your reasoning to why it is so is wrong. The third graph always stays below 3 and always stays above 2. So restricting the codomain to $(-\infty,2]$ gets rid of the third graph.

To see why [0,2] is the correct codomain you need to answer the question in my previous post.

Okay according to you if we restrict the codomain to a maximum value of y=2 then it is both injective and surjective. If that is true then there is an x in the domain such that f(x)=-10. Can you give me that value of x?
Erm, x = -23? :uhh:

(-23+3)/2 = -10

Cyosis
Homework Helper
But that expression is only valid on the interval $-1 < x \leq 1$ and -23 definitely does not belong to that interval. For all values $x \leq -1$ you have to use the expression 1/x^2. The question remains does there exist an x such that f(x)=-10?

But that expression is only valid on the interval $-1 < x \leq 1$ and -23 definitely does not belong to that interval. For all values $x \leq -1$ you have to use the expression 1/x^2. The question remains does there exist an x such that f(x)=-10?
Oh yeah. Well in that case, no? Cyosis
Homework Helper
Indeed there does not exist an x such that f(x)=-10, yet -10 is in your codomain. Therefore limiting the codomain only to values y<=2 will not make it a surjection. So how should you limit the codomain further?

Indeed there does not exist an x such that f(x)=-10, yet -10 is in your codomain. Therefore limiting the codomain only to values y<=2 will not make it a surjection. So how should you limit the codomain further?
Ohhhhh. Sorry. I didn't understand where the -10 came from.

y<=2 means y can be 2 or any real number less than that, but I don't have a value of x where f(x)=-10, so I need to give a range of y values, like you said before.

So, looking at the plot above, the values of x where y = [0,2] would leave me with a plot that is both One To One and Onto (Surjective, I think). Wouldn't it?

We only had one lesson on this subject and I thought I understood it. The course I'm doing is trying to put about 18 months of work into about 7 months of learning, so we don't get much time on each subject.

Cyosis
Homework Helper
Yes you got it almost right now. There does not exist an x such that f(x)=-a with a>0, but the question now is does there exist an x such that f(x)=0?. You also want to restrict your domain, for example what is f(2)?

Last edited:
I'm going to say no, because the plot f(x) = 1/x^2 goes closer to 0 as x decreases, but doesn't actually reach 0 (curves to Infinity).

f(2) would use the third equation, which is preventing my plot from being Surjective, so I would need to limit my domain to, erm, [-Infinity, 1]? f(1) could be used in the third equation, but the restricted codomain wouldn't show that point.

Is that anywhere near correct? :shy:

We haven't gone into this kind of detail in class. Cyosis
Homework Helper
I'm going to say no, because the plot f(x) = 1/x^2 goes closer to 0 as x decreases, but doesn't actually reach 0 (curves to Infinity).
Yep very good, so you need to adjust your codomain slight it should not be [0,2], but ...?

Now a notational remark, you should not write y=[0,2], but $y \in [0,2]$ or B=[0,2], with B the codomain.

Other then that it looks pretty good to me, one more note remember that [a,b] means that all values including a and b are contained within that interval. You have written $[-\infty,1]$, which means infinity is included but this is not the case of course.

Going into detail is a good thing!

Yep very good, so you need to adjust your codomain slight it should not be [0,2], but ...?

Now a notational remark, you should not write y=[0,2], but $y \in [0,2]$ or B=[0,2], with B the codomain.

Other then that it looks pretty good to me, one more note remember that [a,b] means that all values including a and b are contained within that interval. You have written $[-\infty,1]$, which means infinity is included but this is not the case of course.

Going into detail is a good thing!
Would it be (0, 2]? y is an element of everything between 0 and 2, including 2 but not 0? And would the codomain be (-Infinity, 1]?

Thanks for that about the notation. There was a mix up in the course, where by the time we got to this inverse functions topic, we hadn't actually learnt about intervals. So we had a very quick briefing on it.

Going into detail is a very good thing. I hate having gaps in my knowledge of certain topics. Also, thanks for being so patient with me. This has been a HUGE help.  Cyosis
Homework Helper
Yep that's looking good.

Lovely. Thanks again. 