# Showing that $(1,2)$ is an open set

I was reading an example and it said $(1,2)$ is an open set in $(\mathbb{R},|.|)$. It showed that $(1,2)$ is an open set as follows:

Let $x \in (1,2)$ and $\delta = \min\{x-1,2-x\}$. Then $B(x,\delta) \in (1,2)$. Thus $(1,2)$ is open.

I understand what they did, but the only part Im not sure is, how did they choose that $\delta = \min\{x-1,2-x\}$? Is it baesd on your own intuition or is that a standard way to define $\delta$?

What would be a standard way to show that a set is open or closed?

-

You want to find a $\delta>0$ such that $(x-\delta,x+\delta)\subseteq(1,2)$. To do that, you must choose $\delta$ so that $x-\delta\ge 1$ and $x+\delta\le 2$. Solve those inequalities for $\delta$, and you find that need to have $\delta\le x-1$ and $\delta\le 2-x$. The easiest way to make both of these things happen is to choose $\delta$ to be the smaller of the two numbers $x-1$ and $2-x$.

If you’re visually oriented, a picture may help:

                      1         x                     2
---------|---------|---------------------|--------
|<- x-1 ->|<------- 2-x ------->|


You need to choose $\delta$ so that $x-\delta$ doesn’t reach to the left past $1$, and $x+\delta$ doesn’t reach to the right past $2$. The distance from $x$ to $1$ is $x-1$, so $\delta$ has to be at most this distance. Similarly, it has to be at most $2-x$, the distance from $x$ to $2$.

In general the details of choosing a $\delta$ that ‘works’ depend very much on the specific problem. Here it’s easy, because we can write down very simple necessary and sufficient requirements that $\delta$ must meet.

-
Thanks Brian, very nice answer and clear to understand! –  Steven May 21 '12 at 21:30

$\delta$ is chosen such that $x$ is "$\delta$ away from each end of the interval $(1,2)$". It means that $(x-\delta, x+\delta) \subset (1,2)$.

You achieve exactly this by choosing $\delta$ as $\min (x-1, 2-x)$.

-
Thanks @MattN. So if I want to show that a set is open, do I just have to find a delta such that $(x-\delta, x+\delta) \subset \text{the set}$? –  Steven May 21 '12 at 21:09
@Steven Yes! Exactly : ) That's the definition of open set for metric spaces. –  Rudy the Reindeer May 21 '12 at 21:10
Okay, thanks again! –  Steven May 21 '12 at 21:30

The standard way to show that a set is open is from the definition, show that it contains a neighborhood of each of its points. This is what Matt and Brian showed above. To show a set is closed, it is often easier to show that its complement is open. One can always show that a set is open by showing that its complement is closed. In your case, the complement of (1,2) is the union of two closed intervals. But the union of any finite number of closed sets is closed, so you are done. As usual, what way you proceed is going to be dictated by the tools and concepts that you have available, and by what you feel most comfortable with.

-
Thanks for your suggestions, yes I think i need to practice more examples to get a better feel for it. –  Steven May 21 '12 at 21:30
But then Steven would have to show that the two intervals $]-\infty,1]$ and $[2,\infty[$ are closed :-) –  Thomas E. May 22 '12 at 12:48