I found a constant function $$f(x) = \frac{x-2}{2-x} = (-1)$$ and here we can see that $f(x)$ is defined for every value of $x$ except 2.
Therefore,$$\mathbb{dom}(f(x)) = \mathbb{R} - \{2\}$$ And for range of $f(x)$ $$ \mathbb{range}(f(x)) = -1$$ Now, $$f(x) = \frac{x-2}{2-x}=y$$ $$ x = g(y) = \frac{2y+2}{y+1} = 2$$ And $g(y)$ is defined for all values of $y$ except $(-1)$.
Therefore$$\mathbb{dom}(g(y)) = \mathbb{{R}} - \{-1\}$$ And $$ \mathbb{range}(g(y)) = 2$$ Thus we can conclude that range of $g$ is that value which is not in domain of $f$ and range of $f$ is that value which is not in domain of $g$.
So is this correct as I observed this for functions that cancel out and become a constant function.
Any help would be appreciated.

  • 1
    $\begingroup$ Could you please explain that what do you mean with if a function is not 1-1 and onto $\endgroup$ Oct 5, 2021 at 5:49
  • 2
    $\begingroup$ It looks like you are solving for the inverse of a function that does not have an inverse, which is why you are getting a strange result. $\endgroup$ Oct 5, 2021 at 9:15

1 Answer 1


What you wrote is all correct.

The point is, I guess, that both $f\circ g$ and $g\circ f$ have empty domain.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .