Duality between compactness and Hausdorffness Consider a non-empty set $X$ and its complete lattice of topologies
(see also this thread).
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 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.
 A: Hmm...
I used to think of "compact" as dual to "discrete".
Here are two instances of compact/discrete dualities:
Pontryagin duality:
Given an abelian group $A$, its Pontryagin dual $A^*:=\mathrm{Hom}(A,S^1)$ is compact iff $A$ is discrete (and vice-versa).
Six functor formalism:
The analogue of "compact" in algebraic geometry is the concept of a proper morphism. Similarly, the analogue of "discrete" is the notion of an étale morphism. For proper maps $f:X\to Y$ we have $f_*=f_!$, whereas for étale maps we have $f^*=f^!$.
A: 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, or as a 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. 
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. 
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". 
A: Hausdorff is dual to discrete. Compact is dual to overt.
A space $X$ is Hausdorff if and only if the diagonal $\Delta_X = \{(x,x) \mid x \in X\}$ is closed in $X \times X$. A space $X$ is discrete if and only if $\Delta_X$ is open in $X \times X$.
Given a space $X$ let $\mathcal{O}(X)$ be its topology, seen as a topological space equipped with the Scott topology. Let $\Sigma = \{\bot, \top\}$ be the Sierpinski space.
Now, a space $X$ is compact if and only if the map $\forall_X: \mathcal{O}(X) \to \mathcal{O}(1)$, defined by
$$\forall_X (U) = \begin{cases}
\top & \text{if $U = X$} \\
\bot & \text{else}
\end{cases}$$
is continuous. A space is overt if and only if the map $\exists_X : \mathcal{O}(X) \to \mathcal{O}(1)$, defined by
$$\exists_X (U) = \begin{cases}
\top & \text{if $U \neq \emptyset$} \\
\bot & \text{else}
\end{cases}$$
is continuous. See Part II of Martin Escardo's Synthetic topology
of data types and classical spaces for a good tutorial on these ideas, or for a deep dive into the subject Paul Taylor's work on Abstract Stone Duality, and in particular his Foundations for Computable Topology.
