# When the graph of a function on compact topological space is closed, compact, connected

Let $X$ be a compact topological space and let $f: X \rightarrow \mathbb{R}$ be a function. The graph$f$ is the set $G = \{(x,f(x)) : x\in X\}$. when this $G$ is going to be closed, compact and connected?

By graphically, i can see that if $f$ is continuous. Then G is closed. And by same graphs i guess the converse need not true and G is connected.

My friend told me that if $f$ is bounded and continuous. then G might be compact

But i don't any proof and counterexample for this. i will be happy if i get some help

• The continuous image of a compact set is compact, so continuity of $f$ implies boundedness. – Math1000 Nov 28 '16 at 10:36
• I'm not sure what you are asking. But I can prove that for continuous $f:X\to Y,$ if $Y$ is Hausdorff then $G=\{(x,f(x): x\in X\}$ is closed in $X\times Y$. And if $f:X\to Y$ is continuous and $X$ is compact then $G$ is a compact subspace of $X\times Y.$ – DanielWainfleet Nov 29 '16 at 3:56

If $f$ is continuous, then $f[X]$ is compact in the reals and hence bounded. Also, $G$ will then be compact, as the continuous image of $X$ under the continuous map $x \rightarrow (x, f(x))$ from $X$ into $X \times \mathbb{R}$. (Continuous as the compositions wiht the two projections are the identity, resp. $f$, hence continuous by assumption).