Given a non-discrete topology on a finite set $X$, can you define a metric? Let $ X $ be a finite set and $ \tau $ a topology in $ X $ different from the discrete topology. Is it possible to define a metric in the set $ X $ such that $ \tau $ is the topology associated with the metric?
 A: In general the answer is no. A topology for which such a metric does exist is said to be metrizable, and many topologies are not metrizable, even on finite sets. In fact, the only $T_1$ topology on a finite set is the discrete topology, which of course is metrizable; since a metric space is automatically $T_1$, this means that there is only one metrizable topology on a finite set, the discrete topology. And if the set has more than one element, there are other topologies, starting with the indiscrete topology.
One of the nicer non-metrizable topologies on the set $[n]=\{1,\ldots,n\}$ is the one whose open sets are initial segments: 
$$\tau=\{[k]:k\in[n]\}\cup\{\varnothing\}\;.$$
Since this isn’t $T_1$, it clearly cannot be metrizable. I’ll call it a nest topology on $[n]$.
More generally, if $X$ is any finite set, let $\mathscr{P}$ be a partition of $X$ having at least one part with more one element. Give each $P\in\mathscr{P}$ a nest topology, and make each $P\in\mathscr{P}$ an open set in $X$. The resulting topology is $T_0$ but not $T_1$. The closest you can get to a metrizable space finite space without actually making the topology discrete is a special case of this, in which one part has two points, and the rest have one each. This is what you get if you start with a discrete space and replace one of the points with an open copy of the Sierpiński space. You now have a space with (say) $n+1$ points, $n$ of which are isolated; the remaining point has a smallest nbhd consisting of itself and one of the other points. 
The situation with infinite spaces is much more interesting. You may know some of this already, but this seems a nice opportunity to list some common examples of (mostly quite nice) non-metrizable spaces. All of them are at least $T_1$. The spaces in the second, third, and fifth bullet points are $T_5$ spaces, i.e., $T_1$ and hereditarily normal. And the spaces in the fourth bullet point are Tikhonov provided that the factor spaces are Tikhonov.


*

*The cofinite topology on an infinite set is not metrizable. One way to see this is to note that every metric space is Hausdorff, but the cofinite topology on an infinite set is not Hausdorff. For similar reasons the co-countable topology on an uncountable set is not metrizable.

*The Sorgenfrey line $S$ is not metrizable. One way to see this is to show that $S\times S$, the Sorgenfrey plane, is not normal; since every metric space is normal, and the product of two metric spaces is metrizable, it follows that $S$ cannot be metrizable.

*The one-point compactification $X$ of an uncountable discrete space is a very nice space in many ways, since it’s compact and Hausdorff, but it’s not metrizable: every metric space is first countable, but the point at infinity in $X$ does not have a countable local base.

*The box topology on the product of infinitely many non-trivial spaces is never metrizable, because it’s never first countable.

*An uncountable ordinal $\alpha$ with the linear order topology is never metrizable. If $\alpha>\omega_1$, it isn’t even first countable, and $\omega_1$, the smallest uncountable ordinal, is countably compact but not compact. Since a metric space is compact if and only if it is countably compact, $\omega_1$ cannot be metrizable.
A: In a finite metric space the natural associated topology is always discrete: define $$r:=\min\{d(x,y):x,y\in X, x \neq y\}>0.$$
Then $B(x,r)=\{x\}$ for every $x\in X$, therefore singletons are open.
