# $g \circ f$ surjective and $f \circ g$ injective $\implies$ $f$ and $g$ are bijections

Let $f : A \to B$ and $g: B \to A$ be functions. Show that $g \circ f$ surjective and $f \circ g$ injective $\implies$ $f$ and $g$ are bijective.

My attempt:

Suppose $g(x) = g(y)$. Then $f(g(x)) = f(g(y))$ so that $x = y$ by injectivity of $f \circ g$.

Now let $y \in A$. By sujectivity of $g \circ f$, there exists $x \in A$ such that $g(f(x)) = y$. But $z = f(x) \in A$ so we have $g(z) = y$ and hence $g$ is surjective.

I have that $g$ is bijective but I am stuck with proving that $f$ is bijective.

• when $g(x)=g(y)$ how you are able to write $f(g(x))=f(g(y))$ without knowing that $f$ is Injective? Nov 27, 2015 at 3:19
• @EkaveeraKumarSharma If $a=b$, then $f(a)=f(b)$ for any function, injective or not. Nov 27, 2015 at 3:22
• @MathMajor I believe you mean that that you still need to prove that $f$ is injective and $g$ surjective. Nov 27, 2015 at 3:23
• ya if $f$ is injective, then if $a=b$ $f(a)=f(b)$. but here a priori we do not know $f$ is injective Nov 27, 2015 at 3:24
• No, injectivity is not needed. If $a=b$ but $f(a)\ne f(b)$ then $f$ would not be a function. Nov 27, 2015 at 3:25

Hint: You have that $g$ is bijective. Use the following facts about bijective, injective and surjective functions:

• Every bijective function $h: C \to D$ has an inverse $h^{-1}: D \to C$ so that $h \circ h^{-1} = id_D$ and $h^{-1} \circ h = id_C$.
• If you compose a bijective function with an injective function (in either order), you get an injective function.
• If you compose a bijective function with a surjective function (in either order), you get a surjective function.
• I made a mistake in my question, I do not yet know if $f$ or $g$ are bijective. Nov 27, 2015 at 3:37
• I don't see anything wrong with your proof that $g$ is injective and surjective... ? Nov 27, 2015 at 3:39
• You said that I have $g$ and $g \circ f$ as bijective, why? Nov 27, 2015 at 3:40
• You know that $g\circ f$ is bijective and you've shown that $g$ is bijective. Let $h=g\circ f$, then $f=g^{-1}\circ h$ is a composition of bijective functions. Nov 27, 2015 at 3:40
• I'm not sure how Tim managed to convince you that you hadn't proved that $g$ was bijective. What you wrote was literally a proof that $g$ is injective followed by a proof that $g$ is surjective. Nov 27, 2015 at 3:41

since $gof$ is Surjective for every $y \in A$ $\exists$ $x \in A$ such that

$$gof(x)=y$$ $\implies$

$$g(f(x))=y \tag{1}$$

But since we know that $g$ is surjective, for every $y \in A$ $\exists$ $z \in B$ such that

$$g(z)=y \tag{2}$$ Using $(2)$ in $(1)$ we get

$$g(f(x))=g(z)$$ But since $g$ is Injective

$$f(x)=z$$ which proves $f$ is Surjective.

• How would i sh ow that $f$ is injective? Nov 27, 2015 at 4:20
• working on it please give me some time Nov 27, 2015 at 4:25
• Let $g(x)=a$ and $g(y)=b$. Assuming $fog(x)=fog(y)$, since $fog$ is Injective it means $x=y$ $\implies$ $g(x)=g(y)$ i.e., $a=b$. But my assumption is $f(g(x))=f(g(y))$ i.e., $f(a)=f(b)$. Finally if we assume $f(a)=f(b)$ we ended up with $a=b$. so $f$ is Injective. Nov 27, 2015 at 4:36
• @MathMajor: Do you see why showing that $f(g(x))=f(g(y))\implies g(x)=g(y)$ is enough to prove that $f$ is injective? There is a key point that Ekaveera neglected to mention. Nov 29, 2015 at 4:16

Use the following facts to do your heavy lifting:

Proposition A. Given functions $g : Z \leftarrow Y$ and $f : Y \leftarrow X$...

1. If $g \circ f$ is surjective, then so too is $g$.

2. If $g \circ f$ is injective, then so too is $f$.

The proof is left as an exercise for the reader.

Proposition B. Given a function $f : Y \leftarrow X$ and a pair of isomorphisms $$\beta : Z \leftarrow Y \qquad \alpha : X \leftarrow W,$$ we have:

1. The following are equivalent:

$f$ is surjective, $\qquad$ $\beta \circ f$ is surjective, $\qquad$ $f \circ \alpha$ is surjective

2. The following are equivalent:

$f$ is injective, $\qquad$ $\beta \circ f$ is injective, $\qquad$ $f \circ \alpha$ is injective

Once again, the proof is left as an exercise for the reader.

Let us now turn our attention to your problem.

Claim. Given functions $q : A \leftarrow B$ and $p : B \leftarrow A$, if $q \circ p$ is surjective and $p \circ q$ is injective, then $q$ and $p$ are isomorphisms.

Proof. From A1 and the surjectivity of $q \circ p$, we deduce that $q$ is surjective. From A2 and the injectivity of $p \circ q$, we deduce that $q$ is injective. Hence $q$ is an isomorphism.

From B1 and the surjectivity of $q \circ p$, we deduce that $p$ is surjective. From B2 and the injectivity of $q \circ p$, we deduce that $p$ is injective. Hence $q$ is an isomorphism. QED

• Out of curiosity, how would you put the notational expression "$g:Z\leftarrow Y$" in words? Nov 29, 2015 at 4:18
• @CameronBuie I tend to verbalize it "$g$ mapping into $Z$ from $Y$." For example I would read "Let $g$ denote a function $Z \leftarrow Y$" as "Let $g$ denote a function mapping into $Z$ from $Y$." Nov 29, 2015 at 4:44
• My thanks! I am unused to seeing the arrow go to the left, so I was curious. Nov 29, 2015 at 5:03
• @CameronBuie, no worries. This is a very uncommon convention, of course, but perhaps the benefits outweigh the costs. Nov 29, 2015 at 9:38