# Proving that a sphere is a closed set

I have to prove that a sphere centered at $x_0$ with radius $r$

$S(x_0,r) = \{x \in X | d(x,x_0) = r\}$

is a closed set.

I know I should prove that the complement is open. If I take a point $y$ inside the complement and consider the open ball with radius $\epsilon = \frac{d-r}{2}$ where $d$ is the distance from $x_0$ to $y$ I have to show that the distance $d(x_0,y) > r$. This is where I am stuck. I thought about using the triangle inequality, but I am sure how to proceed. Any help would be greatly appreicated.

• You have to specify who is $X$ and its topology. Sometimes spheres are not closed. – SphericalTriangle Mar 21 '18 at 22:19
• @SphericalTriangle, no, that's wrong. Sphere defined as above is always closed. – xyzzyz Mar 21 '18 at 22:20
• You can view it as a preimage of a point under a continuous map. Then there is nothing to prove really. – lanskey Mar 21 '18 at 22:21
• @lanskey If the map is continuous. In particular if the topology is given by that metric. – SphericalTriangle Mar 21 '18 at 22:22
• Of course the topology is given by metric here. The question would be absolute nonsense otherwise. – xyzzyz Mar 21 '18 at 22:23

Take $y$ in the complement of your sphere, $S(x_0, r)^c$.

If $y$ is inside the sphere, meaning $d(x_0, y) < r$, then consider $\varepsilon = r - d(x_0, y) > 0$ and the open ball $B(y, \varepsilon)$.

For $z \in B(y, \varepsilon)$ we have

$$d(x_0, z) \le d(x_0, y) + d(y,z) < d(x_0, y) + r - d(x_0, r) = r$$

Hence $B(y, \varepsilon) \subseteq S(x_0, r)^c$.

If $y$ is on the outside of the sphere, meaning $d(x_0, y) > r$, then consider $\varepsilon = d(x_0, y) -r > 0$ and the open ball $B(y, \varepsilon)$.

For $z \in B(y, \varepsilon)$ we have

$$d(x_0, y) \le d(x_0, z) + d(y,z) \implies d(x_0, z) \ge d(x_0, y) - d(y,z) > d(x_0, y)- d(x_0, r) +r= r$$

Hence $B(y, \varepsilon) \subseteq S(x_0, r)^c$.

In any case, $S(x_0, r)^c$ is open so $S(x_0, r)$ is closed.

Easiest way to prove this is to first prove that the function $d_{x_0}: X \to \mathbb{R}$, defined as $d_{x_0} = d(x, x_0)$, is continuous (this follows essentially from the triangle inequality for the metric $d$), and then to note that the preimage of a closed set under a continuous function is closed, a singleton set $\{r\}$ is closed in $\mathbb{R}$, and $S(x_0, r) = d_{x_0}^{-1}(\{r\})$.

• If I $X$ has the indiscrete topology and $X$ has more than $1$ point, you are not going to be able to prove any continuity. – SphericalTriangle Mar 21 '18 at 22:24
• @sphericalTriangle I think $X$ is supposed to be a metric space, otherwise it wouldn't make any sense to consider a distance. – Javi Mar 21 '18 at 22:27
• @Javi You can have a metric space and still need to work with another topology. – SphericalTriangle Mar 21 '18 at 22:28
• @sphericalTriangle that's so unnatural that it should be specified. – Javi Mar 21 '18 at 22:30
• @SphericalTriangle: it is absolutely clear what the problem is asking to prove, and what the topology here is. There's no need to mention that the topology is induced by metric every time this is the case, especially as the context doesn't give any alternative topology to be considered. There's no need to be rude either, which you are right now. – xyzzyz Mar 21 '18 at 22:30