Injection and surjection over reals such that the composite are neither injection or surjection

264 Views Asked by At

Can you give me an example of two functions $f:\mathbb{R}\rightarrow \mathbb{R}$ and $g:\mathbb{R}\rightarrow \mathbb{R}$ such that $$f\text{ is injective}\quad\text{and}\quad g\mbox{ is surjective}$$ but the composite $g\circ f$ is neither injective or surjective?.

In addition, if we have to injections $f:A\rightarrow B$, $g:B\rightarrow A$ how can I define a bijection between $A$ and $B$, I think that $h(x)=f(x)$ works for injection but I don't know how to write clear the surjectivity, I belive that given $b\in B$, it's enough to choose $a=g(b)$ but I don't know how to prove it correctly.

2

There are 2 best solutions below

1
On BEST ANSWER

Hint. An example of function $g:\mathbb{R}\rightarrow \mathbb{R}$ such that $g$ is surjective (but not injective) is $$g(x)=x(x-1)(x+1)=x^3-x.$$

Are you able to find an injective function $f$ (not surjective) such that the $g\circ f$ is neither injective or surjective?

1
On

Let $f:\mathbb R\to\mathbb R$ be an injective function with $\mathsf{im}f=(-1,1)$ (there are plenty).

Let $g:\mathbb R\to\mathbb R$ be prescribed by $x\mapsto0$ if $x\in(-1,1)$, $x\mapsto x-1$ if $x\geq1$ and $x\mapsto x+1$ if $x\leq-1$.

Then $g$ is surjective and $g\circ f$ is constant.