The Length Function on the Set of Intervals
The length of a bounded interval can be unambiguously defined as the difference of its leftmost endpoint and its rightmost endpoint, and the length of an unbounded interval can be defined as $\infty$. This is defined formally below.
Definition: The Length Function on the set of intervals in $\mathbb{R}$ is the function $l : \{ I : I \: \mathrm{is \: an \: interval \: in \:} \mathbb{R} \} \to [0, \infty) \cup \{ \infty \}$ defined for all intervals $I \subseteq \mathbb{R}$ with endpoints $a, b \in \mathbb{R}^*$ by: $l(I) = \left\{\begin{matrix}b - a & \mathrm{if} \: I \: \mathrm{is \: bounded} \\ \infty & \mathrm{if} \: I \: \mathrm{is \: unbounded} \end{matrix}\right.$. |
The notation "$\mathbb{R}^*$" denotes the set of extended real numbers. That is, $\mathbb{R}^* = \mathbb{R} \cup \{ -\infty, \infty \}$.
For example, the interval $(1, 5)$ is bounded and has length:
(1)And similarly, the interval $[1, 5]$ has length $l([1, 5]) = 5 - 1$. On the other hand, the interval $[2, \infty)$ is unbounded and by definition, $l([2, \infty)) = \infty$.
The length function defined above has many nice properties. For example, let $I \subseteq \mathbb{R}$ be an interval with endpoints $a, b \in \mathbb{R}^*$ and for $c \in \mathbb{R}$ define $I + c$ as the interval whose endpoints are $(a + c), (b + c) \in \mathbb{R}^*$ where $(a + c) \in I + c$ if and only if $a \in I$ and $(b + c) \in I + c$ if and only if $b \in I$. Then:
(2)The property above says that the length of an interval $I$ is equal to the length of the interval obtained by starting at $I$ and translating the interval $c$ units on the real line. In other words, $l$ is invariant under the translation of an interval on $\mathbb{R}$. This can easily be proven by the formula for $l$ given in the definition.
Let $\{ I_k : k \in K \}$ be any collection intervals in $\mathbb{R}$ such that $\displaystyle{\bigcup_{k \in K} I_k}$ is itself an interval. Then it can easily be shown that:
(3)Moreover, it can be show that equality holds if and only if for all $k_1, k_2 \in K$ we have that $\mid I_{k_1} \cap I_{k_2} \mid \leq 1$ (any two intervals $I_{k_1}, I_{k_2} \in \{ I_k : k \in K \}$ intersect in at most one point).