absolute difference
{{Short description|Absolute value of (x - y), a metric}}
File:Absolute difference.svg.]]
The absolute difference of two real numbers and is given by , the absolute value of their difference. It describes the distance on the real line between the points corresponding to and , and is a special case of the Lp distance for all . Its applications in statistics include the absolute deviation from a central tendency.
Properties
Absolute difference has the following properties:
- For , (zero is the identity element on non-negative numbers)
- For all , (every element is its own inverse element)
- (non-negativity){{cite book
| last = Kubrusly | first = Carlos S.
| doi = 10.1007/978-1-4757-3328-0
| isbn = 9781475733280
| location = Boston
| page = 86
| publisher = Birkhäuser
| title = Elements of Operator Theory
| url = https://books.google.com/books?id=0ijlBwAAQBAJ&pg=PA86
| year = 2001}}
- if and only if (nonzero for distinct arguments).
- (symmetry or commutativity).
- (the triangle inequality);{{cite book|title=An Introduction to Metric Spaces and Fixed Point Theory|first1=Mohamed A.|last1=Khamsi|first2=William A.|last2=Kirk|publisher=John Wiley & Sons|year=2011|isbn=9781118031322|contribution=1.3 The triangle inequality in |pages=7–8|contribution-url=https://books.google.com/books?id=3ZlpXpedkasC&pg=PA7}} equality holds if and only if or .
Because it is non-negative, nonzero for distinct arguments, symmetric, and obeys the triangle inequality, the real numbers form a metric space with the absolute difference as its distance, the familiar measure of distance along a line.{{cite book|title=Functional Analysis with Applications|first1=Svetlin G.|last1=Georgiev|first2=Khaled|last2=Zennir|publisher=Walter de Gruyter GmbH|year=2019|isbn=9783110657722|page=25|url=https://books.google.com/books?id=1XicDwAAQBAJ&pg=PA25}} It has been called "the most natural metric space",{{sfnp|Khamsi|Kirk|2011|p=14}} and "the most important concrete metric space". This distance generalizes in many different ways to higher dimensions, as a special case of the Lp distances for all , including the and cases (taxicab geometry and Euclidean distance, respectively). It is also the one-dimensional special case of hyperbolic distance.
Instead of , the absolute difference may also be expressed as Generalizing this to more than two values, in any subset of the real numbers which has an infimum and a supremum, the absolute difference between any two numbers in is less or equal then the absolute difference of the infimum and supremum {{nowrap|of .}}
The absolute difference takes non-negative integers to non-negative integers. As a binary operation that is commutative but not associative, with an identity element on the non-negative numbers, the absolute difference gives the non-negative numbers (whether real or integer) the algebraic structure of a commutative magma with identity.{{cite journal
| last1 = Talukdar | first1 = D.
| last2 = Das | first2 = N. R.
| date = July 1996
| doi = 10.2307/3619592
| issue = 488
| journal = The Mathematical Gazette
| jstor = 3619592
| pages = 401–404
| title = 80.33 Measuring associativity in a groupoid of natural numbers
| volume = 80}}
Applications
The absolute difference is used to define the relative difference, the absolute difference between a given value and a reference value divided by the reference value itself.{{cite book|title=Puzzles, Paradoxes, and Problem Solving: An Introduction to Mathematical Thinking|first1=Marilyn A.|last1=Reba|first2=Douglas R.|last2=Shier|publisher=CRC Press|year=2014|isbn=9781482297935|page=463|url=https://books.google.com/books?id=4rDNBQAAQBAJ&pg=PA463}}
In the theory of graceful labelings in graph theory, vertices are labeled by natural numbers and edges are labeled by the absolute difference of the numbers at their two vertices. A labeling of this type is graceful when the edge labels are distinct and consecutive from 1 to the number of edges.{{cite book
| last = Golomb | first = Solomon W. | author-link = Solomon W. Golomb
| editor-last = Read | editor-first = Ronald C. | editor-link = Ronald C. Read
| contribution = How to number a graph
| doi = 10.1016/B978-1-4832-3187-7.50008-8
| mr = 340107
| pages = 23–37
| publisher = Academic Press
| title = Graph Theory and Computing
| url = https://books.google.com/books?id=ja7iBQAAQBAJ&pg=PA23
| year = 1972}}
As well as being a special case of the Lp distances, absolute difference can be used to define Chebyshev distance (L∞), in which the distance between points is the maximum or supremum of the absolute differences of their coordinates.{{cite book|title=Statistical Pattern Recognition|first=Andrew R.|last=Webb|edition=2nd|publisher=John Wiley & Sons|year=2003|isbn=9780470854785|page=421|url=https://books.google.com/books?id=ivMBWCe_f0gC&pg=PA421}}
In statistics, the absolute deviation of a sampled number from a central tendency is its absolute difference from the center, the average absolute deviation is the average of the absolute deviations of a collection of samples, and least absolute deviations is a method for robust statistics based on minimizing the average absolute deviation.
References
{{reflist}}
External links
- {{MathWorld | urlname=AbsoluteDifference | title=Absolute Difference}}
{{Real numbers}}