TITLE: Is the set of continuous functions from $\mathbb R \to \mathbb R$ path connected?
QUESTION [8 upvotes]: Let $C^0$ be the set of all of all (edit: bounded) continuous functions from $\mathbb R \to \mathbb R$ with the sup norm.  Then a "path" in $C^0$ is a continuous function $f \colon [0,1] \to C^0$.  The question boils down to if there is path (or continuous deformation) which transforms any one bounded continuous function into another.

REPLY [6 votes]: I think it's worth to develop a little bit more Akhil's interesting remark.
1. If instead of ${\cal C}^0(\mathbb{R}, \mathbb{R})$, you take ${\cal C}^0([a,b], \mathbb{R})$, where $[a,b] \subset \mathbb{R}$ is a compact interval, then something interesting happens: you can give ${\cal C}^0([a,b], \mathbb{R})$ the compact-open topology, and this topology coincides with the one induced by the sup norm (also called the topology of uniform convergence). More generally, the same is true for ${\cal C}^0 (X , Y)$, where $X$ is any compact topological space and $Y$ any metric space.
2. Now, for psychological reasons, let's use the notation $Y^X$ instead of ${\cal C}^0 (X , Y) $, and let $X$, $Y$ be any pair of topological spaces. Put the compact-open topology on $Y^X$ and let $Z$ be a third topological space. To every map $F: X\times Z \longrightarrow Y$ you can associate the map $\Phi (F) : Z \longrightarrow Y^X$ defined by
$$
(\Phi (F) (z)) (x)= F(x,z) \ .
$$
Reciprocally, to every map $\gamma :  Z \longrightarrow Y^X$ you can associate the map $\Psi (\gamma ): X \times Z \longrightarrow Y$ defined by
$$
\Psi (\gamma) (x,z) = (\gamma (z)) (x) \ .
$$
You can check easily that $\Phi$ and $\Psi$ are inverses one each other. Moreover, if $F$ is continuous, so is $\Phi (F)$. If $X$ is a locally compact Hausdorff space, the same is true for $\Psi$: $\gamma$ continuous implies $\Psi (\gamma )$ continuous. (See Munkres' "Topology", theorem 46.11.)
So, when $X$ is a locally compact Hausdorff space, you have bijections, inverses one each other:
$$
\Phi : Y^{X \times Z} \longrightarrow (Y^X)^Z  \qquad \text{and} \qquad \Psi: (Y^X)^Z \longrightarrow Y^{X \times Z}
$$
For instance, take $Z = I$, the unit interval. This bijection tells us that, when $X$ is a locally compact Hausdorff space, paths $\gamma : I \longrightarrow Y^X$ and homotopies $F : X \times I \longrightarrow Y$ are the same.
3. An easy topological exercise: any map $f: X \longrightarrow Y$ is homotopic to a constant map and all the constant maps are homotopic, either if

$X$ is contractile and $Y$ is path-connected, or
$Y$ is contractile.

So, coming back to your situation, we could have said that ${\cal C}^0 (\mathbb{R}, \mathbb{R})$, with the compact-open topology, is always path-connected because $X = \mathbb{R}$ is locally compact, Hausdorff and contractile, and $Y= \mathbb{R}$ is path-connected (or because $X=\mathbb{R}$ is locally compact and Hausdorff and $Y= \mathbb{R}$ is contractile).
(Notice that Jason has used the second possibility: he has constructed a homotopy from the constant function $0$ to $f$. We could use the first one: $F(x,t) = f(xt)$ is a homotopy from the constant function $f(0)$ to $f$.)
Of course, Jason's solution is more straightforward and doesn't need all this elementary machinery of point-set topology. But now we can say that also other function spaces, with the compact-open topology, are path-connected: every time you take as $X$ a locally compact Hausdorff space and any of the two previous possibilities, ${\cal C}^0(X,Y)$ is path-connected. For instance,
$$
{\cal C}^0(\mathbb{R}, Y) ,\ {\cal C}^0([a,b],Y) , \ {\cal C}^0(\mathbb{R}^n,Y) ,\ {\cal C}^0(D^2,Y)  \dots
$$
for any path-connected space $Y$, are path-connected. Also
$$
{\cal C}^0(X,\mathbb{R}) , \ {\cal C}^0(X, [a,b]) , \ {\cal C}^0(X,\mathbb{R}^n) ,\ {\cal C}^0(X,D^2)  \dots
$$
for any locally compact Hausdorff space $X$, are path-connected.