Let \(f:X\to Y\) be a continuous map, and suppose that there are continuous maps \(g,h:Y\to X\) with \(f\circ g\simeq\operatorname{Id}_Y\) and \(h\circ f\simeq\operatorname{Id}_X\).
Show that \(g\simeq h\).
Show, moreover, that \(f\) is a homotopy equivalence.
Solution
1. \(h\circ f\circ g\simeq g\) and \(h\circ f\circ g\simeq h\).
If \(H\colon X\times I\to X\) is a homotopy from \(h\circ f\) to \(\operatorname{Id}_X\), then \((y,t)\mapsto H(g(y),t)\) is a homotopy from \(h\circ f\circ g\) to \(g\). If \(K\colon Y\times I\to Y\) is a homotopy from \(f\circ g\) to \(\operatorname{Id}_Y\), then \((y,t)\mapsto h(K(y,t))\) is a homotopy from \(h\circ f\circ g\) to \(h\).
2. (a) \(g\simeq h\).
By step 1 both are homotopic to \(h\circ f\circ g\), and homotopy is an equivalence relation.
3. \(g\circ f\simeq\operatorname{Id}_X\).
Precomposing a homotopy from \(g\) to \(h\) (step 2) with \(f\) gives \(g\circ f\simeq h\circ f\), and \(h\circ f\simeq\operatorname{Id}_X\) by hypothesis.
4. Q.E.D.
Step 2 proves (a). For (b), \(f\circ g\simeq\operatorname{Id}_Y\) by hypothesis and \(g\circ f\simeq\operatorname{Id}_X\) by step 3, so \(g\) is a homotopy inverse of \(f\).