Every metric is continuous
This fact struck me as very not obvious and super interesting. I thought I’d provide a proof of it here; this is problem 3a of section 20 in James R. Munkres’ Topology, 2nd. Edition.
Proof: Let $X$ be any metric space with some metric $d:X\times X\rightarrow\mathbb R$, and let $U$ be open in $\mathbb R$. Consider any point $(x,y)\in d^{-1}(U)$, and select a basis element $(\alpha, \beta)$ of $\mathbb R$ for which $d(x,y)\in (\alpha, \beta)\subset U$. Pick a number $\epsilon > 0$ such that $d(x,y)\in (d(x,y)-\epsilon, d(x,y)+\epsilon)\subset (\alpha, \beta)$ (convince yourself that that’s reasonable if you have to--it seems to come in handy in a lot of these kinds of arguments). Now, consider the following sets: $$A=B_d(x, \frac{\epsilon}{2})$$ and $$B= B_d(y, \frac{\epsilon}{2}).$$ Since both $A$ and $B$ are open in $X$ due to the fact that $x$ and $y$ both came from $X$, $A\times B$ belong to a basis for $X\times X$; further, observe that $(x,y)$ itself belongs to $A\times B$. Let $(x_0, y_0)\in A\times B$. On the one hand, we have:
$$d(x,x_0)+d(y,y_0) < \epsilon$$ which implies
$$d(x_0,x)+d(x,y)+d(y,y_0) < d(x,y)+\epsilon$$
and further, by the triangle inequality and symmetry of $d$, that
$$d(x_0,y_0) < d(x,y)+\epsilon < \beta.$$
On the other hand, we have: $$d(x_0, y_0)+\epsilon > d(x_0, y_0)+d(x,x_0)+d(y,y_0)$$ and so
$$ d(x_0, y_0)+\epsilon > d(x,y)$$ and finally
$$d(x_0,y_0) > d(x,y)-\epsilon > \alpha.$$
Therefore $d(x_0, y_0)\in (\alpha, \beta)\subset U$, which means that $(x_0, y_0)\in d^{-1}(U)$, and so $(x,y)\in A\times B\subset d^{-1}(U)$ meaning that $d$ is continuous. ∎











