Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was thinking about a function with infinitely many right inverses but I could not come up with anything.
Does there exist a function with infinitely many right inverses?

share|cite|improve this question
"Don't forget the ${}+C$." – Eric Towers Jan 17 at 22:05
up vote 12 down vote accepted

The function $$f:\mathbb{Z}\to \{0,1\}:x\mapsto \left\{\begin{matrix} 0 \text{ if }x \text{ is even}\\ 1\text{ if }x\text{ is odd}\end{matrix}\right.$$has infinitely many right inverses, since it suffices to map $0$ to an even number and $1$ to an odd one.

Another example is $\sin$, for which any function of the form $$t\in [-1,1]\mapsto \arcsin(t)+2k\pi $$with $k\in \mathbb{Z}$ is a right inverse. This also works for other trigonometric functions, of course.

A third example would be the floor function $f:\mathbb{R} \to \mathbb{Z} : x\mapsto \lfloor x\rfloor $; here it suffices to map any $m\in \mathbb{Z}$ to any $r\in [m,m+1[$.

share|cite|improve this answer
Could you please give two more examples? – FreeMind Jan 17 at 13:02
@FreeMind: Asking for "two more examples" is an odd request that strongly suggests someone asked you for three examples. Could you please clarify? – Andrew D. Hwang Jan 17 at 14:37
@FreeMind Do you understand how Arnaud D. created the above two examples? If not, I would ask him for clarification. – PyRulez Jan 17 at 15:39

You need to find a function $f:S\to T$ which is:

  • surjective (so that a right inverse exists)
  • so that there are infinitely many right inverses, either
    • for which there is some $y\in T$ with $f^{-1}(y)$ an infinite set
    • or for which there are infinitely many $y\in T$ with $\#f^{-1}(y) \ge 2$

Any function with these two properties will have infinitely many right inverses. A simple example is the trivial function $$f:\mathbb N\to \{0\}$$ for which the map $$i_n:\{0\}\to\mathbb N\\0\mapsto n$$is a right inverse for every $n\in\mathbb N$.

share|cite|improve this answer
Indeed, with that method you can easily show that the set of right inverses can have any cardinality, by just replacing $\mathbb N$ with a set of the desired cardinality. – celtschk Jan 17 at 14:17
+1 I have to give kudos for having the simplest example possible! – Cort Ammon Jan 17 at 18:45
To be precise, this $f$ does not have to be like that. Instead of the second bullet, you may simply have infinitely many points with non-singleton preimages (e.g. the projection onto ${\bf N}$ of $\{1,2\}\times {\bf N}$). In this case, there will be at least continuum many right inverses (assuming axiom of choice ;) ). (But you must have one of the two.) – tomasz Jan 18 at 12:01
@tomasz thanks for that. I have edited the answer to include this. – Mathmo123 Jan 18 at 12:17

For another example let $X$ be any infinite set, and let

$$f:X\times X\to X:\langle x,y\rangle\mapsto y\;.$$

For each $x\in X$ let

$$g_x:X\to X\times X:y\mapsto\langle x,y\rangle\;.$$

Then $g_x$ is a right inverse for $f$ for each $x\in X$. This is one of the most natural constructions. It can be generalized by letting $Y$ be any non-empty set, replacing each instance of $X\times X$ by $X\times Y$, and replacing the range of $f$ and the domain of the functions $g_x$ by $Y$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.