Doubt in the definition of distance $d(x,A)$ between a point $x$ in and a subset $A$ of a metric space If $ (X,d) $ is a metric space and $A$ is a subset of $X$, then, for $x$ belonging to $X$, we define $$d(x,A)= \inf \{d(x,a) : a \in A\}.$$ My question is, Why do we use infimum in the definition, and why not minimum, average, supremum, etc.?
 A: We can think of $d(x, A)$ as measuring the distance from $x$ to the set $A$: Informally, if we're in Germany and someone asks in English what is the distance to France, probably the person wants to know how far it is to the nearest point on the French border, rather than to the middle (or even further point) of France. (I do not know whether this default sense of distance to a region is uniform across languages.)
Then, one uses the infimum rather than the minimum as the former always exists, whereas the latter does not. Consider, for example, $X = \Bbb R$ endowed with the usual metric $d(x, y) = |x - y|$ and $A = \Bbb R_+ = \{y \in \Bbb R : y > 0\}$. Then, the set $\{d(0, a) : a \in A\}$ is just $A$ itself, but this has no smallest element, and so the minimum of this set does not exist, but its infimum ($0$) does.
Note that one can certainly ask for the average distance between a point $x$ and the points in a set $X$, and sometimes one does want this, but in general one needs more than a metric space structure to do this, namely, something like a measure, which tells us how to weight each part of the metric space $X$ when computing our average.
A: You're standing at $(1,0)$ in $R^2$, looking down on the open interval $(0,\infty)$. Is there a closest point to you? Is there a minimum?
No, any point you pick, there is an even closer one to you than that. ($(x/2,0)$ is closer to you that $(x,0)$ for any $x>0.$)
Closedness of set guarantees existence of a minimizer.
