# Bijective proof check

I have been given the problem: "Say $$f:X→Y$$ and $$g:Y→Z$$are functions so that $$g◦f:X→Z$$ is bijective and $$f$$ is surjective. Can you deduce that $$g$$ is bijective?

My proof went as follows, I am not sure if this is valid?



Since $$f$$ is surjective then for any $$y\in Y$$ there exists and $$x \in X$$ such that $$f(x)=y$$ and $$gf$$ is bijective so it is surjective and injective so holds for: $$g(f(x))=z$$for any $$x$$ and $$gf(x_1)=g(f(x_2)) \Rightarrow x_1=x_2$$

Then since we know $$gf$$ is surjective so $$gf(x)=z$$, since $$f(x)=y$$, then $$g(y)=z$$, so for any $$z \in Z$$ there exists $$y \in Y$$ such that $$g(y)=z$$, so $$g$$ is surjective.

Finally we say $$x_1=x_2$$ and call $$h=gf$$. Since $$h$$ is injective and surjective $$h(x_1)=h(x_2), g(f(x_1))=g(f(x_2))$$. Since we know that $$f$$ is surjective so $$f(x)=y$$ then $$g(y_1)=g(y_2)$$ so it is injective. Then since we have proven $$g$$ is both injective and surjective then it is bijective.

• you can use single dollar symbols $ to enclose inline math, like this $z \in Z$ :$z\in Z$. Please update formatting. – Lærne Mar 19 at 20:44 • Will change now thank you – Olly Reynolds Mar 19 at 20:47 ## 2 Answers I don't believe you've proven injectivity of $$g$$. What you need to prove is that if for $$y_1, y_2 \in Y$$ you have $$g(y_1) = g(y_2)$$, then you have $$y_1 = y_2$$. What you've proven is something weird starting from $$x_1 = x_2$$, and deduced $$f(x_1) = y_1 = y_2 = f(x_2)$$ and $$g\circ f(x_1) = z_1 = z_2 = g \circ f(x_2)$$ or something ? Which are obvious since both $$f$$ and $$h$$ are pure function, hence must send the same value to the same value regardless of their label in the latin or greek alphabet. What I would do, though, is use the fact than bijective functions are also inversible. That is, there is a $$h^{-1}$$ such that $$h \circ h^{-1}(z) = z$$ and $$h^{-1} \circ h (x) = x$$ (prove it if you don't know that yet). Then if you have $$g(y_1) = g(y_2)$$ then you have $$h^{-1}\circ g(y_1) = h^{-1}\circ g(y_2)$$. I'll let you figure out the proper and complete proof. • Thank you, i will look at it now! – Olly Reynolds Mar 19 at 21:02 • How did you get$h^{-1}\circ g(y_1) = h^{-1}\circ g(y_2)$? – Olly Reynolds Mar 19 at 21:06 • would you mind completing the proof? – Olly Reynolds Mar 19 at 21:44 • Hum... if$z_1 = z_2$, then obviously$h^{-1}(z_1) = h^{-1}(z_1)$else$h^{-1}$would be a ill-defined function. If the values are the same, then the function must send them to the same image value ! In this case we have$z_1$to be$g(y_1)$... and likewise$z_2$is$g(y_2)\$. I still believe you can complete the proof on your own. – Lærne Mar 20 at 15:18

You can prove it more easily(I think much more) by using RAA argument. That is, first suppose that gf is not bijective and lead a contradiction from the supposition and the fact that f is a "surjective" "function".