# If $f$ and $g$ are surjective, then $g(f(x))$ is surjective

[Lay, Analysis With An Introduction to Proof, 4th edition]

7.19 THEOREM Let $f:A\to B$ and $g:B\to C$. Then

(a) If $f$ and $g$ are surjective, then $g\circ f$ is surjective.
(b) If $f$ and $g$ are injective, then $g\circ f$ is injective.
(c) If $f$ and $g$ are bijective, then $g\circ f$ is bijective.

Proof:

(a) Since $g$ is surjecive, $\operatorname{rng}\,g=C$. That is, for any $c\in C$, there exists $b\in B$ such that $g(b)=c$. Now since $f$ is surjective, there exists $a\in A$ such that $f(a)=b$. But then $(g\circ f)(a)=g(f(a))=g(b)=c$, so $g\circ f$ is surjective.
(b) See Exercise 7.19.
(c) Follows form parts (a) and (b). ♦

Why exactly is $g \circ f$ surjective?

• Funnily enough, as it presently is, this question does not comply with today's MSE's standards (no effort, no context, etc). – Git Gud Sep 24 '16 at 23:06
• What part of the proof are you having trouble understanding? In my reading, the image you posted contains a complete and detailed proof directly from the definition of surjective. – Mike Haskel Sep 24 '16 at 23:06
• @MikeHaskel The last part. The proof in the book said out of nowhere that $g(f(x))$ is surjective, something introduced only a few seconds ago so I had to go back to the definition of surjective. Serves me right for reading into a proof without giving it some thought first, I guess – BCLC Sep 24 '16 at 23:38
• You show no evidence of not understanding this question and you posted an answer within minutes of posting the question. So why are you wasting our time with it. Hence my vote to close. – Rob Arthan Sep 24 '16 at 23:38
• @RobArthan I didn't understand why $g(f(x))$ is surjective right away so I thought about it further and wanted to clarify if it was right through posting an answer – BCLC Sep 24 '16 at 23:40

Here is what I tried:

$g \circ f: A \to C$

Surjective means range$(g \circ f) = C$, i.e., $$\forall c \in C, \exists a \in A \ \text{s.t.} \ g(f(a)) = c$$

So given some $c \in C$, we have to find some $a \in A \ \text{s.t.} \ g(f(a)) = c$.

Given some $c \in C$, we know from $g$ being surjective that $\exists b \in B \ \text{s.t.} \ g(b) = c$

Now $B$ is not only the domain of g and codomain of $f$ but also the range of $f \because f$ is surjective. Hence, $\exists a \in A$ s.t. $f(a)=b$

$$\to \exists a \in A \ \text{s.t.} \ g(f(a))=g(b)$$

$$\to \exists a \in A \ \text{s.t.} \ g(f(a))=c$$

Thus, we have proven that given any $c \in C, \exists a \in A \ \text{s.t.} \ g(f(a)) = c$, namely it is an (but not the) $a \in A$ s.t. $f(a) = b$.

• Having said what I did in a comment to the question, this answer deserves my up vote. – Git Gud Sep 24 '16 at 23:07
• Sounds fine. I'm having a hard time understanding why you doubted your comprehension. – fleablood Sep 24 '16 at 23:09
• @fleablood Thanks! ^-^ The proof in the book said out of nowhere that $g(f(x))$ is surjective, something introduced only a few seconds ago so I had to go back to the definition of surjective. Serves me right for reading into a proof without giving it some thought first, I guess – BCLC Sep 24 '16 at 23:37
• @GitGud Lol thanks ^-^ – BCLC Sep 24 '16 at 23:37