Which distance gives rise to the geometric mean? The arithmetic mean has the nice property of minimising the sum of squares, or in other words, minimising the sum of quadratic-euclidean distances. Formally, given a set of points $x_0, \dots, x_n \in \mathbb{R}^d$, the arithmetic mean, $\mu = \frac{1}{n} \sum_{i=1}^n x_i$, is the unique solution to the equation
$$\mu = \underset{x \in \mathbb{R}^d}{\operatorname{argmin}} \sum_{i=1}^n d^2(x_i, x) \, ,$$
where $d$ denotes the Euclidean distance. I was wondering if there exists a distance measure on $\mathbb{R}$ that has a similar property for the geometric mean, i.e.

Question
Is there a distance measure $d$ on $\mathbb{R}$ such that for any set of points $x_1, \dots, x_n \in \mathbb{R}$ we have
$$ \sqrt[n]{x_1 \cdot \dots \cdot x_n} = \underset{x \in \mathbb{R}^d}{\operatorname{argmin}} \sum_{i=1}^n d^2(x_i, x) \; \textbf{?}$$
 A: Let $\alpha = (x_1x_2...x_n)^\frac{1}{n} $.  Then, $\ln(\alpha) = \frac{1}{n} \sum{\ln(x_i)}$ so because of the property you stated, $$\ln(\alpha) = \underset{x \in \mathbb{R}^d}{\operatorname{argmin}} \sum_{i=1}^n d^2(\ln(x_i), x)$$
Which implies that
$$\alpha = \underset{x \in \mathbb{R}^d}{\operatorname{argmin}} \sum_{i=1}^n d^2(\ln(x_i), \ln(x))$$
Then you can substitute to find the new metric
$$\delta^2(x, y) = d^2(\ln(x), \ln(y)) = (\ln(x) - \ln(y))^2$$
$$\delta(x, y) = \displaystyle\left\lvert \ln{\frac{x}{y}} \right\rvert$$
A: Consider the metric $d:(0,\infty)^2 \rightarrow [0,\infty)$ defined by $$d(x,y)=\Bigg|\ln\Big(\frac{y}{x}\Big)\Bigg|$$ This is the metric you're looking for. Given a dataset $\{x_1,\ldots ,x_n\}\subseteq (0,\infty)$ define a function $f$ on $(0,\infty)$ by $$f(x)=\sum_{i=1}^nd^2(x,x_i)=\sum_{i=1}^n(\ln(x)-\ln(x_i))^2$$ Taking a derivative yields $$f'(x)=\frac{2}{x}\sum_{i=1}^n(\ln(x)-\ln(x_i))=0 \iff \ln(x)=\frac{1}{n}\sum_{i=1}^n\ln(x_i)$$ This shows $x=(x_1 \times \dots \times x_n)^{1/n}$ is a critical point of $f$. Now since $f$ is continuous on $(0,\infty)$, is bounded below by $0$, and $f(x)\rightarrow \infty$ as $x \rightarrow 0^+$ or as $x \rightarrow \infty$, we see that $f$ attains a global minimum at its critical point.
