[Math] Creating a composite function that is injective with an injective and a non-injective part

function-and-relation-compositionfunctions

Find an example of functions $f:A\to B$ and $g:B\to C$ such that $f$
and $g\circ f$ are both injective, but $g$ is not injective.

So If I understand this correctly,

  1. Need a function $f$ that is injective and that will also make $g$ injective when plugged in during $g\circ f$.
  2. Need a function $g$ that is not injective on its own
  3. The range of $f$ must be a subset of the domain of $g$

I tried thinking along the lines of using variations of $f(x)=x$ and $g(x)=x^2$ but all those leave my composite function as non injective

I've also been using $x\in\Bbb R$ so as to keep the range of $f$ and domain of $g$ the same.

Any suggestions of where to go with this? Thank you

Edit:
Thank you everyone the answers were very helpful in understanding the problem and concepts better

Best Answer

Hint. Let's take $g:{\Bbb R}\to{\Bbb R}$ with $g(x)=x^2$ as you suggested - a good, simple, well-known function which is not one-to-one. Suppose we want $f:{\Bbb R}\to{\Bbb R}$ also.

To say $g\circ f$ is one-to-one means: if you know the value of $g(f(x))$ then you know the value of $x$ - that is, know it for sure, with only one possibility. So, suppose the value of $g(f(x))$ is given. We have $$g(f(x))=(f(x))^2\ ;$$ a good way to proceed from here would be [1] find the value of $f(x)$, then [2] find the value of $x$. Step [2] is easy as $f$ is supposed to be one-to-one. The problem is that step [1] would usually give you two values of $f(x)$.

But now suppose, for example, that $f(x)$ is always positive. Then step [1] gives a definite value of $f(x)$ and all is OK.

So - can you think of a (well known) one-to-one function $f:{\Bbb R}\to{\Bbb R}$ for which $f(x)$ is always a positive number?

Hope this doesn't sound too long-winded but I am hoping to illustrate how you can think about this kind of problem.

Related Question