Consider a non-empty set $X$ and its complete lattice of topologies
(see also [this thread](https://mathoverflow.net/questions/15841/how-do-the-compact-hausdorff-topologies-sit-in-the-lattice-of-all-topologies-on)).


The discrete topology is Hausdorff. Every topology that is finer than a Hausdorff topology is also Hausdorff. A minimal Hausdorff topology is such that no strictly coarser topology is Hausdorff.


The trivial topology is compact. Every topology that is coarser than a compact topology is also compact. A maximal compact topology is such that no strictly finer topology is compact.


A compact Hausdorff topology is both minimal Hausdorff and maximal compact.
A minimal Hausdorff topology need not be compact and a maximal compact topology need not be Hausdorff (Steen & Seebach, Examples 99 and 100).


**Question:**
It seems that there is some duality between Hausdorffness and compactness? Can this kind of duality be stated more explicitly (e.g. in some category theoretic formulation)? Is a compact topology on a fixed set $X$ some "dual" of a Hausdorff topology on $X$?


[Here](https://mathoverflow.net/a/46825/58682) it is stated that a Hausdorff topology need not contain a minimal Hausdorff topology. If there is some duality these notions then we could also automatically deduce that a compact topology must not be contained in a maximal compact topology.



Duality between compactness and Hausdorffness
There are several ways I think of expressing this 'duality'. But before describing this, maybe it would help to explain a sense in which 'existence' (at least one element, or totality of a relation) is dual to 'uniqueness' (at most one element, or well-definedness of a relation). 


So let's consider the category whose objects are sets and whose morphisms are relations $R: A \to B$: let $R(a, b)$ denote the truth value of $(a, b) \in R$, and for relations $R: A \to B$ and $S: B \to C$, define the composite $SR: A \to B$ by the rule $SR(a, c) = \exists\_{b: B} R(a, b) \wedge S(b, c)$. The identity relation $1\_A: A \to A$ is the diagonal subset of $A \times A$, defined by $1\_A(a, b) \Leftrightarrow a = b$. 


Technically this "category" is a 2-category, where 2-cells are given by inclusions $R \subseteq S$ between relations of the same type $A \to B$; we will write 2-cells as $R \leq S$. Even more, we have a $\dagger$-operation which takes a relation $R: A \to B$ to its opposite $R^{op}: B \to A$, where $R(a, b) \Leftrightarrow R^{op}(b, a)$. Altogether the structure one obtains is what is known as in categorical literature as an [allegory](http://ncatlab.org/nlab/show/allegory), or as a [bicategory of relations](http://ncatlab.org/nlab/show/bicategory+of+relations): there are various axiomatic frameworks for describing categories of relations. 


There are also various notions of 'duality' in such a situation. One is by reversing the direction of 1-cells (called 'op'), another is by reversing the direction of 2-cells (called 'co'), and a third is by reversing directions of both (called 'co-op'). 


In this 2-categorical context, we may categorically express the condition that a relation $R: A \to B$ is *well-defined* or *functional* (for all $a \in A$ there exists at most one $b \in B$ such that $R(a, b)$ is true) by the condition $R \circ R^{op} \leq 1\_B$. 


The co-op dual of this condition is $1\_A \leq R^{op} \circ R$, which translates to saying that to each $a \in A$ there exists at least one $b \in B$ such that $R(a, b)$, or that $R$ is a *total relation*. 


If we have both conditions $R \circ R^{op} \leq 1\_B$ and $1\_A \leq R^{op} \circ R$, then the relation is a function; in other words, a relation $R$ is a function iff considered as a 1-cell in the 2-category $\mathbf{Rel}$, it has a right adjoint (which is necessarily $R^{op}$; this is a good exercise). 


Onto the topology: if $X$ is a topological space and $\beta X$ is the set of ultrafilters on the underlying set of $X$, then there is a convergence relation $\gamma: \beta X \to X$ where $\gamma(U, x)$ (an ultrafilter $U$ converges to $x$) means that the filter of neighborhoods of $x$ is contained in $U$. In fact the very notion of topological space can be expressed in terms of ultrafilter convergence, as explored in the notion of 'relational $\beta$-module' for which you can find an account at the [nLab](http://ncatlab.org/nlab/show/relational+beta-module). 


A space $X$ is compact iff every ultrafilter on $X$ converges to at least one point. This is the same as saying that the convergence relation $\gamma: \beta X \to X$ is total. A space $X$ is Hausdorff iff every ultrafilter converges to at most one point. This is the same as saying that $\gamma: \beta X \to X$ is well-defined. A space is compact Hausdorff iff its convergence relation $\gamma$ is a function: this is an important ingredient in the theorem that compact Hausdorff spaces are exactly [algebras of the ultrafilter monad](http://ncatlab.org/nlab/show/compactum#algebras). 


Summarizing: 



> 
> In the 2-category of sets and relations, the condition of compactness on the convergence relation of a topological space is co-op dual to the condition of Hausdorffness. 
> 
> 
> 


There are various other ways in which the duality between compactness and Hausdorffness manifests itself. One is that $X$ is compact if every projection map $X \times Y \to Y$ is closed, whereas $X$ is Hausdorff if the diagonal $X \to X \times X$ is closed (projections and diagonals being the two ingredients of product structures) -- although it would take some time to elaborate a sense in which these properties should be seen as "dual". 


