# Both open and closed set.

Does there exist a set in $R^n$ which is both open and closed (which is not the empty set or its complement)?

I don't see why there shouldn't be one, but I can't find it, and I can't prove it doesn't exist.

• If there was then it would imply $\mathbb{R}^n$ was disconnected which is not the case because it is path connected – Jack Apr 26 '17 at 21:39

No, the only sets that are both open and closed in $\mathbb{R}^n$ in the standard topology are the empty set and $\mathbb{R}^n$ itself.
A topological space $X$ is said to be disconnected if there exist two nonempty open sets $U,V \subset X$ so that $U \cup V = X$ and $U \cap V = \emptyset$. A topological space is connected if it is not disconnected. Informally speaking a disconnected space can be broken into open "pieces." But you see immediately that if $U$ is open and $V$ is its complement, $V$ is both open and closed, as is $U$. So an equivalent definition is that a connected space has no nontrivial open and closed subsets.
Now, one can show that intervals in $\mathbb{R}$ are connected. This requires a proof, but it's intuitively believable as the intervals come only in one "piece," so to speak. It's also true that the finite Cartesian product of connected sets are connected. From this it follows that $\mathbb{R}^n$ is connected. In particular, it has only the trivial clopen (both open and closed) sets $\emptyset$ and $\mathbb{R}^n$.