# Non-contractible space, but all maps are homotopic

I am being asked to find a NON CONTRACTIBLE space $$X$$ such that, for any path-connected space $$Y$$ and any continuous maps $$f,g : X \rightarrow Y$$, $$f$$ and $$g$$ are homotopic.

I have thought that I definitely cannot pick $$X$$ to be path-connected, since otherwise picking $$Y = X$$, $$f = Id_X$$ and $$g$$ a constant map, I would obtain that $$X$$ is contractible. That said I am not too sure where to look for an actual example.

The classic example of a space that is not contractible but has trivial fundamental group, $$S^2$$, also cannot work here, since degree of maps is a homotopy invariant and clearly many different degree maps exist!

Any help appreciated!

• Have you considered a connected space that is not path-connected? Feb 6, 2023 at 19:53
• I have not. I guess the topologist's sine curve is the canonical example for this, but isn't it contractible? Feb 6, 2023 at 20:01
• no, it's not contractible, see, e.g., here: math.stackexchange.com/questions/548681/… Feb 6, 2023 at 20:06
• @Thomas That seems to refer to the closed topologist's sine curve or the Warsaw circle, but maybe I'm missing the spot. But isn't it clear that if we take a homotopy to the constant map (choosing the fixed point $x_0$ in the vertical line segment), the image of $\{x\}\times [0,1]$ gives a path from $x$ to $x_0$? Feb 6, 2023 at 20:15
• Hint: try some finite spaces. Feb 6, 2023 at 20:24

You are overcomplicating things. The space you are looking for is... $$\{1,2\}$$ or any discrete space with at least two points. Note that a contractible space has to be connected.
As for why $$\{1,2\}$$ satisfies your condition I leave it as an exercise.
• Grrrr$^2$ to @Moishe. That is really bad! But, as always with topological questions, someone should be the custodian of the empty set. Feb 6, 2023 at 22:27
• Just to check I am right: if I have a function $f$ from {1,2} to Y, would the correct homotopy be $H: {1,2} \times I \rightarrow Y$ which is defined by $H(1, -) = f(1)$ and $H(2, t) = p(t)$ where $p$ is the path starting at $f(2)$ and ending at $f(1)$? This would give me homotopy between f and the constant map at f(1), and then since all constant maps are homotopic in a path connected space, I obtain homotopy between f and any other map. Feb 6, 2023 at 22:28