Does $h \circ f = I = f \circ g \implies h = g$? Suppose that the identity function $I$ is defined as $I:X \to X$ such that $\forall x \in X$, $I(x) = x$.
I was hoping that $f(g(x)) = h(f(x)) = x \implies g(x) = h(x)$ for a proof I am constructing. I am stuck as to where to begin. Any help would be greatly appreciated. Cheers.
$$
h = h\circ\operatorname{id}_X = h\circ (f\circ g) = (h\circ f)\circ g = \operatorname{id}_X\circ g = g
$$
If $h(f(x))=x$ then it is also true that $f(h(x))=x$ now if $f$ is inyective we are done. If not there is no such inverse of $f$ for all the reals because then if $a$ and $b$ has the same image in $f$, $h$ will have to give different values for those images, which by definition is not a function.