In analysis, a distance function (also called a metric) on a set of points is a function with four properties; suppose :

1. (non-negativity)

2. if and only if (identity of indiscernibles)

3. (symmetry)

4. (triangle inequality)

Mathematica 7 comes with a variety of built-in distance functions. This Demonstration selects points within a given distance from a locator, using one of these distance functions.