[Math] Help with identity functions in discrete mathematics

discrete mathematicsfunctions

I have trouble with trying to solve the following problem:

For nonempty sets $A$ and $B$ and functions $f:A\rightarrow B$ and $g:B\rightarrow A$ suppose that $g\circ f=i_A$, the identity function on A.

a) Show that $f$ is not necessarily surjective.

b) Show that $g$ is not necessarily injective.

c) Prove that $f$ is surjective if and only if $g$ is injective.

I have trouble getting started, thus I don't have much work here so I apologize for that. I just started on this subject today and have trouble grasping everything right now and would appreciate any help.

Best Answer

Hints:

a) Set $f(x) = x$ and use sets such that $A \subsetneq B$, e.g. $\mathbb{N}$ and $\mathbb{Z}$.

b) See a).

c) Suppose that $g$ is not injective, then there exist $b_1 \neq b_2$ such that $g(b_1) = g(b_2)$. Suppose that $f$ is surjective, that is, there exist $a_1 \neq a_2$ such that $f(a_i) = b_i$. We obtain contradiction between $a_1 = (g \circ f)(a_1) = (g \circ f)(a_2) = a_2$ and $a_1 \neq a_2$. Proceed with the other direction similarly.

I hope this helps $\ddot\smile$