TITLE: Purely categorical definition of Hausdorff space
QUESTION [22 upvotes]: I would like to be able to look at the category Top and, not knowing anything about the "internals" of the objects (i.e. topological spaces), be able to identify which ones are Hausdorff and which aren't.
You can get most of the way there with the following definition of the Hausdorff axiom:

The diagonal $\Delta = \{ (x,x) | x \in X \}$ is closed as a subset of the product space $X \times X$

The "diagonal" can be defined categorically (i.e. https://en.wikipedia.org/wiki/Diagonal_morphism), but it's the "closed" that's giving me trouble. Given the diagonal morphism in the product setup, how can we tell via arrows/some universal property that this arrow (or the embedded subobject?) is "closed"?
My end goal here is to apply this notion to the category of pre-varieties to identify varieties in this category.
References:

https://ncatlab.org/nlab/show/Hausdorff+space#BeyondTopologicalSpaces
https://en.wikipedia.org/wiki/Category_of_topological_spaces

REPLY [11 votes]: There is a notion of categorical topology, developed in some detail in Chapter III of the book Categorical Foundations: Special Topics in Order, Topology, Algebra, and Sheaf Theory, edited by Maria Cristina Pedicchio and Walter Tholen.
What's happening is that a category itself can be equipped with a "topology of closed subobjects", consisting of for each object $Y$ a collection of closed monomorphisms $U\hookrightarrow Y$ that is closed under pullbacks: given a morphism $f\colon X\to Y$ and a closed monomorphism $U\hookrightarrow X$, then the pullback $f^*U\hookrightarrow X$ is also a closed monomorphism.
In the category of topological spaces, the closed monomorphisms exist by definition. In fact, they can all be realized as pullbacks of the monomorphism $\mathbf 1\to\Sigma$ corresponding to the non-open singleton in the Sierpinski space $\Sigma$ consisting of two points, of which only one of the two singletons is open. However, they don't really have an intrinsic characterization in the category of topological spaces; they're an additional structure.
By contract, in the category of affine schemes, the closed monomorphisms do have a categorical characterization: they are the regular monomorphisms, i.e. the equalizers. Indeed, in terms of coordinate rings (the opposite category), these correspond to coequalizers, which are exactly the quotients of rings. This should also work for affine varieties considered as a subcategory of affine schemes. Since any diagonal morphism is an equalizer, you get that all affine schemes (and all affine varieties) are Hausdorff (which the algebraic geometers call separated).
Regarding closed subschemes of schemes or closed subvarieties of varieties, the way in which schemes and varieties can be thought of as the results of gluing affine schemes or affine varieties along "open" embeddings, it turns out that a criterion for being a closed monomorphism is that it restricts to a closed monomorphism of each affine scheme or affine variety. This then gives a notion of a separated scheme or variety as one for which the diagonal monomorphism restricts to a closed embedding (i.e. equalizer) of each affine "open" subscheme.