This is a trick question:
benorin said:
How do you know this is so? If had, say, S=(0,1) (the segment of the real line strictly between 0 and 1) what then is f(0) ?
I was trying to ensure you understood why "I know in (a) that since x is not in S, then the metric distance between x,y is larger than zero..."
Understand that if y is the particular point in S whose distance to x is a minimum, then f(x)-||x-y||, that is to say the value of f(x) is that minimum distance between x and y.
A geometric example will help: We're in \mathbb{R}^2. Let S be the unit square [0,1]x[0,1]. Now fix a point x in \mathbb{R}^2, I'll pick x=(2,1/2). Now f[(2,1/2)] can be determined as follows:
first, find the point in S (the unit square) which is closest to (2,1/2) (which is x in our example), and denote this "closest point" by y. So what is y? Well clearly y is on the right-hand edge of the unit square S since were it not, we could easily find a point in S that is closer to (2,1/2). Every point on the right-hand edge of S is of the form (1,t), where 0\leq t\leq 1. The distance d between (1,t) and (2,1/2) is given by the usual distance formula
d=\sqrt{(2-1)^2+(1/2 -t)^2}=\sqrt{1+(1/2 -t)^2}
and we seek the value of t with 0\leq t\leq 1 that minimizes d. We reason that the minimum occurs for t=1/2 and hence determine that y=(1,1/2).
Second, we recall that f(x) is the distance between x and y, i.e. f(x)=||x-y||, and, in this example, the distance is given by the usual formula, so we have
f[(2,1/2)] = ||(2,1/2)-(1,1/2)||=\sqrt{(1-2)^2+(1/2 -1/2)^2}=1.
Which makes sense, if you think about the diagram (you should draw one).
End Geometric Example.
Notice that in the above example S was a closed set. In the so-called trick question I posed at the top of this post, S was (0,1) on the real line (which is
not a closed set) and I had asked what then is f(0)? We would first determine the point y in (0,1) whose distance to 0 is a minimum, at least we would if there were such a point, but 0 is a limit point of (0,1) so there are infinitely many points in (0,1) infinitely close to 0, but there is always one closer... strictly speaking, there is no point y in (0,1) of minimum distance to 0, but there is an infimum (the inf) of the set of such distances, which is 0 (this is the value of the distance, not the point y at which it occurs), and thus f(0)=0. But notice that 0 (the point) is not in S, and yet we have f(0)=0 and not f(0)>0. Why?
Answer: S is
not closed. In the example where S was the unit square in R^2, S was closed. Can you find a point z in R^2 that is not is S such that f(z)=0? Why not?