7

Is it possible that there are functions $f(x)$ and $g(x)$ where $f(g(x)) = x$ and $g(f(x))$ does not equal $x$? If so, is there a pattern or general rule for them? If not, what is the proof that there is not? This originated when a math teacher said that in order for $g$ of $x$ to be the inverse of $f$ of $x$, it must be that both $f\circ g$ and $g \circ f$ equal $x$, and a student asked if one of these cases exists.

2 Answers2

15

There are many examples of this. In such cases, $f$ is called a left inverse of $g$, in contrast to a full (two sided) inverse. To give one example, consider $g \colon [0,\infty) \to \mathbf R$ given by $g(x) = \sqrt x$ and $f \colon \mathbf R \to [0,\infty)$ given by $f(x) = x^2$. We have $$ f\bigl(g(x)\bigr) = \sqrt{x}^2 = x, \qquad x \in [0,\infty) $$ and $$ g\bigl(f(x)\bigr) = |x|, \qquad x \in \mathbf R. $$ So $f \circ g$ is the identity, where $g \circ f$ is not.

martini
  • 84,101
2

Another example is the logarithm, which has branches in the complex plane. Let $$L(x)=\log(x)+ 2 \pi Î$$ then $$\exp(L(x))=x$$ but $$L(\exp(x))=x+2 \pi Î$$