# Prove that $g$ is injective or surjective

I have two questions which are related to mappings as follow:

Given 3 sets E, F, and G such that $$f: E \rightarrow F, g: F \rightarrow G$$ are two mappings. Prove that:

a. If $$g \circ f$$ is injective and $$f$$ is surjective then $$g$$ is injective.

b. If $$g \circ f$$ is surjective and $$g$$ is injective then $$f$$ is surjective.

For these two problems. I have solved halfway for each.

For the problem (a), I have proved that $$f$$ is bijective.

For the problem (b), I have proved that $$g$$ is bijective.

I don't know how to do next because I don't find the relation to conclude.

• Do you know that the composition injective functions is injective, and the composition of surjective functions is surjective? Jul 12, 2020 at 2:37
• @user804886 Oh I see, is that the next step to solve? Jul 12, 2020 at 2:37
• I can see one way of finishing the proof using these facts, yes. Jul 12, 2020 at 2:38
• @user804886 Thank you, I think it is right to solve this Jul 12, 2020 at 2:39

In part a, because $$g \circ f$$ is injective and $$g^{-1}$$ (which exists, since $$g$$ is bijective) is injective, we therefore have $$f = g^{-1} \circ (g \circ f)$$ is the composition of injective functions, which hence makes it injective. Part b can be solved dually.