# Graph of a function homeomorphic to a space implies continuity of the map?

if $X,Y$ are topological spaces and $f: X \rightarrow Y$ is a continuous map then it can be shown that the graph of $f$, $G_{f}$, is homeomorphic to $X$. But is the converse true? that is: if $G_{f} \cong X$ via the map $(x,f(x)) \mapsto x$ is $f$ necessarily a continuous map? I suspect no but haven't had luck with a counterexample. Is this true/false?

-
Nitpick: When writing $G_f \cong X$ you mean homeomorphic via $x \mapsto (x,f(x))$ (I guess). Try to make it a habit to mention maps explicitly whenever possible, in order to avoid ambiguity. – t.b. Jul 5 '11 at 6:28

This is true. Since $g:X \to G_{f}, \; x \mapsto (x,f(x))$ is in particular continuous and the projection $p: X \times Y \to Y$ is continuous by definition of the product topology, so is the composition $f = p \circ g$.

Added: Concerning the follow-up question whether $f$ is continuous as soon as the graph is homeomorphic to $X$ in some way: The answer is no.

While Brian's construction of a counter-example to this question is very nice and instructive, here's one I find a bit easier to understand. Take $X = \mathbb{Z} \cup \bigcup_{k \in \mathbb{Z}} (k+1/4, k + 3/4)$ with the topology inherited from $\mathbb{R}$. Now define

$$f(x) = \begin{cases}0 & \text{if }x \in \mathbb{Z},\\0 & \text{if }x \in (k+1/4,k+1/2),\\1 & \text{if } x= k + 1/2,\\2 & \text{if }x\in(k+1/2, k+3/4).\end{cases}$$

The graph of $f$ is homeomorphic to a countable union of intervals and countably many points, hence it is homeomorphic to $X$, but $f$ is not continuous, as it fails to be continuous at $x = k + 1/2$.

-
Buehler: right, it is clear now. Question: what if $G_{f} \cong X$ via other homeomorphism not necessarily $x \mapsto (x,f(x)$? – user10 Jul 5 '11 at 6:36
@user10: One can recursively construct a function $f:\mathbb Q \to \mathbb Q$ whose graph is dense in the plane. Clearly $f$ cannot be continuous, but its graph is a countable metric space without isolated points and therefore is homeomorphic to $\mathbb Q$. – Brian M. Scott Jul 5 '11 at 7:02
@Theo: Yes, that's a very nice example. – Brian M. Scott Jul 5 '11 at 8:15
@Brian: Thanks, I like yours, too. The examples are both a bit more complicated than I would like them to be. Do you see a way to produce an example having a connected domain (preferably an interval of $\mathbb{R}$, or at least a locally compact one). I guess a closed unbounded operator operator between separable Banach spaces would do the trick without local compactness, but I haven't checked the details. – t.b. Jul 5 '11 at 8:46

Let $\hat f:X \to G_f:x \mapsto \langle x,f(x) \rangle$, and assume that $\hat f$ is a homeomorphism. Note that $\hat f^{-1}$ is simply the restriction $p$ of the projection $\pi_X:X \times Y \to X$ to $G_f$, so $p$ is also a homeomorphism. Let $V$ be any open set in $Y$, and let $W = (X \times V) \cap G_f$; $W$ is open in $G_f$, so $p[W]$ is open in $X$. But $p[W] = \hat f^{-1}[W] = f^{-1}[V]$, so $f$ is continuous.

Added: If we do not require that $\hat f$ be the homeomorphism from $X$ to $G_f$, we cannot conclude that $f$ is continuous. Let $X = Y = \mathbb Q$, and enumerate $\mathbb Q = \{q_n:n \in \omega\}$. Let $\mathcal I$ be the set of non-empty open intervals $(p,r)$ in $\mathbb Q$, and enumerate $\mathcal I \times \mathcal I = \{\langle I_0(n),I_1(n) \rangle:n \in \omega \}$. We now recursively construct a function $f:\mathbb Q \to \mathbb Q$ as follows:

• At stage $n$ let $m \in \omega$ be minimal s.t. $q_m \in I_0(n)$, and let $f(q_m)$ be any rational number in $I_1(n)$.

To see that $f(q)$ is defined for every $q \in \mathbb Q$, suppose not, and let $m \in \omega$ be minimal s.t. $f(q_m)$ is not defined. Each non-empty rational interval $(p,r)$ occurs as $I_0(n)$ for infinitely many $n \in \omega$, so there are infinitely many $n$ s.t. $q_m \in I_0(n)$. In particular, there is a least $n \in \omega$ s.t. $q_m \in I_0(n)$ and all $f(q_k)$ for $k<m$ have been defined by stage $n$, and at this point the construction defines $f(q_m)$.

The construction of $f$ clearly ensures that the point $\langle q_m,f(q_m) \rangle$ chosen at stage $n$ is in $I_0(n) \times I_1(n)$, so $G_f$ is dense in $\mathbb Q \times \mathbb Q$. Thus, $G_f$ is a countable, metrizable space without isolated points and as such is homeomorphic to $\mathbb Q$ with the usual topology, i.e., to $\text{dom }f$. It's also clear that $f$ cannot be continuous, since by construction $\{q \in \mathbb Q:f(q) \in (0,1)\}$ and $\{q \in \mathbb Q:f(q) \in (2,3)\}$ are both dense in $\mathbb Q$.

-
Scott: thanks, what if the homeomorphism is not necessarily $x \mapsto (x,f(x)$? – user10 Jul 5 '11 at 6:53