A colleague in algebra asked me this, and I couldn't answer it. On the [Wikipedia page for "epimorphism"](http://en.wikipedia.org/wiki/Epimorphism) it is claimed that in the category of Hausdorff spaces and continuous maps, a function is epi if and only if it has dense range. The "if" case is easy, but I couldn't justify the "only if" case.


This boils down to: let Y be a Hausdorff space, and let X in Y be a closed subset not equal to Y, and not empty. Can you find a Hausdorff space Z and functions f,g:Y->Z such that f and g agree on X, but are not equal. I think, by using a quotient argument, you can assume that X is just a point.



Functions separting points in Hausdorff spaces
Let $Y$ be a Hausdorff space, and let $X\subset Y$ be a closed subspace. Consider disjoint union of two copies of $Y$, and let $Z$ be the coequalizer of two embeddings of $X$ into it
(that is, we glue two copies of $Y$ along $X$). Clearly, the two natural maps $\iota\_{1,2}:Y\to Z$ coincide only on $X$. It is easy to see that $Z$ is Hausdorff.


Indeed, take $z\_1,z\_2\in Z$, $z\_1\ne z\_2$. The map $p:Z\to Y$ is continuous, so if $p(z\_1)\ne p(z\_2)$, we can take preimages of open neighborhoods of $p(z\_1)$ and $p(z\_2)$ to separate $z\_1$ and $z\_2$. It remains to deal with the case $z\_{1,2}=\iota\_{1,2}(y)$ for $y\in Y-X$.
But the neighborhoods $\iota\_{1,2}(Y-X)$ work.


