For clarity: a distance function on a space $X$ is a function $d: X \times X \to \mathbb{R}$ satisfying the axioms for a metric (e.g. triangle inequality). A metric tensor $g$ assigns to each point $p \in X$ a function $g_p: T_p \times T_p \to \mathbb{R}$, where $T_p$ is the tangent space to $p$.
My question: is it possible to derive a metric tensor from a distance function, and vice versa?
For example, in Cartesian coordinates the Euclidean distance corresponds to the metric tensor diag(1, 1) (in two dimensions). But is there also a tensor for the taxicab distance, or for the British Rail distance?
More specifically, does there always exist a tensor such that the smallest curve length between two points is equal to the distance between them according to a given distance function?
Vice versa, for any given metric tensor, is there a distance function satisfying the axioms for a metric such that the distance between two points is equal to the smallest curve length between them?
I hope the question is clear! Thanks in advance for your answers.