1. right and left inverse

Dear all

can I ask how I can solve f(x) = x+1 if x < 0 , x^2 - 1 if x >=0.

State f is injective, surjective or bijective. Write down tow different inverses of the appropriate kind for f.

I can draw the graph. and know what surjective and injective. but how can I solve it?
The answer says it is surjective, but can it be also injective?

Sorry, but help me

2. Re: right and left inverse

Let's start from the beginning. Can you say if a function is injective without knowing its codomain? Can you say if a function is surjective without knowing its codomain or its domain?

Have you seen any examples where a function is analyzed for being injective and surjective?

3. Re: right and left inverse

I drew the graph, but all x has one value of y? and y has one value of x. So, it is bijective?

4. Re: right and left inverse

Originally Posted by yanirose
I drew the graph, but all x has one value of y? and y has one value of x. So, it is bijective?
What are $f(-1)=?~\&~f(1)=?$

5. Re: right and left inverse

Originally Posted by yanirose
I drew the graph, but all x has one value of y?
Is this a question. This simply says that $f(x)$ is a function.

Originally Posted by yanirose
and y has one value of x.
Really? What about $y=0.5$ in the following picture?

But you ignored questions in post #2...

6. Re: right and left inverse

Can I ask what you meant post #2?
I deeply appreciate it
I now see. Sorry I was certainly thinking about it in the wrong way. Then, now I see it is injective and has a left inverse.
Then now, can I change x to y? then how can I decide the range?

7. Re: right and left inverse

Originally Posted by yanirose
Can I ask what you meant post #2?
Originally Posted by emakarov
Can you say if a function is injective without knowing its codomain? Can you say if a function is surjective without knowing its codomain or its domain?
The words "domain" and "codomain" (or synonyms of the latter, such as "target set" or "range") occur in the definition of the word "surjective", maybe not explicitly but using symbols. For example, when the definition says, "A function $f:A\to B$ is called surjective...", the notation $f:A\to B$ means that $A$ is the domain and $B$ is the codomain of $f$. The important point is that both the domain and the codomain are essentially used in the definition of the term "surjective". Without knowing the domain and the codomain of a function, it is impossible to say if it is surjective. It's like asking to determine the age of a person given only his or her name. Now, there still remain a question whether you can tell if a function is injective without knowing its domain and codomain.

Originally Posted by emakarov
Have you seen any examples where a function is analyzed for being injective and surjective?
It is essential to see examples of solved problems before trying to solve problems on your own. The obvious place to look is your textbook or lecture notes. You can also read articles in Wikipedia about injective and surjective functions, especially the example sections.

Originally Posted by yanirose
Then, now I see it is injective and has a left inverse.
No, you probably still don't understand what "injective" means.

It's a bad idea to jump over definitions to solving problems. It is better to not have time to cover any material than to rush forward and to not understand anything.

8. Re: right and left inverse

A function $g:B\to A$ is called a left inverse of $f:A\to B$ if $g\circ f=\text{id}_A$ where $\text{id}_A$ is the identity function on $A$. That is, $g$ is a left inverse of $f$ if $g(f(x))=x$ for all $x\in A$. Similarly, $g:B\to A$ is called a right inverse of $f:A\to B$ if $f\circ g=\text{id}_B$, i.e., $f(g(x))=x$ for all $x\in B$.

A function is injective iff it has a left inverse (since no two values are mapped into one, no information is lost and inputs can be recovered from outputs). A function is surjective iff it has a right inverse.

If both the domain and the codomain of $f$ in post #1 are $\Bbb R$, then $f$ is surjective but not injective. Therefore, it has a right inverse: some function $g:\Bbb R\to\Bbb R$ such that $f(g(x))=x$ for all $x\in\Bbb R$. How can we find it? Given some $y$, we need an $x$ such that $f(x)=y$. If $y<0$, then we can use the left branch of $f$, i.e., $f(x)=x+1$. Indeed, solving $y=x+1$ for $x$ gives a negative $x$, which is mapped back into $y$ by $f$. If $y\ge0$, then use the right branch of $f$: solve $y=x^2-1$ for $x$ and make sure that $x$ is mapped back into $y$ by $f$.

The problem asks for a second right inverse. It's possible to use the left branch of $f$ for $y<1$ and the right branch for $y\ge1$. Indeed, if $y<1$, then solving $y=x+1$ for $x$ gives $x=y-1$, so $x<0$. Thus, this $x$ (or, more precisely, the point $(x,0)$) lies under the left branch of $f$ and is mapped by $f$ into $x+1=(y-1)+1=y$. Similarly, $y\ge1$ implies that the solution of $x^2-1=y$ is positive, i.e., lies under the right branch of $f$ and is mapped by $f$ into $y$. Therefore,
$g(y)= \begin{cases} y-1&y<1\\ \sqrt{y+1}&y\ge1 \end{cases}$
is a right inverse of $f$.

9. Re: right and left inverse

I deeply appreciate it!!!
If the answer asks me to do that in terms of x, may I ask how we could do?
Thanks a lot.

10. Re: right and left inverse

Originally Posted by yanirose
If the answer asks me to do that in terms of x, may I ask how we could do?
Asks to do what? A variable name is not important. For example, equations $g(y)=y+5$ and $g(x)=x+5$ define the same function.

11. Re: right and left inverse

Thanks a lot,

My process for that questions is
1) Draw the graph.
2) There are two values of x for one y value, so I now know this is surjective and right inverse.
3) Then, now do I swap x and y then rearrange? like y = x +1 >> x = y + 1 >> y = x - 1 and y = x^2 -1 >> x = y^2 -1 >> y = +- root x+1?
Then how can I decide the domain of x for the inverse then?
As y = x +1 if x<0, this range is y - {1, -00}, so if this is changed to inverse,
isn't this supposed to be y = x - 1 if x < 1, rather than x < -1 in the solution?

12. Re: right and left inverse

Originally Posted by yanirose
My process for that questions is
1) Draw the graph.
2) There are two values of x for one y value, so I now know this is surjective and right inverse.
Absolutely not. You still don't know what surjective and injective means. If there is a single piece of information you remember from this kind of problems, it's the meaning of these terms. Therefore I strongly recommend studying the links in post #7 or other sources. There is no sense in talking about right or left inverses if you can't answer questions in post #2.

Originally Posted by yanirose
3) Then, now do I swap x and y then rearrange? like y = x +1 >> x = y + 1 >> y = x - 1 and y = x^2 -1 >> x = y^2 -1 >> y = +- root x+1?
I showed how to find an inverse in post #8. You can rename the bound variable from $y$ to $x$ if you want. I prefer thinking about $f$ as mapping $x$ to $y$ and therefore its right inverse $g$ as mapping $y$ to $x$. If both map $x$ to $y$, it becomes too confusing to me.

Originally Posted by yanirose
Then how can I decide the domain of x for the inverse then?
The domain of a right inverse of $f$ is the codomain of $f$.

Originally Posted by yanirose
As y = x +1 if x<0, this range is y - {1, -00}, so if this is changed to inverse,
isn't this supposed to be y = x - 1 if x < 1, rather than x < -1 in the solution?
As you saw in post #8, I gave two right inverses $g$. Both are piecewise functions, i.e., defined by cases. The branch that uses the formula $g(y)=y-1$ can be defined on $(-\infty,0)$ or $(-\infty,1)$. The solution from your source saying that it can be defined on $(-\infty,-1)$ is also correct. The idea is that for each $y\in\mathbb{R}$ (since the codomain of $f$ is $\Bbb R$) we must find an $x$ that would be mapped by $f$ back to $y$. For $y<-1$ there is only one possibility for $x$, namely, $x=y-1$, and it is mapped to $y$ by the left branch of $f$. For $-1\le y<1$, there are two options for $x$ since the equation $f(x)=y$ has two solutions. You can start using the right branch of $f$ for all $y\ge-1$, or you can use the left branch for $-1\le y<0$, or you can even use it for $-1\le y<1$. For $y\ge 1$ there is again only one $x$ that is mapped by $f$ to that $y$, and this $x$ is determined by the right branch of $f$.