Show that if $f: X \rightarrow Y$ and $g: Y \rightarrow Z$ are injective, the $g \circ f$ is injective. 
Show that if $f: X \rightarrow Y$ and $g: Y \rightarrow Z$  are injective, the $g \circ f$ is injective. 


Firstly, we have $g \circ f:X \rightarrow Z $. If $g \circ f$ is injective,  suppose $(g \circ f)(x) = (g \circ f)(x')$ where $ x, x' \in X$. Then, $(g \circ f(x)) = (g \circ f(x'))$. From this it can be concluded $g(y) = g(y')$ where $y, y' \in Y$ . Since $g$ is injective we have $y = y'$. Hence, $g \circ f$ must also be injective. $\square $
Is this proof acceptable?
 A: You are making a mistake. The proper way to do it is as follows:
Suppose $g\circ f(x)=g\circ f(x')$. Then, by definition, $g(f(x))=g(f(x'))$. Since $g$ is injective, we have that $f(x)=f(x')$. Since $f$ is injective, the latter implies that $x=x'$, but this is what we needed to show, so we're done.
A: The clause "if $g\circ f$ is injective" is wrong; it is what to be proved.
Take out this clause and begin your proof with just "suppose $g\circ f(x) = g\circ f (x')...$". Then it would be okay to read.
If you are after something more meticulous, then I would say you should familiarize yourself with the use of math quantifiers (for all, there is some, there is exactly one, ...).
A: Your proof has multiple flaws.

First of all, you say "if $g\circ f$ is injective", and that's a very bad way to start a proof. You aren't allowed to suppose that $g\circ f$ is injective, you have to prove that it is. 
Using your method, I can say "if I am a martian, then I am a martian", but that doesn't really prove anything.

Second, you use the expression $y$ and $y'$ without defining what $y$ is.

Third, you don't explain how $y=y'$ implies that $g\circ f$ is injective. What you have to prove is that $x=x'$!
A: Suppose there are $x,\ x' \in X$ such that $g(f(x)) = g(f(x'))$. By the injectivity of $g$, necessarily $f(x) = f(x')$ and by the injectivity of $f$, we get $x = x'$ like we wanted to. This means that the composition is injective.
