# Open and closed sets in a metric space

I'm having a little trouble understanding the definition of open and closed set in a metric space.
I'm going to use an excersize:

Lets consider $Y:=(-1,1]$ with the usual metric of $\Bbb R$. Decide whether these sets are open or closed in $Y$:
(i) $(-1,1]$
(ii) $(-\frac 12,0]$
(iii) $(-1,0]$

(i) I say is open, since there's a proposition somewhere that says:

Every metric space is open in itself

Maybe the proof needs a little clarification for me. Says that we can take any $x\in X$ and for every $\varepsilon >0$ we get that $B_X(x,\varepsilon)\subset X$, hence every elemente in $X$ is an interior point. I don't see why this is true, if we suppouse that $X$ has an element such that it is a contact point (I belive we can assume that since the only hypothesis is that $X$ is a metric space), then we can't find any open ball that stays completly in $X$, I know I'm missing something, but I can't see what, (I know is not the same to say open in $\Bbb R$). Also, is there an analogue version of this but with closed? like, every set is closed in itself?

(ii)I say this isn't nor open nor closed, since $0$ is a contact point and $-\frac 12$ is too a contact point but is not included in the set. Am I using the definition of contact point well for these points? Also, in wich case this set would be closed? maybe if we had $[-\frac 12,0]$?

(iii)I think is closed, since it contains all of its contact points. Is it ok for me to think that $-\frac 12$ is a contact point? I think it is, since for every $\varepsilon>0$ we have that $B_X(-\frac 12,\varepsilon) \cap (-1,0]\neq \varnothing$.

• How could $B_X(x,\varepsilon)$ not be contained in $X$? Write down carefully the definition of $B_X(x,\varepsilon)$. – JSchlather Sep 11 '13 at 16:44
• @JSchlather I think I understand now, let me paraphrase it, to see if I'm right. $B_X(x_0,\varepsilon)=\{ x\in X| d_X(x,x_0)<\varepsilon\}$ means: all the elements of $X$ such that their distance to the center is below $\varepsilon$, so the worst that can happen is that the only element of the ball is $x_0$. – Ana Galois Sep 11 '13 at 18:57

Another approach:

Suppose we have some metric space $(M,d)$, and a subset $M' \subset M$. Then $(M',d)$ is a metric space as well. Then a set $U' \subset M'$ is open iff there is some open $U \subset M$ such that $U'=U \cap M'$. This is fairly straightforward to prove. It is also straightforward to prove the corresponding result for closed sets.

In your examples, $M=\mathbb{R}$ with the usual metric and $M'=(-1,1]$. So, your examples can be written as:

(i) $(-1,1] = \mathbb{R} \cap M'$, so $(-1,1]$ is both open and closed in $Y$.

(ii) Needs a little more attention. If $(-\frac{1}{2}, 0] = U \cap M'$, where $U$ is open in $\mathbb{R}$, then we would also have $(-\epsilon,\epsilon) \subset (-\frac{1}{2}, 0]$ for some $\epsilon>0$, so it cannot be open. Similarly, if $(-\frac{1}{2}, 0] = C \cap M'$, where $C$ is closed in $\mathbb{R}$, then we would also have $\frac{1}{2} \in (-\frac{1}{2}, 0]$, so it cannot be closed.

(iii) $(-1,0] = (-\infty,0] \cap M'$, so $(-1,0]$ is closed in $M'$, and the same line of reasoning for (ii) shows that it cannot be open in $M'$.

• That propsition is very pretty, thanks. However, it's a little difficult for me to see what you did on (ii). Why if for some $\varepsilon>0$ then $(-\varepsilon ,\varepsilon)\subset (-\frac 12 ,0]$ then $(-\frac 12 ,0]$ is not open? Also, why would $\frac 12 \in (-\frac 12 ,0]$? – Ana Galois Sep 11 '13 at 19:21
• We are trying to show that $(-\frac{1}{2},0]$ is notopen. I do this by contradiction; suppose it is open, then $(-\frac{1}{2},0] = U \cap M'$ for some open $U$ (in $\mathbb{R}$). Since $0 \in (-\frac{1}{2},0] \subset U$, we must have some open set containing $0$ contained in $U$. I use $(-\epsilon,\epsilon)$ to denote such a set. If $(-\epsilon,\epsilon) \subset U$, then it means $(-\epsilon,\epsilon) \subset U \cap M'$ (since $M'=(-1,1]$), and so $(-\epsilon,\epsilon) \subset (-\frac{1}{2},0]$, which is a contradiction. – copper.hat Sep 11 '13 at 19:29

use the result. Let $X$ be a metric space and $A$ be a subspace (i.e. a subset of $X$ which os a metric space in its own right) of $X$. A set $B$ in $A$ will be open if there is a open set $C$ in $X$ s.t. $B = A \cap C$. Similarly $B$ will be closed in $A$ if there is a closed set $C$ in $X$ s.t. $B = A \cap C$. Convers are also true. You shall get the proofs in any standerd book of metric space.

Now apply this result on your examples one by one.

1. $(-1,1]$ is an intersection of $(-1 , 2)$ (which is open in $\mathbb{R}$) with $Y$ ans so open. Also it is an intersection of $[-1,1]$ (closed in $\mathbb{R}$) with $Y$. So $(-1,1]$ is closed in $Y$.

2. $(-\frac{1}{2},0)$ is not an intersection of $Y$ with any open set or closed set of $\mathbb{R}$. So it is neither open nor closed in $Y$.

3. $(-1,0]$ is an intersection if $Y$ with $[-1,0]$ which is closed in $\mathbb{R}$ and so closed on $Y$.

• Thanks! But are you saying that the intersection of an open (closed) set with another set (wich we don't know if its open or closed) is open (closed)? – Ana Galois Sep 11 '13 at 18:46