Let (X,)(X,\|\cdot\|) be a , and let ΩX\Omega\subseteq X be nonempty. The distance function to Ω\Omega is

dΩ(x):=inf{xw:wΩ}.d_\Omega(x):=\inf\{\|x-w\|: w\in \Omega\}.
Properties
  • dΩ(x)=0d_\Omega(x)=0 if and only if xΩx\in\overline{\Omega}.
  • dΩd_\Omega is 11-Lipschitz:
    dΩ(x)dΩ(y)xy.|d_\Omega(x)-d_\Omega(y)|\leq \|x-y\|.
  • If Ω\Omega is , then dΩd_\Omega is convex.

Conversely, if Ω\Omega is closed and dΩd_\Omega is convex, then Ω\Omega is convex.

Examples
  • If Ω={0}\Omega=\{0\}, then dΩ(x)=xd_\Omega(x)=\|x\|.
  • If Ω\Omega is the closed ball with center x0x_0 and radius rr, then
    dΩ(x)=max{xx0r,0}.d_\Omega(x)=\max\{\|x-x_0\|-r,0\}.