I have these two exercises for my math-study, and I don't really know how to prove them. Can you help me out?
A) Let f: X $\to$ Y and g: Y $\to$ Z be functions. Show that if g $\circ$ f is injective, then f must be injective.
B) Is it true that g must also be injective?
What I tried by A) so far was this:
Let x and x' be on X. If (g $\circ$ f)(x) = (g $\circ$ f)(x'), then x = x'
And by B) I think the answer is "no", but I can't explain why.
I know this is not much, but it's hard for me because I'm jus a beginner in math. Thanks in advance!