Prove that every set of the form $\{x|a<x<b\}$ is open and every set of the form $\{x|a\leq x\leq b\}$ is closed.

analysisreal-analysis

Prove that every set of the form $\{x|a<x<b\}$ is open and every set of the form $\{x|a\leq x\leq b\}$ is closed.

I think I have it down for closed. If $x\in [a,b]\subset \mathbb R$. Then $[a,b]$ is an accumulation point on $[a,b]$. Since for any neighborhood around any element of the set contains infinitely many points in the set, then this set is closed.

What about when it's $(a,b)$? I'm not sure what to do here.

Best Answer

For any $y\in(a,b)$ Let $\epsilon=\text{min}(\{y-a,b-y\})$ and note that $\epsilon>0$. Then $$a=y-(y-a)\leq y-\epsilon < z < y+\epsilon \leq y + (b-y)=b$$ for all $z\in N(y;\epsilon)$, the neighborhood centered around $y$ with radius $\epsilon$. Thus $N(y;\epsilon)\subseteq\{x|a<x<b\}$ so as @user328442 pointed out, $(a,b)$ is open.

I don't follow the argument you made for $[a,b]$, but for this case you would show by a similar construction to the one above that any point not in $[a,b]$ has a neighborhood that doesn't intersect $[a,b]$, meaning that if a point is outside of $[a,b]$ then it can't be an accumulation point. Thus, $[a,b]$ is closed.