Distance Functions
Distance Functions
In analysis, a distance function (also called a metric) on a set of points is a function with four properties; suppose :
S
d:S×S
x,y∈S
1. (non-negativity)
d(x,y)≥0
2. if and only if (identity of indiscernibles)
d(x,y)=0
x=y
3. (symmetry)
d(x,y)=d(y,x)
4. (triangle inequality)
d(x,z)≤d(x,y)+d(y,z)
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.