
In
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, convex metric spaces are, intuitively,
metric space
In mathematics, a metric space is a Set (mathematics), set together with a notion of ''distance'' between its Element (mathematics), elements, usually called point (geometry), points. The distance is measured by a function (mathematics), functi ...
s with the property any "segment" joining two points in that space has other points in it besides the endpoints.
Formally, consider a
metric space
In mathematics, a metric space is a Set (mathematics), set together with a notion of ''distance'' between its Element (mathematics), elements, usually called point (geometry), points. The distance is measured by a function (mathematics), functi ...
(''X'', ''d'') 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
:
that is, the
triangle inequality
In mathematics, the triangle inequality states that for any triangle, the sum of the lengths of any two sides must be greater than or equal to the length of the remaining side.
This statement permits the inclusion of Degeneracy (mathematics)#T ...
becomes an equality. A convex metric space is a metric space (''X'', ''d'') 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:
* does not imply convexity in the usual sense for subsets of
Euclidean space
Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are ''Euclidean spaces ...
(see the example of the rational numbers)
* nor does it imply
path-connectedness (see the example of the rational numbers)
* nor does it imply
geodesic convexity for
Riemannian manifolds (consider, for example, the Euclidean plane with a closed disc removed).
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
and
in such a space, the set of all points
satisfying the above "triangle equality" forms the
line segment
In geometry, a line segment is a part of a line (mathematics), straight line that is bounded by two distinct endpoints (its extreme points), and contains every Point (geometry), point on the line that is between its endpoints. It is a special c ...
between
and
which always has other points except
and
in fact, it has a
continuum of points.

* Any
convex set
In geometry, a set of points is convex if it contains every line segment between two points in the set.
For example, a solid cube (geometry), cube is a convex set, but anything that is hollow or has an indent, for example, a crescent shape, is n ...
in a Euclidean space is a convex metric space with the induced Euclidean norm. For
closed set
In geometry, topology, and related branches of mathematics, a closed set is a Set (mathematics), set whose complement (set theory), complement is an open set. In a topological space, a closed set can be defined as a set which contains all its lim ...
s 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
A circle is a shape consisting of all point (geometry), points in a plane (mathematics), plane that are at a given distance from a given point, the Centre (geometry), centre. The distance between any point of the circle and the centre is cal ...
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
be a metric space (which is not necessarily convex). A subset
of
is called a metric segment between two distinct points
and
in
if there exists a closed interval