Metric projection

In mathematics, a metric projection is a function that maps each element of a metric space to the set of points nearest to that element in some fixed sub-space.

Formal definition
Formally, let X be a metric space with distance metric d, and let M be a fixed subset of X. Then the metric projection associated with M, denoted pM, is the following set-valued function from X to M:"$p_M(x) = \arg\min_{y\in M} d(x,y)$"Equivalently: $$p_M(x) = \{y \in M : d(x,y) \leq d(x,y') \forall y'\in M \} = \{y \in M : d(x,y) = d(x,M) \}$$ The elements in the set $$\arg\min_{y\in M} d(x,y)$$ are also called elements of best approximation. This term comes from constrained optimization: we want to find an element nearer to x, under the constraint that the solution must be a subset of M. The function pM is also called an operator of best approximation.

Chebyshev sets
In general, pM is set-valued, as for every x, there may be many elements in M that have the same nearest distance to x. In the special case in which pM is single-valued, the set M is called a Chebyshev set. As an example, if (X,d) is a Euclidean space (Rn with the Euclidean distance), then a set M is a Chebyshev set if and only if it is closed and convex.

Continuity
If M is non-empty compact set, then the metric projection pM is upper semi-continuous, but might not be lower semi-continuous. But if X is a normed space and M is a finite-dimensional Chebyshev set, then pM is continuous.

Moreover, if X is a Hilbert space and M is closed and convex, then pM is Lipschitz continuous with Lipschitz constant 1.

Applications
Metric projections are used both to investigate theoretical questions in functional analysis and for practical approximation methods. They are also used in constrained optimization.