Given a metric space $(X,d)$, the set $X$ and $\varnothing$ are both open and closed in $X$

general-topologymetric-spacesreal-analysis

When I started learning about metric spaces, I came across the following lemma: Given a metric space (X,d), the set X and ∅ are both open and closed in X.

I know there are very similar questions asked here, and I looked at them. However, there is something that I don't understand about it.

If X is a closed set, how can X be a open in X? By definition, if X is open in X, we can always find an open ball such that for all ε>0 there is an element x∈Χ for all x (B(x,ε)). But since X is closed, there would be contradiction at both endpoints in X, which leads to the fact that we can't find an open ball at endpoints of X if X is closed.

Since I still haven't understood this after looking at similar questions asked here, I am sure that there is some fundamental things that I'm missing or misunderstanding. If someone can help me understand what seems to be lacking in my understanding, it would be really helpful.

Best Answer

But since X is closed, there would be contradiction at both endpoints in X,

What's an endpoint of $X$? There is no such thing in general metric spaces. I think you consider something like $X=[0,1]$ with the Euclidean distance and you consider open balls around $0$. But in this space, for example $B(0,\frac{1}{2})=[0,\frac{1}{2})$. Or $B(0,2)=[0,1]$. Note that here our universe is $[0,1]$, there is no real line $\mathbb{R}$.

So I think that what actually confuses you is that the term "open" and "closed" applied to intervals is not the same as "open" and "closed" applied to subsets of a metric space. These may or may not coincide, depending on $X$.

Here's how you typically define open and closed in a metric space:

Open: A subset $A$ of a metric space $(X,d)$ is open if and only if for any $x\in A$ there is $\epsilon>0$ such that the open ball $B(x,\epsilon)=\{y\in X\ |\ d(y,x)<\epsilon\}$ is fully contained in $A$.

Closed: A subset $A$ of a metric space $(X,d)$ is closed if and only if given a sequence $(x_n)_{n=1}^{\infty}$ such that $x_i\in A$ for all $i$ and such that $(x_n)$ converges to some $x\in X$ we actually have that $x\in A$.

Then you have a theorem that a subset $A\subseteq X$ is closed if and only if $X\backslash A$ is open. And vice versa: $A\subseteq X$ is open if and only if $X\backslash A$ is closed.

But there still can be subsets that are both open and closed at the same time. So lets consider $A=X$.

Open: Let $x\in A$. Does there exists an open ball $B(x,\epsilon)$ fully contained in $A$? Of course, any ball is fully contained in $A$, since $A=X$.

Closed: Let $(x_n)$ be a sequence in $A$ convergent to some $x\in X$. Does it imply that $x\in A$? Of course, this is trivially true, since $A=X$.