How can I construct a homotopy between a constant function to a continuous function? I have a few questions in mind and I would really appreciate if I can clear some questions bogging my mind. Let $X$ be a topological space.

*

*Is there any loop based at $x_0$ that is not homotopic to a constant function based at $x_0$?

*Is every continuous function homotopic to a constant function? Let $Y$ be a topological space, and $f: Y \rightarrow X$ be continuous. For $x_0 \in X$, does a homotopy between $f$ and $e_{x_0}$ exist?

*Let $Y$ be a compact, connected, linearly ordered, and has least upper bound property. Let $f: Y \rightarrow X$ be continuous and let $0 \in Y$ be the minimum of $Y$. Suppose $f(0) = x_0$. For this $f$, can I define "reverse" of $f$? (Munkres has definition of reverse as: $\overline{f}(y) = f(1-y)$, but
''$-$'' is not defined unless $Y = \mathbb{R}$).

*Given this reverse $f$, is there a way to construct (or show existence of) a homotopy between $f*\overline{f}$ and $e_{x_0}$?

Answer to question 1. follows naturally if 2. is true. However, 2. might be false, so I am leaving it as a separate question.
For number 2, I was thinking of deforming subspace induced by the function to a point, but such visualization cannot be formally defined in a general topological space.
Thank you very much in advance.
 A: Let us answer the second question first, the first will follow through:
We call a map homotopic to the constant map to be nullhomotopic. Suppose every map $f:Y\rightarrow X$ is nullhomotopic; then in particular, for $Y=X,$ $1_X:X\rightarrow X$ is nullhomotopic, where $1_X$ is the identity map on $X$.
We say a space $X$ is contractible if it has the homotopy type of a point, which means that its identity map is homotopic to the constant map.
Suppose $X$ is contractible. Then, $e_{x_0}\simeq 1_X,$ with some homotopy $f_t.$ For any map $f:Y\rightarrow X,$ we have $f=1_X\circ f\simeq e_{x_0}\circ f,$ by the homotopy $f_t\circ f;$ but $e_{x_0}\circ f$ is a constant map from $Y$ to $X.$ Hence $f$ is nullhomotopic.
What this means in fact is that if all maps into a space $X$ are nullhomotopic, then it must be contractible. Some examples of a space that are not contractible are the circle $S^1$ and the set $\mathbb{R}-\{0\}$ (the last example is quite easy to see intuitively) and so such spaces, there exist functions which are null-homotopic.
For question 3 and 4 - following the comment of @HallaSurvivor, even the discrete set $\{y_0\}$ is a set that is compact, connected, linearly ordered, and has least upper bound property, (there may be many more complicated examples) so I don't think you can generally define a inverse. As you see, you can do so for the unit interval $[0,1],$ and so if the $Y$ is homeomorphic to $[0,1]$ then we may easily be able to find a reverse.
Suppose you are given a reverse path $\overline{f}$ for a path $f:[0,1]\rightarrow X.$ Then take the map $H:I\times I\rightarrow X$ as:
$$H(t,s)=\left\{\begin{array}{ll}
f(s), & t\leq \frac{1}{2}-s; \\
\overline{f}(s), &  \frac{1}{2}-s\leq t \leq 1-s;\\
e_{x_0}(s), & 1-s\leq t. \\
\end{array}\right.$$
This map is continuous and on close observation is actually a homotopy between $f * \overline{f}$ and $e_{x_0}.$
