# compact subset of real

Let $T$ be a compact subset of $\mathbb{R}$ and let $p \in \mathbb{R}\setminus T$.

Prove that there exists $q \in T$ such that $|q - p|= \inf \{|x-p|:x \in T\}$

$pf:$ let all $\inf \{|x-p|:x \in T\}=d$; if $T$ is compact then $T$ is closed and $T^c$ is open then you have $p \in T^c$, $N_\epsilon(p) \subseteq T^c$ so : $\color{red}{N_\varepsilon(p) \cap \mathbb{R} = \varnothing}$ then $d \neq 0$. Then $p+d$ or $p-d \in T$, assuming BWOC $p+d$, $p-d \notin T$ now $N_{\varepsilon_1}(p+d) \subseteq T^c$, $N_{\varepsilon_2}(p-d)\subseteq T^c$. if $d$ inf of $T_p$ for all $\varepsilon>0$ $\exists |x-p| \in T_p$ at $(x \in T)$ then you have $d+\varepsilon>|x-p|\ge d$ then $\varepsilon \le \min\{\varepsilon_1,\epsilon_2\}$

case1: $x-p > 0$,

$d+\varepsilon>x-p\ge d$,

$p+d+\varepsilon\>x\ge p+d$

$x \in N_\varepsilon(p+d) \subseteq N_{\varepsilon_1}(p+d) \subseteq T^c$

therefore $x \in T^c$ so it contradiction

case2: $x-p < 0$

$d-\varepsilon < x-p \le d$,

$p-d- \varepsilon < x \le p+d$

$x \in N_\varepsilon (p-d) \subseteq N_{\varepsilon_2} (p-d) \subseteq T^c$

therefore $x \in T^c$ so it contradiction.

Im not sure about case 2 and the red highlighter part, any help would be nice. Think You.

$\bullet \ T$ compact subset of $\mathbb{R}$ implies that $T$ is closed and bounded.

$\bullet$ Let $\ p \in \mathbb{R}-T$. $T$ compact implies that if we consider closure($T$) it is of the form $[-M,M]$.

$\bullet$ If $p \in cl(T)$ then we are done since by assumption this will make $p$ a limit point of $T$.

$\bullet$ If $p$ is not in the closure of $T$ then consider $(q_n) := -M+1/n$ or $q_n:=M-1/n$ which are taken this way depending on the sign of $p$. Thus the limit of any one of these sequence will give infimum of $|x-p|$.

• how one can do that..not sure hmm ;( – jen Dec 7 '14 at 4:59
• Given any $r=d(x,p)$ there exists positive integer $n$ such that $1/n < r$ (Archimedean Property). Is this okay with you now? – Mr.Fry Dec 7 '14 at 5:02
• ok cool..do i need to take out the one in red highlighted? ;) – jen Dec 7 '14 at 5:10
• I think we have different approaches. – Mr.Fry Dec 7 '14 at 5:39
• I got it, Thank you so much ;() – jen Dec 7 '14 at 5:40

You can consider $d=\inf\{ |x−p|:x∈T \}$ and build a open interval $(p-d-\frac{1}{n},p+d+\frac{1}{n})$ in each interval you can find a $a_n \in T$ and this is a sucession on $T$, and you can consider the limit point.