# Closed graph theorem

$f(x)=x^{3}-9x$
$[-4,4]$
$[-2,2]$
In mathematics, the closed graph theorem may refer to one of several basic results characterizing continuous functions in terms of their graphs. Each gives conditions when functions with closed graphs are necessarily continuous.
A blog post by T. Tao lists several closed graph theorems throughout mathematics.

## Graphs and maps with closed graphs

If $f:X\to Y$ is a map between topological spaces then the graph of $f$ is the set $\Gamma _{f}:=\{(x,f(x)):x\in X\}$ or equivalently, $\Gamma _{f}:=\{(x,y)\in X\times Y:y=f(x)\}$ It is said that the graph of $f$ is closed if $\Gamma _{f}$ is a closed subset of $X\times Y$ (with the product topology).
Any continuous function into a Hausdorff space has a closed graph (see § Closed graph theorem in point-set topology)
Any linear map, $L:X\to Y,$ between two topological vector spaces whose topologies are (Cauchy) complete with respect to translation invariant metrics, and if in addition (1a) $L$ is sequentially continuous in the sense of the product topology, then the map $L$ is continuous and its graph, Gr L, is necessarily closed. Conversely, if $L$ is such a linear map with, in place of (1a), the graph of $L$ is (1b) known to be closed in the Cartesian product space $X\times Y$, then $L$ is continuous and therefore necessarily sequentially continuous.

### Examples of continuous maps that do not have a closed graph

If $X$ is any space then the identity map $\operatorname {Id} :X\to X$ is continuous but its graph, which is the diagonal $\Gamma _{\operatorname {Id} }:=\{(x,x):x\in X\},$, is closed in $X\times X$ if and only if $X$ is Hausdorff. In particular, if $X$ is not Hausdorff then $\operatorname {Id} :X\to X$ is continuous but does not have a closed graph.
Let $X$ denote the real numbers $\mathbb {R}$ with the usual Euclidean topology and let $Y$ denote $\mathbb {R}$ with the indiscrete topology (where note that $Y$ is not Hausdorff and that every function valued in $Y$ is continuous). Let $f:X\to Y$ be defined by $f(0)=1$ and $f(x)=0$ for all $x\neq 0$. Then $f:X\to Y$ is continuous but its graph is not closed in $X\times Y$.

## Closed graph theorem in point-set topology

In point-set topology, the closed graph theorem states the following:
Closed graph theorem — If $f:X\to Y$ is a map from a topological space $X$ into a Hausdorff space $Y,$ then the graph of $f$ is closed if $f:X\to Y$ is continuous. The converse is true when $Y$ is compact. (Note that compactness and Hausdorffness do not imply each other.)
First part: just note that the graph of $f$ is the same as the pre-image $(f\times \operatorname {id} _{Y})^{-1}(D)$ where $D=\{(y,y)\mid y\in Y\}$ is the diagonal in $Y^{2}$.
Second part:
For any open $V\subset Y$ , we check $f^{-1}(V)$ is open. So take any $x\in f^{-1}(V)$ , we construct some open neighborhood $U$ of $x$ , such that $f(U)\subset V$ .
Since the graph of $f$ is closed, for every point $(x,y')$ on the "vertical line at x", with $y'\neq f(x)$ , draw an open rectangle $U_{y'}\times V_{y'}$ disjoint from the graph of $f$ . These open rectangles, when projected to the y-axis, cover the y-axis except at $f(x)$ , so add one more set $V$.
Naively attempting to take $U:=\bigcap _{y'\neq f(x)}U_{y'}$ would construct a set containing $x$, but it is not guaranteed to be open, so we use compactness here.
Since $Y$ is compact, we can take a finite open covering of $Y$ as $\{V,V_{y'_{1}},...,V_{y'_{n}}\}$.
Now take $U:=\bigcap _{i=1}^{n}U_{y'_{i}}$. It is an open neighborhood of $x$, since it is merely a finite intersection. We claim this is the open neighborhood of $U$ that we want.
Suppose not, then there is some unruly $x'\in U$ such that $f(x')\not \in V$ , then that would imply $f(x')\in V_{y'_{i}}$ for some $i$ by open covering, but then $(x',f(x'))\in U\times V_{y'_{i}}\subset U_{y'_{i}}\times V_{y'_{i}}$ , a contradiction since it is supposed to be disjoint from the graph of $f$ .
If X, Y are compact Hausdorff spaces, then the theorem can also be deduced from the open mapping theorem for such spaces; see § Relation to the open mapping theorem.
Non-Hausdorff spaces are rarely seen, but non-compact spaces are common. An example of non-compact $Y$ is the real line, which allows the discontinuous function with closed graph $f(x)={\begin{cases}{\frac {1}{x}}{\text{ if }}x\neq 0,\\0{\text{ else}}\end{cases}}$.
Also, closed linear operators in functional analysis (linear operators with closed graphs) are typically not continuous.

### For set-valued functions

Closed graph theorem for set-valued functions — For a Hausdorff compact range space $Y$, a set-valued function $F:X\to 2^{Y}$ has a closed graph if and only if it is upper hemicontinuous and F(x) is a closed set for all $x\in X$.

## In functional analysis

If $T:X\to Y$ is a linear operator between topological vector spaces (TVSs) then we say that $T$ is a closed operator if the graph of $T$ is closed in $X\times Y$ when $X\times Y$ is endowed with the product topology.
The closed graph theorem is an important result in functional analysis that guarantees that a closed linear operator is continuous under certain conditions. The original result has been generalized many times. A well known version of the closed graph theorems is the following.
Theorem — A linear map between two F-spaces (e.g. Banach spaces) is continuous if and only if its graph is closed.
The theorem is a consequence of the open mapping theorem; see § Relation to the open mapping theorem below (conversely, the open mapping theorem in turn can be deduced from the closed graph theorem).

## Relation to the open mapping theorem

Often, the closed graph theorems are obtained as corollaries of the open mapping theorems in the following way. Let $f:X\to Y$ be any map. Then it factors as
    $f:X{\overset {i}{\to }}\Gamma _{f}{\overset {q}{\to }}Y$.
Now, $i$ is the inverse of the projection $p:\Gamma _{f}\to X$. So, if the open mapping theorem holds for $p$; i.e., $p$ is an open mapping, then $i$ is continuous and then $f$ is continuous (as the composition of continuous maps).
For example, the above argument applies if $f$ is a linear operator between Banach spaces with closed graph, or if $f$ is a map with closed graph between compact Hausdorff spaces.