I need to show that $\mathbb{R} \times \mathbb{R}$ in the dictionary order topology is metrizable. So I need to find a metric that induces the dictionary order topology on $\mathbb{R} \times \mathbb{R}$. I saw some solutions online. But they give a metric without any explanations on how did they come up with this metric.
I'd like to know a general way to construct a metric that induces a given topology if the topological space is metrizable.
There is in fact a sort of procedure, if you can apply a standard metrisation theorem like Bing-Nagata-Smirnov (or easier: Urysohn) using special bases. But that's not the idea with the lexicographical plane. There you must get a feel for the space: small neighbourhoods of a point $(x,y)$ are of the form $\{x\} \times (y-r, y+r)$, because keeping the $x$-coordinate constant keeps you "close". Such an interval shows (as it hits no other vertical lines) that all verticals are open and closed sets, so the plane is now very disconnected, and e.g. $(\frac{1}{n}, 0)$ does not converge to $(0,0)$ as it does usually.
So we have a disjoint "sum" of vertical copies of the real line and this gives rise to a metric in an easy way: just give two points with different $x$-coordinates distance $1$ and all horizontal lines as discrete topological/metric spaces and see that $\mathbb{R} \times_l \mathbb{R} \simeq (\mathbb{R}, D) \times (\mathbb{R}, d)$, where $D$ is the discrete metric and $d$ the Euclidean one, which is metrisable as a product of two metric spaces.