Let $f : \mathbb R \to \mathbb R$ continuous. Prove that graph $G = \{(x, f(x)) \mid x \in \mathbb R\}$ is closed.

I'm a little confused on how to prove $G$ is closed. I get the general strategy is to show that every arbitrary convergent sequence in $G$ converges to a point in $G$.

Here is what I tried so far:

  1. Let $x_k$ be a sequence which converges to $x$.
  2. Since $f$ is continuous, this implies that $f(x_k)$ converges to $f(x)$.
  3. At this point, can you say every $(x_k, f(x_k))$ converges to a $(x, f(x))$, so $G$ is closed?

Almost, but better to start the argument with a general convergent sequence $(x_n,y_n)\rightarrow (x,y)$ and then write $y_n$ as $f(x_n)$ to show $y_n$ converges to $f(x)$. Then conclude $(x_n,y_n)$ converges to $(x,f(x))$ which is in $G$ and therefore an arbitrary sequence in $G$ that converges, converges in $G$. Therefore $G$ is closed.

  • $\begingroup$ Thanks for clearing things up! $\endgroup$ – CowZow Mar 9 '15 at 4:00

Almost, but when learning topology, better try to understand what is purely topological and what proper to metric spaces. Here, what you want to prove is not proper at all to metric spaces, nor to the fact that $\mathbf{R}$'s addition $(x,y)\mapsto x+y$ is continuous, but is proper to continuous maps with Hausdorff target. I will give a proof emphasizing this.

So let's show that $G$ is closed in $\mathbf{R}\times \mathbf{R}$ and to do it, let' show that its complement is open, so let $(x,y)\in \mathbf{R}\times \mathbf{R} \backslash G$. Since $(x,y)\not\in G$, we have $y\not=f(x)$. As $\mathbf{R}$ is Hausdorff (being a metric space, yes) there are disjoint open sets $U$ and $V$ in $\mathbf{R}$ such that $y\in U$ and $f(x)\in V$. Finally, $f$ is continuous, so there is an open neighbourhood $W$ of $x$ such that $f(W])\subseteq V$. By definition of the product topology, $W\times U$ is an open neighbourhood of $(x,y)$ in $\mathbf{R}\times\mathbf{R}$ and this neighbourhood is disjoint from $G$. Let $(z,f(z))$ be any point of $G$. If $z\not\in W$, then clearly $(z,f(z))\not\in W\times U$. If $z\in W$, then $f(z)\in V$, so $f(z)\not\in U$, and therefore $(z,f(z))\not\in W\times U$. So $(z,f(z))\notin W\times U$, and it follows that $(W\times U)\cap G=\varnothing$. Our open neighbourhood $W\times U$ lies in the complement of $G$. When have just show that every point of the complement of $G$ is in the interior of the complement of $G$, and this means that this complement is open.

Remark 1. Replacing the source $\mathbf{R}$ by any topological space $X$ and the target $\mathbf{R}$ by any Hausdorff topological space $Y$, the same proof as above shows that any continuous map $f : X \to Y$ from a topological space to an Hausdorff topological space has a closed graph.

Remark 2. There are counter-examples to the closedness of the graph is $Y$ is not Hausdorff. ;-)

Remark 3. If you want to give a proof using that $f$ continuous implies that the inverse image of a closed set in $Y$ is closed in $X$, do like this : as $Y$ is Hausdorff, $\Delta = \{(y,y)\;|\;y\in Y\}$ is closed in $Y\times Y$ (same style of proof as the proof I gave above) and now $G = (f\times \textrm{Id})^{-1}(\Delta)$ is closed, as $\Delta$ is and as $f\times \textrm{Id} : X\times Y\to Y\times Y$ defined by $(x,y)\mapsto (f(x),y)$ is continuous.

  • $\begingroup$ @CarstenSchultz Avoid edits to my answers please, especially when their only purpose is to introduce deliberatly a typo. Thx. $\endgroup$ – Olórin Mar 9 '15 at 19:19
  • $\begingroup$ And a nice day to you, too, sir. $\endgroup$ – Carsten S Mar 9 '15 at 20:06
  • $\begingroup$ @CarstenSchultz Wishing you of course the same. $\endgroup$ – Olórin Mar 9 '15 at 20:20
  • $\begingroup$ Well, I apologise for hitting 'ü', but you may agree that your diagonal was that of the wrong space. $\endgroup$ – Carsten S Mar 9 '15 at 20:26
  • $\begingroup$ Oh ok, sorry, I saw some correction at this place, but there were "*"'s so... all apologies ! And thx for the correction ! $\endgroup$ – Olórin Mar 9 '15 at 22:17

Define at first $F:\mathbb R^2 \rightarrow \mathbb R$,$F(x,y)=f(x)-y$.

Next note that $F$ is continuous (because $f$ and "+" are continuous)

Then the graph is exactly the inverse image of $\{0\}\in \mathbb R$, hence

the graph is closed as an inverse image of a closed set under a continuous function.

  • $\begingroup$ It is very fun to remark that the question has a "general topology" tag, and then to give a proof using $\mathbf{R}$'s group law... $\endgroup$ – Olórin Mar 9 '15 at 1:59
  • 1
    $\begingroup$ I just meant that I want to use the "more topological" definition of continuity. "The pre-image of every open set is open", thats all :) $\endgroup$ – Marm Mar 9 '15 at 2:04
  • $\begingroup$ Then have a look at remark 3 of my answer. As $\mathbf{R}$ is Hausdorff, $\Delta = \{(x,x)\;|\;x\in \mathbf{R}\}$ is closed in $\mathbf{R}\times \mathbf{R}$ and now $G = (f\times \textrm{Id})^{-1}(\Delta)$ is closed, as $\Delta$ is and as $f\times \textrm{Id} : \mathbf{R}\times \mathbf{R}\to \mathbf{R}\times \mathbf{R}$ defined by $(x,y)\mapsto (f(x),y)$ is continuous. $\endgroup$ – Olórin Mar 9 '15 at 2:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.