I know the sets which are both open and closed in $\mathbb{R}$ are $\emptyset,\mathbb{R}$. Now I consider in $\mathbb{R}^n$.
Attempt at a Proof:
- Suppose $A\neq\emptyset,\mathbb{R}^n$.
- If $q\in A$ then any line which through $q$ is contained in $A$.
- $A=\mathbb{R}^n$.
It's hints of my teachers but i don't have any ideal to solve.
A line is homeomorphic to $\mathbb R $... so by what you know, the set $A\cap l=l $, where l is the line... (For $A\cap l $ will be clopen in $l \equiv \mathbb R $ ).
To finish, if $A $ contains every line through $q $, $A=\mathbb R^n $...