# Is the maximum link length function convex?

Given $x_i$'s in $\mathbb{R}^2$ and $\mathcal{S}$ defined arbitrarily as a set of two $x_i$'s, i.e., $$\mathcal{S}=\{(x_1,x_4), (x_2, x_3), (x_3, x_6), (x_6,x_4), (x_4, x_7)\},$$ the function is defined by $$f(x_1, x_2, \ldots, x_n)=\max_{(x,y) \in \mathcal{S}} \lVert x-y \rVert.$$

The physical meaning of $f$ is the maximum edge length in a tree, where the tree has $n$ vertices and $\lvert\mathcal{S}\rvert$ edges.

Is the function $f$ convex?

In general, if $f_\alpha$ are convex, then $f=\sup_\alpha f_\alpha$ is convex.
In the above case, the functions (indexed by $i,j$ rather than $\alpha$) are $(x_1,...,x_n) \to \|x_i-x_j\|$ which are convex.
That is, the function $f: (\mathbb{R}^2)^n \to \mathbb{R}$ is convex.