0

If $f:X\to Y$ is a function, $X, Y$ metric spaces, we define the graph of $f$ as the set $$G(f) = \{(x,f(x)), x\in X)\}$$ If $X$ is compact, then show that $f$ is continuous if, and only if, $G(f)$ is closed in $X\times Y$.

I'm struggling with the reverse. I tried to suppose that $f$ is not continuous on some point $x$, so we have a sequence $(x_n)$ such that $(x_n)\to x$ but $f(x_n)$ does not converge to $f(x)$, but I don't know how it can lead to the fact that $G(f)$ is not closed.

  • 1
    The problem seems mis-posed. (See the responses.) If updating it to compactness is what you want to solve and are still having difficulty then feel free to ask. – user357980 Jun 19 '17 at 22:54
  • 1
    As @JoseCarlosSantos indicated, it's not true as stated. However, if you instead assume $Y$ is compact, then first restrict to some subsequence where $f(x_n)$ are all outside some neighborhood of $f(x)$; then take another subsequence such that $f(x_n)$ converges in $Y$. Can you complete the proof from here? – Daniel Schepler Jun 19 '17 at 22:54
  • @user357980, ok, if want compactness of $G(f)$, then if $f$ is not continuous at some $x$, I have that some sequence $(x_n)\to x$ but $f(x_n)$ fails to converge to $f(x)$. If no subsequence of $f(x_n)$ converge, then no subsequence of $((x_n, f(x_n))n$ converge, then $G(f)$ is not compact. But if some subsequence, say $f(x{n_k})$ is such that $f(x_{n_k}) \to z, z \ne f(x)$, then how can I conclude that $(x, z)$ is a limit point of $G(f)$ (so I can have a limit point of $G(f)$ not in $G(f)$)? – AnalyticHarmony Jun 19 '17 at 23:08

2 Answers2

2

This is not true. Take $X=[-1,1]$, $Y=\mathbb R$ and$$f(x)=\begin{cases}\frac1x&\text{ if }x\neq0\\0&\text{ otherwise.}\end{cases}$$Then $X$ is compact, $\operatorname{Gr}(f)$ is closed and $f$ is discontinuous.

1
  • I agree Santos' response.

  • I think that one needs $\operatorname{Gr}(f)$ to be compact, since if $X$ is compact and $f$ is continuous on $X$, then $f(X)$ is compact. So, the left hand side implies the right hand side, we have that $\operatorname{Gr}(f)$ is closed, it is a closed subset of the compact set $X \times f(X)$, which then has to be compact.

Now, if $\operatorname{Gr}(f)$ is compact, then you can show that $f$ is continuous.

user357980
  • 1,854
  • Yes of course to the counterexample but I think the better problem Is to assume that that Y is compact instead of X .I think then you have a correct theorem , – user439545 Jun 20 '17 at 03:14
  • It seems reasonable that assuming $Y$ is compact is the correct generaliszation since the proof using that $G_f$ is compact only requires that $Y$ is compact as to get a convergent subsequence.

    However, that does not mean that my assuming that $\operatorname{Gf}(f)$ being compact is ad hoc and of no meaning. I believe that the theorem is correct replacing the closedness of $X$ on the RHS with compactness. It is like replacing the compactness of $X$ with the compactness of $Y$... since we are exploring the equivalence of two conditions.

    – user357980 Jun 20 '17 at 05:22
  • If you assume G(f) is compact it follows that the projections X and Y are both compact which is too strong and not necessary – user439545 Jun 21 '17 at 06:25