# graphs of functions which are closed, but fail to be continuous

I tried looking up a question regarding graphs of continuous functions on this site, but all the ones I found consider functions from $\mathbb{R}$ into $\mathbb{R}$. I have been pondering the following question: given a general topological spaces $X, Y$, and a function $f: X\to Y$, when does $Graph(f)$ closed in $X\times Y$ imply that $f$ is continuous. By the closed graph theorem, this is true whenever $X$ and $Y$ are both Banach spaces.

Also, it is fairly easy to prove that whenever $Y$ is a Hausdorff space and $f$ is continuous, then $Graph(f)$ is closed, but I do not think that the converse is true, so I am trying to find an example where $X$ is some topological space, $Y$ a Hausdorff space, $f: X\to Y$ a function with a closed graph in $X\times Y$, but who fails to be continuous. As of yet I have not been able to find such a counterexample, partially because I have no clue where to look for such a counterexample. I would really appreciate getting some directions to go in.

-
Hint: consider the derivative as a function of $C^1[0, 1]$ to $C^0[0, 1]$. This is a linear, unbounded function (hence not continuous), but you can show that its graph is closed. –  student Jan 12 '12 at 18:12
@Leandro: what norm are you using on $C^1[0,1]$? If it's $\lVert f'\rVert + \lVert f\rVert$, then $(f_n)$ converges in $C^1[0,1]$ iff both $(f_n)$ and $(f_n')$ converge uniformly on $[0,1]$ –  kahen Jan 12 '12 at 18:19
@kahen: the norm on $C^1[0, 1]$ should be just $\|f\|$ (the supremum norm) for this example. –  student Jan 12 '12 at 18:21
Your Banach space example needs the hypothesis of "linear" also. –  GEdgar Jan 12 '12 at 18:22

$f\colon\mathbb{R}\to\mathbb{R}$ defined by $$f(x)=\frac1x\quad\text{if}\quad x\ne0,\quad f(0)=0.$$