# If the graph $G(f)$ of $f : [a, b] \rightarrow \mathbb{R}$ is path-connected, then $f$ is continuous.

Yesterday I woke up thinking about this question, and I believe I have a proof, but I'm not sure of its validity.

Let $\gamma : [a, b] \rightarrow \mathbb{R}^{2}$ be a path from $(a, f(a))$ to $(b, f(b))$. First of all, I will show we may take WLOG $\gamma$ to be injective. Consider a point $\alpha = (p, q) \in \mathbb{R}^{2}$. Consider the set $S = \{x \in [a, b]; \gamma(x) = \alpha\}$, which we suppose non-empty. Let $c = \inf S$, $c' = \sup S$. By the continuity of $\gamma$, we have $\gamma(c) = \gamma(c') = \alpha$. We may now consider the equivalence relation $\sim$ on $[a, b]$ which sets $x \sim x$ and $z \sim y$ for $z, y \in [c, c']$. The quotient space $[a, b] / \sim$ is homeomorphic to an interval (since $a < c \leq c' < b$, by the continuity of $\gamma$), and the induced map $\bar{\gamma} : [a, b] / \sim \rightarrow \mathbb{R}^{2}$ may be taken as a path which passes through $\alpha$ only once.

Since $[a, b]$ is compact and $\mathbb{R}^{2}$ is Hausdorff, $\gamma$ is a homeomorphism onto its image. Clearly $\gamma([a, b]) \subset G(f)$. We must now show this is an equality, which is done via the intermediate value theorem. Consider $\pi_{1} : G(f) \rightarrow \mathbb{R}$ to be the projection onto the first coordinate, which is continuous. Consider $\phi = \pi_{1} \circ \gamma : [a, b] \rightarrow [a, b]$, which also is continuous. Since $\phi(a) = a, \phi(b) = b$, $\phi([a, b]) = [a, b]$, and therefore $\gamma([a, b]) = G(f)$. Thus $f$ is a function whose graph is homeomorphic to its domain. We will show in the next paragraph that this implies the continuity of $f$.

Indeed, suppose $g : [a, b] \rightarrow \mathbb{R}$ has a homeomorphism $H : [a, b] \rightarrow G(g)$. This induces a map $T : [a, b] \rightarrow [a, b]$ such that $H(x) = (T(x), g(T(x))$. We note $T$ is continuous since $T = \pi_{1} \circ H$. It is clearly seen $T$ is bijective, and thus a homeomorphism since [a, b] is compact and Hausdorff. Since $g \circ T$ is continuous, $g \circ T \circ T^{-1} = g$ also is.

• I am not sure if this injectivication of $\gamma$ works as you describe it, but nonetheless you can assume the path to be injective. The image of $\gamma$ is a so-called Peano space, that is a compact connected locally connected metric space. Such a space can be proven to be arc-connected, which means every two points can be joined by an arc, i.e. the homeomorphic image of the unit interval. So within a path between two points there lies also an arc between those points. – Stefan Hamcke Apr 19 '13 at 19:01
• The last paragraph seems fine. Personally, I would have done it a bit differently. By $H$ the graph is compact, hence closed, so $\pi_1$ restricted to $G(g)$ is closed. This implies the continuity of the inverse Id$_X\times g$. I think it is slightly more direct, but the way you did it works too. – Stefan Hamcke Apr 19 '13 at 19:25
• I still don't understand how you show the equality in the second paragraph. Could you explain it a bit more detailed, please. – Stefan Hamcke Apr 19 '13 at 19:29
• Well, suppose $(k, f(k))$ is a point on the graph. We have $\pi_{1}(a, f(a)) = a < k < b = \pi_{1}(b, f(b))$. Then apply IVT. – Pedro Apr 19 '13 at 19:32
• I am well aware that continuous images of connected spaces are connected, I just don't understand how this implies that $\gamma([a,b])=G(f)$? – Stefan Hamcke Apr 19 '13 at 19:37

Actually, there is a problem when you state that you can take $\gamma$ to be injective. Defining $\sim$ the way you did, the quotient space is $\textbf{not}$ homeomorphic to a segment. You have to define it this way : $\forall x \in [a,b]$, $x \sim x$ and $\forall x, y \in [c,c']$, $x \sim y$. And this is not enough : this process removes only one of the loops "contained" in $\gamma$. Injectivity is the most tricky part of the problem, I think.

A proof (hope you can read French) can be found in the comments here : http://allken-bernard.org/pierre/weblog/?p=1180

• Oh, of course, I should have defined it as you said. But why is it not enough? I may then remove each "non-injectivity" of $\gamma$ in that manner. – Pedro Apr 19 '13 at 22:32
• You provide a process to make sure that $\gamma$ passes through $\alpha$ only once. But if there is an infinite number of $\alpha$ having more than two preimages, the process would never end ! – Plop Apr 20 '13 at 12:14
• Can you give a rough sketch of how this proof would go? I do not read french – Pedro Apr 20 '13 at 22:19
• Step 1 : Build a path $\hat{\gamma}$ such that if $\hat{\gamma}(x) = \hat{\gamma}(y)$, then $\hat{\gamma}$ is constant between $x$ and $y$. To do that, "remove" the biggest loop : set $S = \{(x,y)\in [0,1]\times[0,1] \mbox{ } \vert \mbox{ } \gamma(x) = \gamma(y)\}$, and pick $(x_1,y_1) \in S$ such that $d(x_1,y_1)$ maximizes $d(x,y)$ for $(x,y) \in S$ ($S$ is compact) and define $\gamma_1(t) = \gamma(t)$ if $t \leq x_1$ or $t \geq y_1$ and $\gamma_1(t) = \gamma(x_1)$ if $x_1 \leq t \leq y_1$. Iterate the process to get a sequence $(\gamma_n)_n$ of paths. – Plop Apr 20 '13 at 23:44
• Step 2 : Show that this sequence converges pointwise, and that the limit is a path. Then verify that $\hat{\gamma}$ has the property I specified in Step 1. – Plop Apr 20 '13 at 23:46

Here's a different argument.

Suppose $\{x_n\}$ is a sequence in $[a,b]$ converging to some $x$. We will show that there is a subsequence so that $f(x_{n_k}) \to f(x)$. This is sufficient; for if $f$ were not continuous at $x$, there would exist an $\epsilon$ such that for any $n$ we could find an $x_n$ with $|x_n - x| < 1/n$ but $|f(x_n) - f(x)| > \epsilon$. Then we would have $x_n \to x$, but no subsequence of $\{f(x_n)\}$ could converge to $x$, contradicting our claim.

Since the graph of $f$ is path connected, there is a continuous path $c(t) = (u(t), v(t))$ with $v(t) = f(u(t))$ for each $t$, and $c(0) = (a, f(a))$, $\gamma(1) = (b, f(b))$. By the intermediate value theorem, for each $n$ there is a $t_n \in [0,1]$ with $u(t_n) = x_n$. Since $[0,1]$ is compact, we can find a subsequence $t_{n_k}$ converging to some $t$. Then by continuity of $u$, since $u(t_{n_k}) = x_{n_k} \to x$, we have $u(t) = x$. Now $v$ is also continuous, so $$f(x_{n_k}) = f(u(t_{n_k})) = v(t_{n_k}) \to v(t) = f(u(t)) = f(x).$$ We have thus constructed the desired subsequence.

• I'm angry I didn't think of this. By the way, I think you meant to write "there is a $t_{n} \in [0, 1]$ with $u(t_{n}) = x_{n}$". – Pedro Apr 20 '13 at 3:39
• @Pedro: Thanks, fixed. – Nate Eldredge Apr 20 '13 at 4:05
• @NateEldredge How would you solve this problem when the domain is a general (path-connected) metric space? – A Slow Learner Oct 19 '18 at 19:18
• @ASlowLearner: It's not true more generally. For instance, let $X$ be the punctured complex plane and consider the function $f(z) = \arg z$. – Nate Eldredge Oct 22 '18 at 17:10

Here is a very simple proof which reduces everything to a couple of standard general topology theorems. Let $$G=G_f\subset {\mathbb R}^2$$ denote the graph of $$f: [a,b]\to {\mathbb R}$$. Observe that the projection map $$p: G\to [a,b]$$ (given by the projection to the first component) is a continuous bijective map, its inverse is $$x\mapsto (x, f(x))$$. Hence, it suffices to show that $$p$$ is a homeomorphism. You probably already know that a continuous bijective map from a compact space to a Hausdorff space is a homeomorphism. Hence, it suffices to show that $$G$$ is compact. Since $$G$$ is path-connected, there exists a continuous map $$\gamma: [0,1]\to G$$ sending $$0$$ to $$A=(a,f(a))$$ and $$1$$ to $$B=(b,f(b))$$. I claim that this map is surjective. If not, then composing it with $$p$$ we obtain a continuous non-surjective map $$[a,b]\to [a,b]$$ which fixes the end-points, contradicting the Intermediate Value Theorem. Thus, $$\gamma$$ is surjective, which implies that $$G$$ is compact (a continuous image of a compact space is compact). qed

Edit. This proof also suggests a higher-dimensional generalization of this result:

Lemma. Let $$B^n$$ be the $$n$$-dimensional closed unit ball, $$f: B^n\to X$$ a map to a Hausdorff topological space such that the restriction of $$f$$ to $$\partial B^n$$ is continuous. Then the following are equivalent:

1. $$f$$ is continuous.

2. The graph $$G_f$$ of $$f$$ is contractible. (Path connected is, obviously, insufficient.)

3. The restriction $$(id, f): \partial B^n\to G_f$$ defines a null-homologous spherical cycle $$g: S^{n-1}\to G_f$$ (more precisely, the image of the homotopy class $$[g]$$ under the Hurewicz homomorphism $$\pi_n(G_f)\to H_n(G_f)$$ is zero).

The proof is essentially the same as written above: Assume (3). If $$\sum_i a_i \sigma_i$$ is a singular $$n$$-chain whose boundary is the spherical cycle $$g$$, then the union of images of the singular simplices $$\sigma_i$$ has to be the entire $$G_f$$ (otherwise, it misses a point $$(q,f(q))$$ and, hence, the boundary of $$B^n$$ is null-homologous in $$B^n -\{q\}$$, which is impossible). But then $$G_f$$ is compact, hence, the projection map $$G_f\to B^n$$ is a homeomorphism, hence, $$f$$ is continuous. The implications (1)$$\Rightarrow$$(2) and (2)$$\Rightarrow$$(3) are clear.