Is the set of continuous functions from $\mathbb R \to \mathbb R$ path connected?

It suffices to find a path to the 0 function from any other continuous function.

Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be any continuous function and define $F(x,t) = tf(x)$. Assuming we can prove this is, in fact, continuous, note that $F(x,1) = f(x)$ and $F(x,0)$ is the $0$ function.

So, why is it continuous? Let $\epsilon > 0$. Let $K = \sup|f(x)|$ Choose $\delta > 0 $ such that $\delta K < \epsilon$.

Then, we have $|t_1 - t_2| < \delta$ implies $|t_1f(x) - t_2 f(x)| = |(t_1 - t_2)f(x)| \leq \delta K = \epsilon$, so that this map is continuous (in fact, uniformly continuous).


Any real vector space $V$ with a "reasonable" topology is path connected. Given a vector $v_1\in V$ move along the line spanned by $v_1$ to $0$ and from there move to any other vector $v_2$ moving along le line spanned by it.

Reasonable means that for any $w\in V$ every open $U\ni w$ must contain an open segment around $v$ of the line spanned by $w$, which is certainly true for the case under consideration (topology under the sup norm).

E.g. $L^2({\Bbb R})$ is reasonable! $$ \left(\int_{\Bbb R}(f-tf)^2dx\right)^{1/2}=|1-t|\left(\int_{\Bbb R}f^2dx\right)^{1/2} $$ gets as close as needed to 0 as $t\to1$.


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

  1. $X$ is contractile and $Y$ is path-connected, or
  2. $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.