# Show that a retract of a contractible space is contractible

Show that a retract of a contractible space is contractible. This exercise come from the Hatcher' book.

This is my proof.

Since $$X$$ is contractible, there are maps $$f: X\rightarrow x$$ and $$g:x\rightarrow X.$$Such that $$f\circ g=id, g\circ f=id.$$ i.e. $$X\simeq x$$. Where $$x$$ is a point. Let $$r: X\rightarrow A$$ be the retract.

Then define $$h:A\rightarrow x$$. And then $$h\circ r\circ g=id_x$$, $$r\circ g\circ h=id_A$$.

Is this correct?

• You defined $h$ and then immediately drawed a conlusion...... I think, for a proof, you need to add more details about how you conclude it (for instances, construct a homotopy between two maps) – Kevin. S Apr 18 '20 at 8:34

Your proof has the correct idea, but has a gap. If $$x$$ denotes a one-point space, then certainly $$f \circ g = id_x$$, but $$g \circ f = id_X$$ is not true. You only have $$g \circ f \simeq id_X$$.
Let $$i : A \to X$$ denote inclusion and $$g' = r \circ g$$. We have $$r \circ i = id_A$$ and $$h \circ r = f$$. Therefore $$h \circ g' = h \circ r \circ g = f \circ g = id_x$$ and $$g' \circ h = r \circ g \circ h = r \circ g \circ h \circ r \circ i = r \circ g \circ f \circ i\simeq r \circ id_X \circ i = r \circ i = id_A$$.