Is $f(g(x))=x$ a sufficient condition for $g(x)=f^{-1}x$?

107 Views Asked by At

I am asking that is $f(g(x))=x$ a sufficient condition for $g(x)=f^{-1}x$ (but I only want $f(x)$ to be an algebraic function)? At school I am learning about inverse functions and my teacher said that to check if a function $g(x)$ is the inverse function of $f(x)$, I need to check if both $f(g(x))=x$ and $g(f(x))=x$. However, I think that just $f(g(x))=x$ is enough to prove that $g(x)$ is the inverse function $f^{-1}x$. Is it true that I must check for both?

A possible duplicate may be $f(g(x))=x$ implies $f(x)=g^{-1}(x)$, but that person is asking if $f(g(x))=x \implies f(x)=g^{-1}(x) \wedge f^{-1}(x)=g(x)$, not if $f(g(x))=x \implies g(x)=f^{-1}x$.

3

There are 3 best solutions below

0
On BEST ANSWER

This is not sufficient. Let $f:\mathbb R\to\mathbb Z$ be $z\mapsto \lceil z\rceil$ and $g:\mathbb Z\to\mathbb R$ be the identity. Clearly, $f(g(z))=z$ for all $z\in\mathbb Z$, but $g(f(z))\neq z$ when $z=\frac12$.

Even if the functions have the same domain and codomain, this still may not be true. Consider @TedShifrin's example from this question, where $f,g:\mathbb R\to\mathbb R$\begin{align*} g(x) &= \dfrac{x}{1+|x|} \\ f(x) &= \begin{cases} \frac{x}{1-|x|}\, & |x|<1 \\ 0 & |x|\ge 1 \end{cases}\,. \end{align*}

Edit: OP asked for an algebraic answer, so here's one: let $f:\mathbb R\to\mathbb R^0=\{x\in\mathbb R\mid x\geq0\}$, and $g:\mathbb R^0\to\mathbb R$ as follows.$$f(x)=x^2$$$$g(x)=\sqrt x$$(where $\sqrt{}$ returns non-negative values)

$$$$

1
On

No, it's not enough. Consider a function $f: \mathbb{R}^2 \to \mathbb{R}$, $f(x, y) = x$, and $g: \mathbb{R} \to \mathbb{R}^2$, $g(x) = (x, 0)$. You have $f(g(x)) = x$ for any $x \in \mathbb{R}$, but it is not true that for any $z \in \mathbb{R}^2$, $g(f(z)) = z$.

0
On

Here's an example where $f: \mathbb R \to \mathbb R$ is a polynomial and $g:\mathbb R \to \mathbb R$.

$$ f(x) = x^3 - 3 x$$ $g(y)$ is the greatest real root of $x^3 - 3 x = y$. Note that there is just one real root if $y<-2$ or $y>2$, and there are three if $-2 < y < 2$. The graph of $g$ looks like this:

enter image description here

Then $f(g(y)) = y$ for all real $y$, but $g(f(x))$ is not always $x$: indeed it can't be $x$ if $-2 < x < 1$, because such $x$ are not in the range of $g$.