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

Give examples of functions $f\colon X\to Y$ and $g\colon Y\to X$ such that $g\circ f=id_X$ but where $f$ is not invertible. At first I thought I could simply make $f(x)=x^2$ and $g(x)=\sqrt{x}$ but then I realized that their composition would yield $+x$ and $-x$, not simply $x$. I'm not sure I really understand what it's asking anymore.

share|cite|improve this question

HINT: If $g\circ f=\mathrm{id}_X$, then $f$ must be one-to-one. Thus, $f$ can fail to be invertible only by failing to map $X$ onto $Y$. Can you find an example with $X=\{0\}$ and $Y=\{0,1\}$?

share|cite|improve this answer
I honestly don't really understand what that means. – Gail Nov 29 '12 at 14:35
@Gail: Which part? The explanation of why $f$ must be one-to-one but not onto, or the final suggestion for finding an example? I can add a bit to the latter: let $f$ be any function from $X$ to $Y$ and $g$ any function from $Y$ to $X$, and you’ll have an example. – Brian M. Scott Nov 29 '12 at 18:36

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.