Diameter (source code)

= Diameter
{title2=$\operatorname{diam}(S)$}
{wiki}

= Diameter of a metric space
{synonym}

The diameter of a subset $S$ of a metric space is
$$
\operatorname{diam}(S)=\sup\{d(x,y):x,y\in S\}.
$$

The diameter of a nonempty subset $S$ of a <metric space> is $\operatorname{diam}(S)=\sup\{d(x,y):x,y\in S\}$. For a Euclidean circle it is the longest chord length; the same definition applies to arbitrary metric subsets.