# Relatively compact subset of open set in $\mathbb{R}^n$

Why is the following true? I saw it on Wikipedia but found no proof in the referenced book. Let $U\subseteq \Bbb R^n$ be an open subset. A subset $A\subseteq U$ is relatively compact in $U$, if and only if $A$ is bounded and the closure of $A$ in $\Bbb R^n$ does not intersect the boundary of $U$.

-
Isn't $A$ relatively compact because it is bounded? Just apply Heine-Borel, or am I missing something? If the coordinates of elements of $A$ are bounded by $M$, then $\overline{A}$ is bounded by $2M$. –  akkkk Dec 10 '12 at 19:28
Agreed. The closure of a set is closed, and we assume it is bounded. In a metric space, this is equivalent to compact. It is necessary to assume it doesn't intersect the boundary otherwise you can construct a sequence converging to the boundary for which there is no convergent subsequence, which would make the set $A$ not compact. –  Clayton Dec 10 '12 at 19:29
Relative compact in $U$, not in $\mathbb{R}^n$. –  Cantor Dec 10 '12 at 19:30
What if closure of $A$ is not contained in $U$? –  Cantor Dec 10 '12 at 19:32
Ugh, this is why I secretly hate mathematics. –  akkkk Dec 10 '12 at 19:32

The closure of $A$ relative to $U$ denoted by $\text{cl}_U(A)$ equals $\text{cl}(A)\cap U$. Since $\text{cl}(A)\subseteq\text{cl}(U)=U\bigsqcup\partial U$ and does not intersect the boundary, it is contained in $U$. Hence $\text{cl}_U(A)=\text{cl}(A)$. Since $A$ is bounded, so is the closure, and therefore it is compact.
Conversely, if the boundary of $A$ intersects $\partial U$, then it is not contained in $U$, and we have $\text{cl}_U(A)\subset\text{cl}(A)$. In this case $\text{cl}_U(A)$ is not closed and consequently not compact.
As people pointed out, you can apply the Heine-Borel theorem to the closure of $A$, you just need to make sure the closure stays inside $U$ and that is why you need the condition that the closure does not intersect boundary of $U$.