Open and Closed Sets in the Discrete Metric Space

# Open and Closed Sets in the Discrete Metric Space

Recall from the Open and Closed Sets in Metric Spaces page that if $(M, d)$ is a metric space then a subset $S \subseteq M$ is said to be either open if $S = \mathrm{int} (S)$. Furthermore, $S$ is said to be closed if $S^c$ is open, and $S$ is said to be clopen if $S$ is both open and closed.

We also noted that a set $S$ may be neither open, closed, or clopen.

We will now look at the open and closed sets of a particular interesting example of a metric space - the discrete metric space - which can be obtained by taking a nonempty set $M$ with The Discrete Metric defined for all $x, y \in M$ by:

(1)\begin{align} \quad d(x, y) = \left\{\begin{matrix} 0 & \mathrm{if} \: x = y\\ 1 & \mathrm{if} \: x \neq y \end{matrix}\right. \end{align}

We will now show that for every subset $S$ of a discrete metric space is both closed and open, i.e., clopen.

Theorem 1: Let $(M, d)$ be the discrete metric space where for all $x, y \in M$, $d(x, y) = \left\{\begin{matrix} 0 & \mathrm{if} \: x = y\\ 1 & \mathrm{if} \: x \neq y \end{matrix}\right.$. Then every subset $S \subseteq M$ is clopen. |

**Proof:**We first show that every singleton set is open. Consider the set $\{ x \}$ and consider the ball $B \left ( x, \frac{1}{2} \right )$. Since $d(x, y) = 1$ if and only if $x \neq y$, we see that the ball centered at $x$ with radius $r = \frac{1}{2} > 0$ contains only $x$ and that:

\begin{align} \quad B \left ( x, \frac{1}{2} \right ) \subseteq \{ x \} = \{ x \} \end{align}

- Therefore $\{ x \}$ is open.

- Now more generally, for any subset $S \subseteq M$ where $x \in S$ we see that $B \left ( x, \frac{1}{2} \right ) = \{ x \} \subseteq S$, so $S$ is open.

- Now consider the complement $S^c = M \setminus S$. If $y \in S^c$ then once again, $B \left (y, \frac{1}{2} \right ) = \{ y \} \subseteq S^c$ so $S^c$ is open. But then by definition, $S$ is also closed, so $S$ is clopen. $\blacksquare$