Measuring the size of sets
People measure sets all the time. A bag of marbles is measured by counting them, a road by its length, a field by its area, a metal bar by its weight. These are four different ways of attaching a number to a collection of things, and they look nothing alike, yet they obey the same few rules. This lesson finds those rules, turns them into the definition of a measure, and explains why one of them, countable additivity, has to be stronger than it first looks. Everything else in this track is built on that definition. The lessons that follow ask which sets can be measured at all, how length itself is constructed, and how to add up values of a function the way we add up sizes of sets.
Four ways to measure a set
A set is a collection of things, called its elements. To measure a set is to attach a number to it that says how big it is. Four examples will be used throughout this track, so they are worth setting up carefully. In each of them there is an underlying set that contains everything we may talk about, and a rule that takes a part of and returns the number , read "mu of ".
Counting on the faces of a die. Let and let be the number of faces in . The even faces have , and .
Length on the interval $[0, 1]$. Let and let be the length of . The interval has length . This measure is written from now on.
Area in the unit square. Let and let be the area of . The whole square has area 1. A disc of radius inside it has area , and the rectangle has area .
Mass on a rod. Picture a thin rod of length 1 that gets thicker towards its right end. At position the rod has density , meaning mass per unit of length. A short piece of length near position then weighs about , and adding up the pieces of a stretch is the familiar integral
The whole rod has mass . The left half has mass and the right half has mass : the two halves have the same length, but the right half is three times as heavy.
In all four examples the number belongs to a set of positions and not to one position. The weight of a single point of the rod can be asked for, but the answer is 0; the interesting questions are about stretches, regions and groups of faces.
Rules every size obeys
What do counting, length, area and mass have in common? Only a short list of rules, and three of them are all that is needed.
Sizes are not negative: . Without this rule a bigger set could be smaller than a part of itself.
The empty set has size 0: . A set with no elements has nothing to count, no length, no area and no mass. This rule also follows from the next one whenever some set has a finite size, because a set together with the empty set is still , and the two are disjoint, which means they have no element in common. The next rule then gives , which forces . The rule is stated separately to rule out a silly rival that gives every set, even the empty one, the size .
Disjoint pieces add up: if and are disjoint, then
This is the rule that makes a measure useful. On the die, the pieces and have sizes 2 and 2, and their union has size 4. For length, and have lengths and , and together . On the rod, the halves and weigh and , and together . Because of additivity, the size of a complicated set follows from the sizes of simple pieces that it can be cut into; without it, a size would be an arbitrary label on each set, and knowing the sizes of the parts would say nothing about the whole. By repeating the rule, it also holds for any finite number of pairwise disjoint sets.
The word "disjoint" matters. The sets and have lengths and , but their union has length , not , because the stretch belongs to both and may be counted only once. The diameter of a set, the distance between its two farthest points, gives to each of the single points and but to the pair ; it is not a measure in the sense of this lesson.
Consequences of additivity
The three rules have many consequences, and the first few come from one trick: cut a set into disjoint pieces and add. Below, all sets are taken from the collection of sets that is being measured, and it is assumed that this collection contains the unions, intersections and differences that appear. The next lesson, "σ-algebras and Borel sets", says exactly what the collection has to look like.
Monotonicity. Suppose , so that is a part of . Then is the union of and the rest, , the elements of that are not in , and these two are disjoint:
A part is never larger than the whole. If is finite, the same equation can be solved for the size of the rest:
The condition on is needed. The half-line is part of , both have infinite length, and the rest has length 1. The formula would read , which can be any number you like.
Inclusion–exclusion. Take two overlapping intervals, and , with lengths and . They overlap in , of length . Cut the union into three disjoint pieces: the part only in , the overlap, and the part only in . Then
Adding these two equations counts the overlap twice and the other two pieces once each. The union is exactly those three pieces, so
In words: adding the sizes of and counts the overlap twice, so it has to be subtracted once. With the numbers above, , which is the length of . The formula is valid when the sizes are finite. On the die, and have size 3 each and share the two faces , so their union has size .
Subadditivity. The overlap has a non-negative size, so inclusion–exclusion gives . For the intervals above, . The size of a union is at most the sum of the sizes, with equality exactly when the overlap has size 0. This is often called the union bound, and repeating it extends it to any finite number of sets.
Countable additivity
Additivity as stated deals with two sets at a time, and therefore with any finite number of sets. Limits, however, involve infinitely many steps, and it turns out that the rule has to reach that far. Here is an example where infinitely many pieces appear naturally. Cut at , then cut what is left at , then at , and so on, always keeping the left piece. The -th piece is
The first three pieces are , and , with lengths , and . After pieces, finite additivity says that a total length of has been used; for that is . The pieces never run out, and together they fill all of , whose length is 1. Finite additivity says nothing about "all pieces together", yet the natural thing to ask is that the infinite sum gives the length of the whole.
A measure is therefore required to be countably additive: for every sequence of pairwise disjoint sets , that is, a list in which there is a first set, a second set and so on,
Is the extra strength necessary, or is finite additivity enough? An example shows that it is not enough. For a set of positive integers, count how many of its elements are among the first integers and divide by . If this fraction settles down to a limit as grows, call the limit the natural density . The even numbers have density : among the first 1,000 integers exactly 500 are even. The multiples of 3 have density . A single integer such as has density 0, since tends to 0, while the set of all positive integers has density 1. For sets that have a density, disjoint pieces do add: the even and the odd numbers have densities and , and together they have density 1.
So natural density follows the rules of the previous section, except that not every set has a density. It fails countable additivity badly. The set is the union of the countably many single-number sets , which are disjoint and each have density 0, but . A size like that cannot be trusted with limits: cutting a set into more and more pieces and adding their sizes may give a different answer from the size of the whole. This is why measure theory insists on countable additivity.
A measure takes a whole set as its input. The length of is not obtained by adding something attached to each point; in counting and in point masses it is, but in length, area and density it is not, since every single point has length 0.
The rule stops at countable families, and has to. The interval is the union of its points, and each point has length 0, but the length of is 1. A family of pieces that cannot be listed one after another, called uncountable, can add up to something that the sizes of the pieces do not predict. Countable additivity is the strongest form of the rule that length, area and mass satisfy.
The definition of a measure
Everything so far fits into one definition. A measure on a set is a function , defined on a collection of subsets of , whose values lie in , such that
- , and
- is countably additive: for every sequence of pairwise disjoint sets of the collection.
Non-negativity is built into the range , and finite additivity is a special case of the second rule: for disjoint and , take the sequence and use the first rule on the empty sets,
The value is allowed because it is needed. The counting measure of the positive integers is infinite, and so is the length of the whole real line. Arithmetic with it follows the obvious rule that plus anything is , and a series of non-negative terms that does not converge has the sum .
The phrase "a collection of subsets" hides a real question: which sets get a size? When is finite, the answer is simple, every subset. On it is not, and for the moment it is enough to know that the collection contains the intervals and everything that can be built from them by taking complements, differences and countable unions. The lesson "σ-algebras and Borel sets" turns this into a precise definition and shows why we cannot always allow every subset.
Examples of measures
The measures of the first section fit the definition, and there are others.
- Counting measure. is the number of elements of , and if there are infinitely many. Countable additivity is clear, since the elements of a union of disjoint sets are counted once each.
- Dirac measure. Fix a point of . The measure puts all its mass at that one point: if and otherwise. On , and . On the die, and . Disjoint sets cannot both contain , so additivity holds.
- Weighted point masses. Put weights on points and set , which means that is the sum of the weights of the points that lie in . Counting measure is the case where all weights equal 1. A loaded die, with weight on the face 6 and on each other face, has and .
- Length and area. The measures on and area on the unit square. Showing that they are countably additive on all the sets one would like to measure is not trivial, and a later lesson of this track does it; until then only intervals, rectangles and discs are needed.
- A measure with a density. Given a function on , set . The rod of the first section has , and length is the case . Unlike a point mass, a measure with a density gives every single point the mass 0: the mass is spread out thinly instead of being concentrated.
The figure puts one pair of sets through four of these measures. It measures two intervals and of under length, under counting on the ten points , under weighted points with mass at , at and at , and under the rod density . Choose the measure with the buttons, move the four sliders to change and , and compare the readouts. With the default and , length gives , , and , as computed above. Counting gives , , and : contains the points , and contains . Weighted points give , , and , because contains the masses at and and only the one at . The rod gives , , and . In every case the last readout equals .
Two things are worth trying. Move to the right until it no longer touches : the overlap has size 0 and the sizes simply add. Then set both ends of to , so that is a single point: length, counting and the rod all give 0, while the weighted points still give . Some measures see single points and some do not.
- μ(A)
- 0.40
- μ(B)
- 0.50
- μ(A ∩ B)
- 0.20
- μ(A ∪ B)
- 0.70
- μ(A) + μ(B) − μ(A ∩ B)
- 0.70
Whatever the measure, μ(A) + μ(B) − μ(A ∩ B) equals μ(A ∪ B): inclusion–exclusion is a consequence of additivity.
Finite, infinite and probability measures
The size of the whole space, , is the total mass of the measure. A measure is finite if its total mass is finite and infinite otherwise. Counting on the die has total mass 6, length on has total mass 1, and the rod has total mass 1. Counting on and length on the real line have total mass .
A finite measure with positive total mass can always be rescaled so that its total mass is exactly 1: divide every size by the total. Counting on the die divided by 6 gives each face the size , and the even faces . The rescaled version is again a measure, because dividing by a constant keeps every rule, and it has total mass 1. A measure of total mass 1 is called a probability measure. The loaded die of the previous section, the rod and length on are already probability measures. In the probability part of this track, is read as the chance that something lands in , and the whole subject is measure theory with this one extra normalisation. For now, a probability measure is just a measure whose total mass happens to be 1.
Finite measures allow subtraction, for any , since every size is finite; with infinite measures, subtraction and limits need care, as the next section shows.
Continuity from below and above
Countable additivity has a consequence for sequences of growing and shrinking sets. Start with sets that grow, , and let be their union. To use countable additivity, cut into disjoint rings: , and for , the part that the -th set adds. The rings are disjoint, their union is , and the first of them make up . Therefore
This is continuity from below: the sizes of growing sets grow to the size of the limit set. For example, grows as grows, and its union is . The lengths are , which are for and for , and they tend to . The missing point 0 has length 0, so it makes no difference.
Shrinking sets, with intersection , behave the same way, provided the first set has finite size. Apply the previous argument to the growing sets , whose union is , and subtract from the finite number . This gives continuity from above: when . For example, has length , which tends to 0, the length of the intersection .
The condition of finiteness cannot be dropped. The sets shrink and every one of them has length , but nothing lies in all of them: the intersection is empty and has length 0, while the limit of the lengths is .
The same trick of cutting into disjoint rings also gives the union bound for countably many sets that overlap. Let be arbitrary, and cut the union into the disjoint parts . Each is part of , so by monotonicity, and countable additivity gives .
What this lesson leaves open
A measure is a number attached to sets, obeying three rules that every size obeys, with additivity strengthened to countable families. The definition leaves three questions, and the following lessons of this track answer them one by one. Which collections of sets can carry a measure? The next lesson, "σ-algebras and Borel sets", answers this. Does a countably additive length exist on all those sets? And can a measure be used to add up not just sizes of sets, but values of a function? Each of these needs the definition above, which is why it comes first.
Summary
- Counting, length, area and mass are measures: rules that give a set a number .
- The rules are and additivity for disjoint sets; they give monotonicity, for finite , inclusion–exclusion and the union bound.
- Additivity is demanded for countably many disjoint sets, because natural density is finitely additive but fails for ; it cannot be demanded for uncountably many, since is the union of its points of length 0.
- Examples: counting measure, the Dirac measure , weighted points , length, area and a measure with a density ; a measure of total mass 1 is a probability measure.
- Countable additivity gives continuity from below, and from above when the first set has finite size; the sets show why finiteness is needed.