# Conditions on $f$ and $g$ if $(g\circ f)^{-1}$ exists

Consider functions $$f:A\to B$$ and $$g:B\to C$$ $$(A,B,C\subseteq R)$$ such that $$(g\circ f)^{-1}$$ exists, then :

(1) $$f$$ is onto and $$g$$ is one-one

(2) $$f$$ is one-one and $$g$$ is onto

(3) $$f$$ and $$g$$ are both one-one

(4) $$f$$ and $$g$$ are both onto

One of the above options is supposed to be correct but I think for inverse to exist we must have bijection so both (3) and (4) should be correct. I am little confused

• The correct answer is $(2)$. Jul 29, 2021 at 15:27
• Maverick, look at my answer. Do you manage to prove the two claims I wrote ? If you want, I will write the proofs. Jul 29, 2021 at 15:36

It is easy to prove that

$$g\circ f\;$$ is one-one $$\implies f\;$$ is one-one.

$$g\circ f\;$$ is onto $$\implies g\;$$ is onto.

Consequently,

since $$\;\left(g\circ f\right)^{-1}$$ exists, then $$\;g\circ f\;$$ is one-one and onto, hence $$\;f\;$$ is one-one and $$\;g\;$$ is onto.

So the correct answer is $$(2)$$.

Claim 1 :$$\quad g\circ f\;$$ is one-one $$\implies f\;$$ is one-one.

Proof : $$\;$$ Let $$\;a_1\;$$ and $$\;a_2\;$$ be two elements of the set $$\;A\;.$$

$$f(a_1)=f(a_2)\;$$ implies that $$\;(g\circ f)(a_1)=(g\circ f)(a_2)\;$$ and, since $$\;g\circ f\;$$ is one-one, we get that $$\;a_1=a_2\;.$$

So we have proved that $$f(a_1)=f(a_2)\;$$ implies $$\;a_1=a_2\;,\;$$ consequently $$\;f\;$$ is one-one.

Claim 2 :$$\quad g\circ f\;$$ is onto $$\implies g\;$$ is onto.

Proof : $$\;$$ Since $$\;g\circ f\;$$ is onto, it follows that

for any $$\;c\in C\;$$ there exists $$\;a\in A\;$$ such that $$\;(g\circ f)(a)=c\;,$$

consequently,

for any $$\;c\in C\;$$ there exists $$\;b=f(a)\in B\;$$ such that $$\;g(b)=(g\circ f)(a)=c\;,$$

hence $$\;g\;$$ is onto.

• What if you take $A=B=C=\mathbb{R}$ and $f(x)=g(x)=e^x$? Jul 29, 2021 at 17:49
• @MatthewPilling, if $A=B=C=\mathbb R$ and $f(x)=g(x)=e^x$, then $(g\circ f)(x)=e^{e^x}$ is one-one but it is not onto, so there does not exist $(g\circ f)^{-1}$. Moreover, since $(g\circ f)$ is one-one, then $\;f\;$ is one-one too. Jul 29, 2021 at 18:26
• In my example $(g\circ f)^{-1}(x)$ does exist. It's equal to $\ln(\ln(x))$. The problem doesn't indicate that the domain of $(g\circ f)^{-1}$ is all of $C$. In general, the domain of $(g\circ f)^{-1}$ if it exists is equal to $(g\circ f)(A)$ which is a subset of $C$. In my example the domain of $(g\circ f)^{-1}$ is $(1,\infty)$. You should note that $(g\circ f)^{-1}$ exists but $g$ is not surjective. Jul 29, 2021 at 18:39
• $(g\circ f)^{-1}$ exists if $\;C=(1,+\infty)$. In this case, $\;f\;$ is one-one and $\;g\;$ is onto. See the following link: en.wikipedia.org/wiki/Inverse_function#Definitions Jul 29, 2021 at 18:41
• Actually, $\;\ln\big(\ln(x)\big):(1,+\infty)\to\mathbb R\;$ is the inverse function of $\;g\circ f:\mathbb R\to(1,+\infty)\;$, whereas the function $\;g\circ f:\mathbb R\to\mathbb R\;$ is not invertible because it is only one-one but not onto. Jul 29, 2021 at 18:53

Think of the following simple set functions:

$$\{1,2\} \to \{1,2,3\} \to \{1,2\},$$ where the first one sends $$1$$ to $$1$$ and $$2$$ to $$2$$, and the second one sends $$1$$ to $$1$$, $$2$$ to $$2$$ and $$3$$ to $$1$$. The composition is the identity and thus clearly invertible. The functions, though, are not invertible.

You should be able to derive the answer you are looking for from this example.

• The correct answer is $(2)$. Jul 29, 2021 at 15:27