# Thread: Left and Right inverse

1. ## Left and Right inverse

Dear everyone.
I am really sorry.
Could you help me out?

1. Consider the function f : R -> R defined by
f(x) = x^2 + 2 if x > 0 and x + 1 if x <= 0.
Find a left inverse of f.

2. Consider the function f : R -> R defined by
f(x) = x^2 - 2 if x > 0, x - 1 if x <= 0.
Find a right inverse of f.

Can I ask if a left and right inverse means just swap x with y?

2. ## Re: Left and Right inverse

No. I'm afraid that the terminology "left inverse" and "right inverse" being used here are being used in the wrong context. My guess is that because a function can only have an inverse if it is one-to-one on its domain, it is asking you to break up the function into the (maximal) parts where the function is one-to-one (one will point left and the other will point right), and then find their corresponding inverse functions.

3. ## Re: Left and Right inverse

A left inverse is a function g such that g(f(x)) = x for all x in $\mathbb{R}$, and a right inverse is a function h such that f(h(x)) = x for all x in $\mathbb{R}$. An inverse is both a right inverse and a left inverse.

In problem 1, the range of f is $[-\infty,1] \cup [2,\infty]$; you can define the function piecewise - something for $[-\infty,1]$ and something else for $[2,\infty]$. The function needs to undo what f has done, and it doesn't matter what g does on (1,2) since g will never see an input in that interval.

For problem 2, you need to think the other way - you need to figure out what to feed f so that it will give you back your original input. The range of f is $\mathbb{R}$ since the two pieces of f overlap on the interval [-2,-1]. On that interval, you can choose what you want h to do - either output something that will trigger the first piece and give you back x or output something that will trigger the second piece and give you back x. Above and below [-2,-1] you don't have a choice - only one piece will work.

- Hollywood

4. ## Re: Left and Right inverse

I deeply appreciate it.

As for the right inverse, would it be:

h(x) = x+1 , when x <= 0

and h(x) = +- root(x+2), when h(x) is in R?

May I ask if I am doing this in a correct way?

5. ## Re: Left and Right inverse

Originally Posted by hollywood
A left inverse is a function g such that g(f(x)) = x for all x in $\mathbb{R}$, and a right inverse is a function h such that f(h(x)) = x for all x in $\mathbb{R}$. An inverse is both a right inverse and a left inverse.

In problem 1, the range of f is $[-\infty,1] \cup [2,\infty]$; you can define the function piecewise - something for $[-\infty,1]$ and something else for $[2,\infty]$. The function needs to undo what f has done, and it doesn't matter what g does on (1,2) since g will never see an input in that interval.

For problem 2, you need to think the other way - you need to figure out what to feed f so that it will give you back your original input. The range of f is $\mathbb{R}$ since the two pieces of f overlap on the interval [-2,-1]. On that interval, you can choose what you want h to do - either output something that will trigger the first piece and give you back x or output something that will trigger the second piece and give you back x. Above and below [-2,-1] you don't have a choice - only one piece will work.

- Hollywood
I deeply appreciate it.

As for the right inverse, would it be:

h(x) = x+1 , when x <= 0

and h(x) = +- root(x+2), when h(x) is in R?

May I ask if I am doing this in a correct way?

6. ## Re: Left and Right inverse

No...that's not right.

Ok, if h(x) = x+1 (we'll work on the domain later), and f(x) = x-1, then:

f(h(x)) = (x+1)-1 = x + (1-1) = x + 0 = x.

Now, we can only use f(x) = x - 1, when x ≤ 0. Since we are taking f(h(x)), we actually want h(x) ≤ 0, so setting:

h(x) = x + 1 ≤ 0, we find x ≤ -1.

In other words, if we set h(x) = x + 1 for all x ≤ -1, then h(x) ≤ 0, so we can "hit" h(x) with the part of f where f(x) = x - 1.

So what do we do when x > -1?

We need a function h so that h(x) > 0, when x > -1. It can be LOTS bigger than 0, it doesn't have to be something like:

(positive something) + 1.

Since for x > 0, a "normal" inverse for f(x) = x2 - 2 is: k(x) = √(x + 2)

it seems natural to use h(x) = √(x + 2) for x > -1 (this makes sense, h(x) is defined for all x ≥ -2).

Then: f(h(x)) = (√(x + 2))2 - 2 = |x + 2| - 2 = x + 2 - 2 = x + 0 = x (we know that |x + 2| = x + 2, since x + 2 > -1 + 2 = 1 > 0).

We could however, define as well:

h(x) = x + 1, for x ≤ -2
h(x) = √(x + 2) for x > 2

In fact, we can pick ANY point a in (-2,-1] and set:

h(x) = x + 1, for x ≤ a
h(x) = √(x + 2) for x > a (this is what hollywood was getting at).

Even more complicated choices are possible, but that gets into some complicated set-theory, so we'll stick with simple intervals.

Note that our choice of "a" gives us a DIFFERENT h each time, meaning the right inverse of f is not UNIQUE (we have lots of possible ones to choose from).

Your proposal, choosing a = 0, does not work, though. To see this, suppose x = -1/2.

For that x, you have h(x) = x + 1 (since -1/2 ≤ 0).

now h(-1/2) = -1/2 + 1 = 1/2 > 0.

so we must use the form of f: f(x) = x2 - 2, and so:

f(1/2) = 1/4 - 2 = -7/4, so that f(h(-1/2)) = -7/4 ≠ -1/2.

One more point:

h(x) = ± √(x + 2) is NOT A FUNCTION. Functions must be "single-valued": for each input, only one output must be defined.