# How is length a set function?

Our textbook states "The lenght l(I) of an interval I is defined to be the difference of the endpoints of I if I is bounded, and infinity if I is unbounded. Lenght is an example of a set function, that is, a function that assosiates an extended real number to each set in a collection of sets."

I'm having trouble understanding how a set function applies to length. For example, if we have an interval [-1,1], what is the extended real number? And what is the set that it is assosiated with?

-
The length of $[-1,1]$ is $2$. (The difference between its endpoints.) – mrf Jan 22 '13 at 18:14

Let $S$ be the set of intervals $\subset \mathbb R$. That is a subset of $P(\mathbb R)$, i.e. a set of sets. For each $I\in S$, the length $l(I)$ is an element of $\mathbb R\cup\{-\infty,+\infty\}$, hence an extended real number (of course we additionally know that $l(I)$ is nonnegative).
So the extended real number associated with $[-1,1]$ is its length, $2$. And the set that is associated with is just $[-1,1]$ itself.
First of all, an interval is a set. The length of this interval is 2, so 2 is associated with the set/interval $[-1,1]$.