I am sort of new to topology, and I have the following question:
The question seems really verbose at first, but after thinking about it for a really long time, it makes sense intuitively. I just don't know how to go about proving this fact. I have defined a closed ball $B$ centered at $a$ and considering $f : B \cap D \rightarrow \mathbb{R}$ defined by $f(x) = |x - a|$.
Can somebody please help me proceed? It will be much appreciated.
A continuous real-valued function on a compact set attains its minimum. Let $d\in D$ and let $r=|d-a|$ Then $S=\{x \in D| |x-a| \leq r\}$ is compact, because it is the intersection of a closed ball (which is compact) with the closed set $D$. So, the function $f$ which you have defined attains its infimum at some point of $S\subseteq D$