Real Analysis – Proving a Sphere is a Closed Set

elementary-set-theorygeneral-topologyreal-analysis

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.

Best Answer

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\})$.