In the context of uniform continuity in our analysis course we often need compact sets or compact subsets to prove certain properties. I am not sure if I have fully understood how to construct a compact subset and why we are allowed to do this. May be someone can give me an explanation to the following issue.
Let's assume that $M\subseteq \mathbb{R}^n$ is an open set, with $M\neq\emptyset$ . As $M$ is open there exists a neighbourhood for an arbitrary point $m\in M$: $U_{\delta}(m):= \{x\in M~|~\Vert x-m\Vert<\delta\}\subset M$, where $\delta >0$. Now, I simply take a $\delta_0$ with $0<\delta_0<\delta$ and define a compact subset by $C:=\{x\in M~|~\Vert x-m\Vert\leq\delta_0\}\subset M$. Is this correct?
Is it possible to construct a compact subset in this way when we don't have furhter information on $M$ (open, not-open, closed, not-closed)?
If $M$, yes, what you did is correct: the set $C$ that you have difined is compact.
If there is no assumption about $M$, then it may well happen that the only compact subsets of $M$ are the finite ones (note that every finite subset of $\Bbb R^n$ is compact). That's the case is, for instance, $M=\Bbb Q^n$.