Show that $g \circ f$ has an inverse $g \circ f$
Let $f: A\rightarrow B$ and $g: B \rightarrow C$ have an inverse. Show that $g \circ f$ has an inverse.
One way I think on how to do this is by showing that it is a bijective function.
So for ease of use I've called $g \circ f = h(x)$ (don't know if im allowed to do this in algebra)
Injective:
Choose $x_1, x_2$ such that $h(x_1) = h(x_2)$
$x_1 = h^{-1}(h(x_1)) = h^{-1}(h(x_2)) = h^{-1} \circ h(x_2) = x_2$
Surjective:
For any $y ∈ Y$ we choose $x=h^{-1}(y)∈X$,
$h(x) = h(h^{-1}(y)) = h \circ h^{-1}(y) = y$
Is this correct?
 A: A more convenient way would be to make the claim that: $f^{-1}\circ g^{-1}$ is the inverse of $g\circ f$. And we prove this claim thus:
Note that $f$ and $g$ have inverses: $f^{-1}$ and $g^{-1}$ resp, so $f\circ f^{-1} = f^{-1}\circ f = Id$ and $g\circ g^{-1} = g^{-1} \circ g = Id$. And $f^{-1} : B\rightarrow A$ and $g^{-1} : C\rightarrow B$. Then $f^{-1}\circ g^{-1} : C\rightarrow A$ is well defined as it is a composition of two maps. In particular, note the following;
$$ (g\circ f) \circ (f^{-1}\circ g^{-1}) = g\circ (f\circ f^{-1})\circ g^{-1} = g\circ (Id)\circ g^{-1} = g\circ g^{-1} = Id $$
The last result holds by associativity of composition of maps.
Similarly, one gets that $$ (f^{-1}\circ g^{-1}) \circ (g\circ f) = Id $$
And the claim follows.
A: Let us call $(g\circ f)(x)=h(x)$. Since $f,g$ have an inverse, $(f^{-1}\circ g^{-1})(x)$ is defined. Verify that
$$h\circ(f^{-1}\circ g^{-1})=\mathbf{1_C}~~~\text{and}~~~(f^{-1}\circ g^{-1})\circ h=\mathbf{1_A}$$
where $\mathbf{1_C}$ and $\mathbf{1_A}$ are the identity functions of $C$ and $A$ respectively.
