It is worth noting that the
median (middlemost element) of a
set of
numbers is the point that
minimizes the
sum of the
differences. That is, for a set of
real numbers x
1, ..., x
n, the value
(x1-u) + (x2-u) + ... + (xn-u)
is minimized by setting u to be the median of the set.
Using this definition, we see that if n is even, then any value in the range from xn/2 to xn/2+1 could be considered the median. Additionally, it is possible to extend the definition to cover multi-dimensional sets.