In a metric space $(X,d)$, by a closed ball I mean a set of the form $\{y: d(y,x)\le r\}$, where $r > 0$.

A common example where every open ball is a closed set and every closed ball is an open set is the ultrametric spaces: the metric spaces where $d(x,y)\le \max\{d(x,z),d(y,z)\}$. I would like to have an example where every open ball is a closed set but not every closed ball is an open set, and an example vice versa.

Definitions. An open ball is a set of the form $B_r(a) = \{x \mid d(x,a) < r\}$ where $r > 0$. A closed ball is a set of the form $\overline{B}_r(a) = \{x \mid d(x,a) \le r\}$ where $r > 0$.

  • $\begingroup$ Nice question.. $\endgroup$
    – GEdgar
    May 21, 2022 at 14:47
  • $\begingroup$ @GEdgar Thanks! $\endgroup$ May 22, 2022 at 14:55
  • $\begingroup$ I came here today intending to offer a bounty. But it has already been done. $\endgroup$
    – GEdgar
    May 26, 2022 at 14:29
  • $\begingroup$ @GEdgar Since you are intending the same as me, I will offer the bounty to the answer from Jason DeVito :) Thanks again for your contribution and concern for this question! $\endgroup$ May 27, 2022 at 12:44

2 Answers 2


Example 1. In the line, consider the set $X = \{0, 1, 1/2, 1/3, 1/4,\dots\}$ with the usual metric. I claim: every closed ball in $X$ is open in $X$; but the open ball ${B}_1(1)$ is not closed in $X$.


Here's an example going the other direction: all open balls are closed, but there a closed ball which is not open. But let me note that I'm going to use the notation $CB_r(p)$ for the closed ball, rather than $\overline{B}_r(p)$, because the latter notation makes me think of the closure of an open ball. Then one has $\overline{B}_r(p)\subseteq CB_r(p)$, but the inclusion can be strict. E.g., in a discrete metric space $\overline{B}_1(p) = p$, while $CB_1(p)$ is the whole space.

Consider the Hilbert cube $H:=[0,1]^\mathbb{N}$ with metric $d( (x_1,x_2,...), (y_1,y_2,..)) = \sum_i \frac{|x_i - y_i|}{2^i}$.

For each $i\in \mathbb{N}$, let $e_i$ denote the element of $H$ which is all $0$s except for a $1$ in the $i$th slot. So, $e_1 = (1,0,0,..)$, $e_2 = (0,1,0,...)$, etc. I'll also write $0$ for the all-zeroes element $(0,0,...)$

Let $Y\subseteq H$ be given by $Y = \{e_i, 0\}$. Then $Y$ will be the desired example. That is, I claim that 1) every open ball in $Y$ is closed but 2) that there is a closed ball in $Y$ which is not open.

As a preliminary observation, note that for $i\neq j$, that $d(e_i,e_j) = 1/2^i + 1/2^j > \max\{1/2^i, 1/2^j\}$, and that $d(e_i,0) = 1/2^i$. It follows that each $e_i$ is isolated, with, e.g., $B_{1/2^i}(e_i) = \{e_i\}$ being an open ball containing just the one point $e_i$. Moreover, for each $e_i$, $0$ is the unique closest point to it.

Here's the proof of 1) To begin with, note first that every open ball centered at $0$ is closed because the complement can only possible contain some of the $\{e_i\}$ which are all isolated.

So, consider $B = B_{r}(e_i)$, an open ball centered at $e_i$ of radius $r > 0$. Since all the $e_i$ are isolated, the only case we need to consider is if $0\notin B$. But $0$ is the closest point to $e_i$, so if $0$ is not in $B$, then neither are any $e_j$ with $i\neq j$. Thus, any ball around $0$ which doesn't contain $e_i$ witnesses the fact that the complement of $B$ is open. E.g., one can take $B_{1/2^i}(0)$. This concludes the proof of 1).

We now prove 2), that there is a closed ball which is not open. To that end, consider $C:=CB_{1/2}(e_1)$. This set clearly contains $e_1$ and $0$; since $0$ is the unique closest point to $e_1$, it follows that $C = \{e_1,0\}$. So, to show $C$ is not open, it's enough to show that every ball around $0$ contains an $e_i$ other than $e_1$.

But $d(e_i,0) = 1/2^i\rightarrow 0$ as $i\rightarrow \infty$, so any open ball around $0$ contains all but finitely many of the $e_i$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .