Closure and interior of convex set is convex

convex-analysisconvex-hullsconvexity-spacesgeneral-topologymetric-spaces

For a metric space $(X,d)$ and points $x,y \in X$ we define the metric segment between them as the following set:

$\left [ x,y \right ] = \left \{ z \in X : d(x,z)+d(z,y)=d(x,y)\right \}$

We then say that a set $S\subseteq X$ is convex if for all $x,y \in S$ it holds true that $\left [ x,y \right ] \subseteq S$.

If $S$ is convex in $(X,d)$, are $\mathrm{int} \left ( S \right )$ and $\mathrm{cl} \left ( S \right )$ convex in $(X,d)$ as well?

Note: The answer from Theo Bendit is a really nice counterexample to the convexity of $\mathrm{int}(C)$. However, I am looking for a counterexample for the convexity of $\mathrm{int}(C)$ for which it would be easy to check that $C$ is a convex set.

Thank you in advance!

Best Answer

Not necessarily, to both.

For the closure, let $$X = [(0, 0), (1, 0)] \cup [(1, 0), (1, 1)] \cup [(1, 1), (0, 1)] \subseteq \Bbb{R}^2,$$ with the Euclidean metric. Since the Euclidean norm is strictly convex, the metric line segment in $\Bbb{R}^2$ corresponds to the usual line segment. Therefore, the metric line segment in $X$ corresponds to the usual line segment in $\Bbb{R}^2$ intersected with $X$. So, convexity of $C \subseteq X$ corresponds to whether all the points in $X$ along the usual line segment between two points lie within $C$.

With this in mind, we choose $C = X \setminus [(1, 0), (1, 1)]$. This is a union of two semi-open line segments, and this set is convex. Its closure is $C \cup \{(1,0), (1, 1)\}$, which is not convex, as the entirety of $[(1, 0), (1, 1)]$ lies in the (metric) line segment between $(1, 0)$ and $(1, 1)$, e.g. $(1, 1/2)$.

The interior is a little more tricky; I don't think subspaces of normed linear spaces will cut it. Define: $$X = \Bbb{R}^2 \setminus \{(x, y) \in \Bbb{R}^2 : |x| = 1, y \neq 0\}$$ Essentially, $X$ is $\Bbb{R}^2$ cut into $3$ pieces by the lines $x = 1$ and $x = -1$, with only the points $(1, 0)$ and $(-1, 0)$ bridging them. We define a metric $d$ based on the shortest path (with the Euclidean metric) between two points. That is, if two points lie in the same "piece" (e.g. if both $x$ coordinates were less than $-1$) then it is the same as the Euclidean metric. If two points lie on either side of a "bridge" (e.g. if $(x_1, y_1)$ and $(x_2, y_2)$ satisfy $-1 < x_1 < 1 < x_2$), then the metric is the sum of the distance of each point to the bridge (in our example, $\|(x_1, y_1) - (1, 0)\| + \|(1, 0) - (x_2, y_2)\|$). If we have $x_1 < -1 < 1 < x_2$, then the distance is $\|(x_1, y_1) - (-1, 0)\| + 2 + \|(x_2, y_2) - (1, 0)\|$. Hopefully, you get the idea!

This is a metric, and we can form a convex set: $$C = \{(x, y) : |x| > 1\} \cup [(-1, 0), (1, 0)].$$ That is, the two outside "pieces" of the metric space, with a direct line segment between the two bridges. This is a convex set, but the interior $\{(x, y) : |x| > 1\}$ is not convex. In particular, the point $(0, 0)$ lies on the metric line segment between $(-2, 0)$ and $(2, 0)$.

EDIT: In response to a comment, I'll elaborate on why $C$ is convex. I warn you: this isn't elegant.

There are three "parts" to the set $C$: the halfspaces $\{(x, y) : x < -1\}$ and $\{(x, y) : x < -1\}$, as well as the bridge between them, $[(-1, 0), (0, 1)]$. If we look at these three "parts" individually, the metric is identical to the Euclidean metric on $\Bbb{R}^2$. This implies that the metric line segments are just regular line segments on these three sets, so convexity means the same as in $\Bbb{R}^2$. That is, each set, in isolation, is a convex set (but of course, this doesn't imply that the union is convex!). I'm just pointing out that, if we begin with two points, both in the same "part", then the metric line segment (which is a usual line segment) lies within that same "part", and hence within $C$.

The interesting bit is when we have two points in different parts. There are three cases here, but two are essentially the same (one point in one of the two half-spaces, the other in the bridge). Even one of these cases is long, so I'll stick to just proving one case.

Let's suppose we have $(x_0, y_0)$ where $x_0 < -1$ and $(x_1, y_1)$ where $(x_1, y_1) \in [(-1, 0), (1, 0)]$. That is, $y_1 = 0$ and $-1 \le x_1 \le 1$. I claim that the metric line segment is: $$[(x_0, y_0), (-1, 0)] \cup [(-1, 0), (x_1, y_1)].$$ This is a subset of $X$; the latter segment is contained in the bridge $[(-1, 0), (1, 0)]$, while the former segment is contained in $\{(x, y) : x < -1\}$, except for the endpoint $(-1, 0)$, which is contained in the bridge!

The distance between $(x_0, y_0)$ and $(x_1, y_1)$, according to my informal description of the metric on $X$, is the sum of the (Euclidean) lengths of these line segments. That is, \begin{align*} d((x_0, y_0), (x_1, y_1)) &= \sqrt{(x_0 + 1)^2 + y_0^2} + \sqrt{(x_1 + 1)^2 + y_1^2} \\ &= \sqrt{(x_0 + 1)^2 + y_0^2} + x_1 + 1. \end{align*}

Let us suppose that $(x_2, y_2) \in X$ lies in the metric line segment. We have three cases: $X$ could be in one of the half-spaces, or lie on the bridge. Suppose first that $x_2 > 1$, i.e. it lies on clearly the wrong half-space. Then, \begin{align*} d((x_0, y_0), (x_2, y_2)) &= \sqrt{(x_0 + 1)^2 + y_0^2} + 2 + \sqrt{(x_2 - 1)^2 + y_2^2} \\ &> \sqrt{(x_0 + 1)^2 + y_0^2} + 2 \\ &\ge \sqrt{(x_0 + 1)^2 + y_0^2} + |x_1 + 1| \\ &\ge d((x_0, y_0), (x_1, y_1)) \\ &\ge d((x_0, y_0), (x_1, y_1)) + d((x_1, y_1), (x_2, y_2)), \end{align*} since $x_2 > 1$ and $-1 \le x_1 \le 1$. This shows $(x_2, y_2)$ is not in the metric line segment. Thus, $(x_2, y_2)$ must lie either on the bridge, or satisfy $x_2 < -1$.

Suppose the former is true. Note that $y_2 = 0$ in this case, and $-1 \le x_2 \le 1$. I further claim that $-1 \le x_2 \le x_1$. If this is not the case, then $x_1 < x_2 \le 1$. We have, \begin{align*} d((x_0, y_0), (x_2, y_2)) &= \sqrt{(x_0 + 1)^2 + y_0^2} + x_2 + 1 \\ &> \sqrt{(x_0 + 1)^2 + y_0^2} + x_1 + 1 \\ &= d((x_0, y_0), (x_1, y_1)), \end{align*} which once again precludes $(x_2, y_2)$ from belonging to the metric line segment. So, $-1 \le x_2 \le x_1$, which puts $(x_2, y_2)$ in $[(-1, 0), (x_1, y_1)]$, which is a subset of the proposed metric line segment.

Otherwise, $x_2 < -1$. Since it belongs to the metric line segment, we have $$d((x_0, y_0), (x_2, y_2)) + d((x_2, y_2), (x_1, y_1)) = d((x_0, y_0), (x_1, y_1)).$$ Equivalently, using the definition of the metric, $$\|(x_0, y_0)-(x_2,y_2)\|_2 + \|(x_2, y_2)-(-1,0)\|_2 + x_1 + 1 = \|(x_0, y_0)-(-1,0)\|_2 + x_1 + 1.$$ Simplifying, $$\|(x_0, y_0)-(x_2,y_2)\|_2 + \|(x_2, y_2)-(-1,0)\|_2 = \|(x_0, y_0)-(-1,0)\|_2,$$ which is to say, $(x_2, y_2)$ lies on the Euclidean line segment between $(x_0, y_0)$ and $(-1, 0)$, i.e. $$(x_2, y_2) \in [(x_0, y_0), (-1, 0)].$$ Either way, $$(x_2, y_2) \in [(x_0, y_0), (-1, 0)] \cup [(-1, 0), (x_1, y_1)].$$ So, the metric line segment is contained in this set. As this answer is getting seriously bloated, I won't prove the other inclusion: every point in this union of line segments lies in the metric line segment. But, hopefully this gives you an idea of why $C$ is convex.