In mathematics, convex metric spaces are, intuitively, metric spaces with the property any "segment" joining two points in that space has other points in it besides the endpoints.

Formally, consider a metric space (Xd) and let x and y be two points in X. A point z in X is said to be between x and y if all three points are distinct, and

${\displaystyle d(x,z)+d(z,y)=d(x,y),\,}$

that is, the triangle inequality becomes an equality. A convex metric space is a metric space (Xd) such that, for any two distinct points x and y in X, there exists a third point z in X lying between x and y.

Metric convexity:

## Examples

• Euclidean spaces, that is, the usual three-dimensional space and its analogues for other dimensions, are convex metric spaces. Given any two distinct points ${\displaystyle x}$ and ${\displaystyle y}$ in such a space, the set of all points ${\displaystyle z}$ satisfying the above "triangle equality" forms the line segment between ${\displaystyle x}$ and ${\displaystyle y,}$ which always has other points except ${\displaystyle x}$ and ${\displaystyle y,}$ in fact, it has a continuum of points.
• Any convex set in a Euclidean space is a convex metric space with the induced Euclidean norm. For closed sets the converse is also true: if a closed subset of a Euclidean space together with the induced distance is a convex metric space, then it is a convex set (this is a particular case of a more general statement to be discussed below).
• A circle is a convex metric space, if the distance between two points is defined as the length of the shortest arc on the circle connecting them.

## Metric segments

Let ${\displaystyle (X,d)}$ be a metric space (which is not necessarily convex). A subset ${\displaystyle S}$ of ${\displaystyle X}$ is called a metric segment between two distinct points ${\displaystyle x}$ and ${\displaystyle y}$ in ${\displaystyle X,}$ if there exists a closed interval ${\displaystyle [a,b]}$ on the real line and an isometry

${\displaystyle \gamma :[a,b]\to X,\,}$

such that ${\displaystyle \gamma ([a,b])=S,}$ ${\displaystyle \gamma (a)=x}$ and ${\displaystyle \gamma (b)=y.}$

It is clear that any point in such a metric segment ${\displaystyle S}$ except for the "endpoints" ${\displaystyle x}$ and ${\displaystyle y}$ is between ${\displaystyle x}$ and ${\displaystyle y.}$ As such, if a metric space ${\displaystyle (X,d)}$ admits metric segments between any two distinct points in the space, then it is a convex metric space.

The converse is not true, in general. The rational numbers form a convex metric space with the usual distance, yet there exists no segment connecting two rational numbers which is made up of rational numbers only. If however, ${\displaystyle (X,d)}$ is a convex metric space, and, in addition, it is complete, one can prove that for any two points ${\displaystyle x\neq y}$ in ${\displaystyle X}$ there exists a metric segment connecting them (which is not necessarily unique).

## Convex metric spaces and convex sets

As mentioned in the examples section, closed subsets of Euclidean spaces are convex metric spaces if and only if they are convex sets. It is then natural to think of convex metric spaces as generalizing the notion of convexity beyond Euclidean spaces, with usual linear segments replaced by metric segments.

It is important to note, however, that metric convexity defined this way does not have one of the most important properties of Euclidean convex sets, that being that the intersection of two convex sets is convex. Indeed, as mentioned in the examples section, a circle, with the distance between two points measured along the shortest arc connecting them, is a (complete) convex metric space. Yet, if ${\displaystyle x}$ and ${\displaystyle y}$ are two points on a circle diametrically opposite to each other, there exist two metric segments connecting them (the two arcs into which these points split the circle), and those two arcs are metrically convex, but their intersection is the set ${\displaystyle \{x,y\))$ which is not metrically convex.