Injective, surjective and bijective functions

I'm attempting the following proof, I need help in the last part and any recommendation is important for me, I appreciate the help:

$$2.$$ Suppose that $$f\colon A\to B$$ and $$g\colon B\to C$$ are functions.
Prove that if $$g\circ f$$ is injective, then $$f$$ is injective. Prove that if $$g\circ f$$ is surjective, then $$g$$ is surjective. Conclude that if $$g\circ f$$ is bijective, then $$f$$ is injective and $$g$$ is surjective

\begin{align*} \forall x,y\in A &\implies g(f(x)=g(f(y))) \\ &\implies (g\circ f)(x)=(g\circ f)(y) \\ &\implies x=y \end{align*}

$$\therefore$$ $$f$$ is injective

Suppose that $$c\in C$$ $$\exists b\in B$$ $$g(b)=c$$. $$(g\circ f)(b)=c$$ hence $$g(f(b))=c$$. So $$g$$ is injective.

• You know that $g \circ f$ is injective and you want to prove that $f$ is injective. So take $x,y \in A$ such that $f(x) = f(y)$. The goal is to prove that $x = y$. Now apply $g$ to both sides of the equation $f(x) = f(y)$. What can you conclude? Jun 1 '21 at 19:38
• Please don't use images. They cannot be searched, they do not adapt to different displays, and screen readers cannot read them so that readers who use them cannot access your post. Jun 1 '21 at 19:39
• Please, excuse me, I'm new in this platform. Can you indicate how I can to write language LaTeX @ArturoMagidin? thanks Jun 1 '21 at 20:15
• Here's a link to the MathJax tutorial. If you know LaTeX, it will be very easy to pick up. Jun 1 '21 at 20:17
• Your argument suffers from many issues. For example, in the first part, you are trying to show that $f$ is injective, but you never assume that $f(x)=f(y)$... at least, not explicitly. That makes it seem like you are just using the fact that $g\circ f$ is injective to prove... that $g\circ f$ is injective. The second part is a mess: if $g(b)=c$, then $b\in B$; but then $g\circ f(b)$ doesn't even make sense: you can't evaluate $g\circ f$ at an element of $B$: the domain is $A$. So while the first part is at best unclear and incomplete, the second part is wholly incorrect. Jun 1 '21 at 20:38

You would be better off writing more English and fewer symbols. I don't know what you're trying to say when you write $$\forall x,y \in A \Rightarrow g(f(x)) = g(f(y))$$.

To prove that if $$g \circ f$$ is injective then $$f$$ is injective, start by writing: "Suppose $$g \circ f$$ is injective. Let $$x,y \in A$$ be arbitrary and assume that $$f(x) = f(y)$$." Now you have to prove that $$x = y$$.

To prove that if $$g \circ f$$ is surjective then $$g$$ is surjective, start by writing: "Suppose $$g \circ f$$ is surjective. Let $$c \in C$$ be arbitrary." Now you have to prove $$\exists b \in B(g(b) = c)$$.

• You are right with the first observation but how would you do the proof for the first part of the injectivity of f? illustrate me please Jun 1 '21 at 20:24
• If $f(x) = f(y)$ then $doingwhatevertheheckwewantto(f(x)) = doingwhatevertheheckwewantto(f(y))$. So $g(f(x)) = g(f(y))$ and as $g\circ f$ is injective...... Jun 1 '21 at 20:33

I don't think you actually meant to write

$$\forall x, y \in A \implies g(f(x)) = g(f(y))$$.

That's clearly not true and not what you meant to say at all. That would mean that every possible pair of $$x,y$$ that no matter what $$g(f(x)) = g(f(y))$$. Always. Which is not that case. Suppose $$f(x) = x^3$$ and $$g(x) = x+5$$. Then $$g\circ f(x) = x^3 + 5$$ where is injective. But obviously we don't have $$g(f(7)) = g(f(2))$$.

I think what you meant to write was

$$\forall x, y \in A;$$ then $$g(f(x)) = g(f(y)) \implies g\circ f(x) = g\circ f(y) \implies x = y$$.

(That is IF $$g(f(x)) = g(f(y))$$ then $$x = y$$ but not whenever $$g(f(x)) \ne g(f(y))$$. In our example $$g(f(a)) = a^3 + 5$$ is equal to $$g(f(b)) = b^3 = 5$$ then $$a^3 + 5 = b^3 +5$$ so $$a^3 = b^3$$ and so $$a = b$$.)

But that does NOT mean $$f$$ is injective! You need to prove that if $$f(x) = f(y)$$ that $$x = y$$. You showe that if $$g(f(x)) = g(f(y))$$ then $$x = y$$ but you have no reason to assume that $$f(x) = f(y)$$ in this case. Nor that these represent all cases where $$f(x) = f(y)$$.

That is.... you have not considered the cases where:

1. $$g(f(x)) = g(f(y))$$ but $$f(x) \ne f(y)$$.

nor did you consider the cases where

1. $$f(x) = f(y)$$ but $$g(f(x)) \ne g(f(y))$$.

Can you either discuss those cases? Or show those cases can't ever happen? Or come up with a different argument where those cases don't come up? One that starts by assuming $$f(x) = f(y)$$ and ends with showing $$x = y$$....

Discuss those cases:

Case 1: If $$g(f(x)) = g(f(y))$$ then $$x = y$$ because $$g\circ f$$ is injective. And if $$x = y$$ the whatever we do to $$x$$ is the same thing as doing it to $$y$$ so $$f(x) = f(y)$$. But that's always the case. $$x = y \implies h(x) = h(y)$$ for all functions. But the reverse $$f(x) = f(y)\implies x = y$$ need not be true.

Case 2: Case two is sort of silly. If $$f(x) = f(y)$$ then they are the same thing. A whatever we do to them will have the same result. So if $$f(x) = f(y)$$ then $$g(f(x)) = g(f(y))$$. But does that imply $$x = y$$? That's what we have to show.

Come up with a different argument.

Suppose $$f(x) = f(y)$$. Then $$g(f(x)) = g(f(y))$$. But we know $$g\circ f$$ is injective. So $$g(f(x)) = g(f(y)) \implies x= y$$. So .....

$$f(x) = f(y) \implies$$
$$g(f(x)) = g(f(y)) \implies$$
$$x = y$$ and therefore $$f$$ is injective.

• Must I necessarily consider all cases? I thought the demonstration was easier Jun 2 '21 at 3:03
• I would like to know of how one goes from f(x)=f(y) . Then g(f(x))=g(f(y)) Jun 2 '21 at 4:45
• 1) No you do not need to consider the cases. I was critiquing your work and pointing out way your reasoning was making unwarranted asssumption. Jun 2 '21 at 15:38
• 2) if $f(x) = f(y)$ then they are the same thing. SO whatever you do to one will have the same result as doing it to the other. If $f(x) = f(y)$ then $f(x) + 5 = f(y) + 5$. If $f(x)=f(y)$ then $\sqrt{f(x)}^\pi -f(x) = \sqrt{f(y)}^\pi -f(y)$ and "$f(x)$ chased by a bunch of crocodiles" = "$f(y)$ chased by a bunch of crocodiles". So taking $f(x)$ and tossing it into the $g()$ function is the same thing as taking $f(y)$ and tossing it into the $g()$ function .... because $f(x)$ and $f(y)$ are the same thing. Jun 2 '21 at 15:38