This lesson assumes some prior understanding of whole numbers, rational numbers, real numbers, and variables.
A set is an unordered collection of mathematical objects. For our purposes, we will use sets as a convenient notation to describe the concept of “one of these kinds of things”. One way to describe a set is to list every object contained in the set: for instance, is a set of four integers. Note that a set itself is a mathematical object!
Remember that a variable is a letter that represents a mathematical object whose value may be unknown. We say “may be unknown” because it is possible we do know the value of a variable. For instance, if I write , this means that I define the variable to refer to the number . But I might also say “Let be an integer (whole number).”; here, we do not know the exact value of , but we have a constraint on it: it must be a whole number.
We can express certain kinds of constraint with set-membership notation. For instance, to say that the value of must be or or , we can write:
How would we express the idea that is an integer with this notation? We obviously cannot list out all the integers, since there are infinitely many. Instead we will adopt a notation for an infinite set of all integers: (a boldface Z). The reason for the choice of the letter Z comes from the German word Zahlen, which means “number”. Thus we can express the constraint “ is an integer” using the notation:
Another kind of constraint we often see is an equation. For example, consider: which states that is an integer and further that . This series of constraints is actually equivalent to , since these are the only two integers whose square is . When we have constraints which define a set, we will often use the more compact notation to describe this set.
We have notation for some important sets that we see frequently:
is the empty set, which has no members.
is the set of natural numbers.
is the set of integers (whole numbers).
is the set of rational numbers (fractions).
is the set of real numbers.
Now we will consider more precisely the concept of , which is called “set memembership”. All sets are collections of mathematical objects. Moreover, this is essentially everything a set is; it provides no additional information on its members. Within a set, there are no special rules or relationships between these objects. For instance, sets do not have an order. Even though we will often write , this is the same set as , because they have the same members.
Furthermore, any object is either a member of , or not a member of . It cannot be a member of multiple times. For instance, if , then actually only has one member . We have written it to look like it contains two members, and . But remember that these are two names for the same mathematical object. Even if we wrote , would still be the same as — there is no multiple membership.
We have to be careful with mathematical objects which can have different names. This includes sets! We can have sets that have other sets as members. For instance, is a set with two members: one is a set containing , and the other is a set containing and . Is a member of this set? It is! is just another name for the set containing and , i.e. , because the order does not matter in a set.
Is ? Yes, since is another name for . These examples illustrate why sometimes deciding whether is not as easy as it might first seem.
In the previous section, we talked about how and are different names for the same set. In other words, they are equal, just as . We can write .
What is the definition of two sets being equal? More formally, we can say that if for every ( is a member of ), ( is a member of also), and for every ( is a member of ), ( is a member of also).
We can split up the definition above of set equality into two pieces. The first piece is that all members of are also members of . The second piece is that all members of are also members of . What if we only had one of these pieces?
Then the two sets are not necessary equal, but they still have a subset relationship. We write to mean that for every , . Note that this is different from ! For instance, (in fact they are equal), but . We read as “ is a subset of ”.
Using this new language, we can see that .
If but they are not equal (there is some member of that is not a member of ), then we say that “ is a proper subset of ” and write .
We have already seen two ways to write down sets. One way is to list all the (finitely) many members of the set, like . Another way is to restrict a bigger set using some constraints, like an equation, like . (There are also, of course, the four infinite sets that we gave special names for.)
Next we will learn how to construct new sets using some existing sets. In particular, imagine we have two sets and . Suppose we want a set whose members include all objects that are members of and also all objects that are members of . We call this new set the union of and , and write . The defining property of the union is:
A similar construction is to, given two sets and , construct a third set whose members are those objects that are both members of and members of . This new set is called the intersection of and , and we write . The defining property of the intersection is: