Function whose graph is closed in $\mathbb{R}^2$ Let $f:(a, b)\to \mathbb{R}$ be some continuous function on an open interval $(a, b)$ s.t.
$\lim\limits_{x\to a}f(x)=\infty$ and $\lim\limits_{x\to b}f(x)=\infty$. I want to determine whether the graph of $f$ is closed, i.e. whether the set
$$
G(f)=\left\{(x, f(x)) \mid x\in (a, b)\right\}
$$
is closed in $\mathbb{R}^2$.
Using the fact that a closed set contains all its limit points I was thinking about using this to get a contradiction,
but since (informal) $\lim\limits_{x\to 0} \ (x, f(x)) = (0, \infty)$
I don't really know how to proceed.
 A: Let $(z_n)$ be a sequence of $G(f)$ with limit $z \in \mathbb R^2$. Set $z_n = (x_n,f(x_n))$ and $z = (x,y)$. We show that $x \in (a,b)$ and $y = f(x)$, which is enough to conclude that $z \in G(f)$. We know that by definition of the topology on $\mathbb R^2$ (or by the definition of the product topology)
$$
x_n \rightarrow x~~and~~f(x_n) \rightarrow y.
$$
Then $x \in \overline{(a,b)}$, but necessarily $x \notin \{a,b \}$. Indeed, if for instance $x = a$, using the limit of $f$ at $a$ we would have
$$
f(x_n) \rightarrow \infty
$$
and by the unicity of the limit $\infty = y \in \mathbb R$ which is absurd. So $x \in (a,b)$ and since $f$ is continuous over $(a,b)$,
$$
y = \lim f(x_n) = f(x).
$$
A: A subset is closed if its complement is open. A subset is open if every point within that subset is contained in an open ball within that subset. Can you take it from here?
A: Lemma 1: For every bounded set $A \subset \mathbb{R}$, there exists $c,d \in (a,b)$ such that $f^{-1}(A) \subset [c,d]$.
Proof: It is obvious from the limits assumption.
Lemma 2: Let $(x_n,y_n)_{n \in \mathbb{N}}$ be a sequence of elements of the graph of $f$ that converges in $\mathbb{R}^2$. Then there exists $c,d \in (a,b)$ such that for every $n$, $x_n \in [c,d]$.
Proof: A converging sequence in $\mathbb{R}^2$ is bounded, so the set $\{y_n \ \vert \ n \in \mathbb{N}\}$ is bounded, so we can apply Lemma 1 to get that there are $c,d$ such that $\{x_n \ \vert \ n \in \mathbb{N}\} \subset f^{-1}(\{y_n \ \vert \ n \in \mathbb{N}\}) \subset [c,d]$.
Proof of the closedness of the graph: Let $(x_n,y_n)_{n \in \mathbb{N}}$ be a sequence of elements of the graph of $f$ that converges, in $\mathbb{R}^2$, to $(x,y)$. One has to show that $(x,y)$ is in the graph of $f$. According to Lemma 2, $x \in [c,d] \subset (a,b)$, so, by continuity of $f$, $\lim_{n \to \infty} y_n = \lim_{n \to \infty} f(x_n) = f(x)$, so $(x,y)$ is in the graph of $f$.
