Types of Difference
Many quantities compare two things by “how far apart” they are. A difference is the result of subtraction and can be negative. No distance is negative. An error compares an approximation with the truth, a change compares the end with the start, and a set difference removes elements.
Definitions
Think of two numbers, one subtracted from the other. The difference of the two numbers is the result of the subtraction: $7 - 3 = 4$, so the difference of $7$ and $3$ is $4$.
Consider two numbers $a$ and $b$. The difference of $a$ and $b$ is the result $a - b$ of subtraction. It depends on the order and can be negative: $3 - 7 = -4$.
Examples
-
$3 - 7 = -4$ is a difference because it is the result of a subtraction.
-
$9.8 - 9.81 = -0.01$ is a difference, because it is the result of a subtraction.
Non-examplesThings that may be mistaken for examples of this term.
-
$\setdef{1, 2, 3} \setdiff \setdef{2}$ is not a difference of numbers, because removing elements is not subtraction.
Think of two objects, like two houses on a street. The distance between the two houses is how far apart the houses are. No distance is negative.
Consider two points, either on the number line or in the plane. On the number line, the distance between $a$ and $b$ is $\abs{a - b}$. In the plane, the distance between $(x_1, y_1)$ and $(x_2, y_2)$ is $\sqrt{(x_1 - x_2)^2 + (y_1 - y_2)^2}$.
Consider a metric space with metric $d$, and points $x$ and $y$ in it. The distance between $x$ and $y$ is the value $d(x, y)$.
Examples
-
$4$ is the distance from $7$ to $3$ (and from $3$ to $7$) along the real number line.
Non-examplesThings that may be mistaken for examples of this term.
-
$3 - 7 = -4$ is not a distance, because a distance cannot be negative.
-
The distance traveled is $6$ m, not $0$ (the distance between the start and end points is $0$).
Think of an estimate or a measurement of some quantity, like the length of a table. The error of the estimate is how far it is from the true value.
Consider an approximate or measured value $\hat{x}$ of a true value $x$. The error of $\hat{x}$ is how far it is from $x$. The absolute error is $\abs{\hat{x} - x}$, and the relative error is $\abs{\hat{x} - x} / \abs{x}$.
Examples
-
$9.8 - 9.81 = -0.01$ is the (signed) error of the measurement, because it compares the measured value $9.8$ with the true value $9.81$.
-
✓ In floating point arithmetic, $0.1 + 0.2$ evaluates to $0.30000000000000004$ due to rounding errors.The extra $0.00000000000000004$ is an error: the rounding error of floating-point arithmetic.
Think of a quantity that goes up or down, like the temperature during a day. The change in the quantity is how much it went up or down: its final value minus its starting value.
Consider a quantity $x$ with an initial value and a final value. The change in $x$ is the final value minus the initial value:
\[\Delta x = x_{\text{final}} - x_{\text{initial}}.\]It is negative when the quantity decreases.
Examples
-
The change in temperature is $\Delta T = 15 - 20 = -5$ degrees, the end value minus the start value.
Think of a moving object, like a ball rolling across a floor. The displacement of the object is how far, and in which direction, it ended up from where it started.
Consider an object that moved from a starting point $P$ to an ending point $Q$. The displacement of the object is its change in position, as a vector from $P$ to $Q$.
Examples
-
The displacement of the walk is $0$, because the walk ends where it started.
Non-examplesThings that may be mistaken for examples of this term.
-
You end where you started, so the displacement is $0$.
Properties
- The length of the displacement is the straight-line distance between the start and the end, which is at most the distance traveled along the path.
Consider1 two sets $A$ and $B$. The set difference $A \setdiff B$ is the set of elements of $A$ that are not in $B$.
Examples
-
$\setdef{1, 2, 3} \setdiff \setdef{2}$ is a set difference because it removes the elements of $\setdef{2}$ from $\setdef{1, 2, 3}$.
Worked examples
-
Value:
$A \setdiff B = \setdef{1, 2}$
Examples
| Example | difference | distance | error | change | displacement | set difference | Why |
|---|---|---|---|---|---|---|---|
| $3 - 7 = -4$ | ✓ | ✗ | – | – | – | – | difference: $3 - 7 = -4$ is a difference because it is the result of a subtraction.
distance: $3 - 7 = -4$ is not a distance, because a distance cannot be negative.
|
| $\abs{3 - 7} = 4$ | – | ✓ | – | – | – | – | distance: $4$ is the distance from $7$ to $3$ (and from $3$ to $7$) along the real number line.
|
| $9.8 - 9.81 = -0.01$, for a measured value $9.8$ and true value $9.81$ | ✓ | – | ✓ | – | – | – | difference: $9.8 - 9.81 = -0.01$ is a difference, because it is the result of a subtraction.
error: $9.8 - 9.81 = -0.01$ is the (signed) error of the measurement, because it compares the measured value $9.8$ with the true value $9.81$.
|
| A temperature that goes from $20$ to $15$ degrees | – | – | – | ✓ | – | – | change: The change in temperature is $\Delta T = 15 - 20 = -5$ degrees, the end value minus the start value.
|
| Walking $3$ m east and then $3$ m west | – | ✗ | – | – | ✓ | – | distance: The distance traveled is $6$ m, not $0$ (the distance between the start and end points is $0$).
displacement: The displacement of the walk is $0$, because the walk ends where it started.
|
| $\setdef{1, 2, 3} \setdiff \setdef{2} = \setdef{1, 3}$ | ✗ | – | – | – | – | ✓ | difference: $\setdef{1, 2, 3} \setdiff \setdef{2}$ is not a difference of numbers, because removing elements is not subtraction.
set difference: $\setdef{1, 2, 3} \setdiff \setdef{2}$ is a set difference because it removes the elements of $\setdef{2}$ from $\setdef{1, 2, 3}$.
|
Notes
- An offset is a fixed amount added to shift a value or position, such as $b$ in $y = m x + b$. A translation (or shift) moves every point by the same offset.
- “Difference” is used loosely for many of these, so check whether a technical meaning is defined.