I had an exam question today along the lines of:

Prove or disprove: If $\displaystyle f: \mathbb{R} \rightarrow \mathbb{R}$ such that the graph of f defined as $\displaystyle G = \left\{ (x,f(x)) | x \in \mathbb{R} \right\} $ is sequentially compact(something else was also sequentially compact, which I believe f was), then f must be continuous.

I do not know if this is true or false. Quite honestly, I can not picture this in my head. By counterexample of a characteristic function:

$\displaystyle f(x)=

\begin{cases}

1 & \text{if $x \in Q$}, \\

0 & \text{if $x \notin Q$}.

\end{cases}

$

I would think to be false, but I don't think this can be rewritten as the composition of two functions.

Conversely, if f was continuous, then for h(x) = g(x,f(x)) would be continuous since it is the composition of continuous functions.

Thank you for reading. Any help is greatly appreciated.