The most fundamental objects we will use in our studies (and really in all of math) are
sets. Much of what follows might be review, but it is very important that you are fluent in the language of set theory. Most of the notation we use below is standard, although some might be a little different than what you have seen before.
For us, a
set will simply be an unordered collection of objects. Two examples: we could consider the set of all actors who have played
The Doctor on
Doctor Who, or the set of natural numbers between 1 and 10 inclusive. In the first case, Tom Baker is an element (or member) of the set, while Idris Elba, among many others, is not an element of the set. Also, the two examples are of different sets. Two sets are equal exactly if they contain the exact same elements. For example, the set containing all of the vowels in the declaration of independence is precisely the same set as the set of vowels in the word “questionably” (namely, all of them); we do not care about order or repetitions, just whether the element is in the set or not.
Subsection Notation
We need some notation to make talking about sets easier. Consider,
This is read, “ is the set containing the elements 1, 2 and 3.” We use curly braces “” to enclose elements of a set. Some more notation:
The symbol “” is read “is in” or “is an element of.” Thus the above means that is an element of the set containing the letters and Note that this is a true statement. It would also be true to say that is not in that set:
Be warned: we write “” when we wish to express that one of the elements of the set is For example, consider the set,
This is a strange set, to be sure. It contains four elements: the number 1, the letter b, the set
and the empty set
the set containing no elements. Is
in
The answer is no. None of the four elements in
are the letter
so we must conclude that
Similarly, consider the set
Even though the elements of
are elements of
we cannot say that the
set is one of the elements of
Therefore
(Soon we will see that
is a
subset of
but this is different from being an
element of
)
We have described the sets above by listing their elements. Sometimes this is hard to do, especially when there are a lot of elements in the set (perhaps infinitely many). For instance, if we want to be the set of all even natural numbers, would could write,
but this is a little imprecise. A better way would be
Let’s look at this carefully. First, there are some new symbols to digest: “” is the symbol usually used to denote that natural numbers, which we will take to be the set Next, the colon, “:”, is read such that; it separates the elements that are in the set from the condition that the elements in the set must satisfy. So putting this all together, we would read the set as, “the set of all in the natural numbers, such that there exists some in the natural numbers for which is twice ” In other words, the set of all natural numbers, that are even. Here is another way to write the same set.
Note: Sometimes mathematicians use
or
for the “such that” symbol instead of the colon. Also, there is a fairly even split between mathematicians about whether
is an element of the natural numbers, so be careful there.
This notation is usually called
set builder notation. It tells us how to
build a set by telling us precisely the condition elements must meet to gain access (the condition is the logical statement after the “
” symbol). Reading and comprehending sets written in this way takes practice. Here are some more examples:
Example 0.3.1.
Describe each of the following sets both in words and by listing out enough elements to see the pattern.
Solution.
-
This is the set of all numbers which are 3 less than a natural number (i.e., that if you add 3 to them, you get a natural number). The set could also be written as
(note that 0 is a natural number, so
is in this set because
).
-
This is the set of all natural numbers which are 3 less than a natural number. So here we just have
-
This is the set of all integers (positive and negative whole numbers, written
). In other words,
-
Here we want all numbers
such that
and
are natural numbers. There is only one: 0. So we have the set
There is also a subtle variation on set builder notation. While the condition is generally given after the “such that”, sometimes it is hidden in the first part. Here is an example.
Example 0.3.2.
List a few elements in the sets below and describe them in words. The set is the set of integers; positive and negative whole numbers.
-
-
Solution.
-
The set of integers that pass the condition that their square is a natural number. Well, every integer, when you square it, gives you a non-negative integer, so a natural number. Thus
-
Here we are looking for the set of all
s where
is a natural number. So this set is simply the set of perfect squares.
Another way we could have written this set, using more strict set builder notation, would be as
We already have a lot of notation, and there is more yet. Below is a handy chart of symbols. Some of these will be discussed in greater detail as we move forward.
Special sets.
-
The
empty set is the set which contains no elements.
-
The
universe set is the set of all elements.
-
The set of natural numbers. That is,
-
The set of integers. That is,
-
The set of rational numbers.
-
-
The
power set of any set
is the set of all subsets of
Set Theory Notation.
-
We use these
braces to enclose the elements of a set. So
is the set containing 1, 2, and 3.
-
is the set of all
such that is greater than 2.
-
asserts that 2 is
an element of the set
-
because 4
is not an element of the set
-
asserts that
is a subset of : every element of
is also an element of
-
asserts that
is a proper subset of : every element of
is also an element of
but
-
is the
intersection of and : the set containing all elements which are elements of both
and
-
is the
union of and : is the set containing all elements which are elements of
or
or both.
-
is the
Cartesian product of and : the set of all ordered pairs
with
and
-
is
set difference between and : the set containing all elements of
which are not elements of
-
The
complement of is the set of everything which is not an element of
-
The
cardinality (or size) of is the number of elements in
Investigate!
-
Find the cardinality of each set below.
-
-
-
-
Find two sets
and
for which
and
What is
-
Find sets
and
with
such that
and
What is
-
-
For any sets and define If and what is What is
Subsection Relationships Between Sets
We have already said what it means for two sets to be equal: they have exactly the same elements. Thus, for example,
(Remember, the order the elements are written down in does not matter.) Also,
since these are all ways to write the set containing the first three positive integers (how we write them doesn’t matter, just what they are).
What about the sets
and
Clearly
but notice that every element of
is also an element of
Because of this we say that
is a
subset of
or in symbols
or
Both symbols are read “is a subset of.” The difference is that sometimes we want to say that
is either equal to or is a subset of
in which case we use
This is analogous to the difference between
and
Example 0.3.3.
Let
and
Determine which of the following are true, false, or meaningless.
Solution.
-
-
True. Every element in
is an element in
-
False. The elements in
are 1, 2, and 3. The
set is not equal to 1, 2, or 3.
-
False.
has exactly 6 elements, and none of them are the empty set.
-
True. Everything in the empty set (nothing) is also an element of
Notice that the empty set is a subset of every set.
-
Meaningless. A set cannot be less than another set.
-
True.
is one of the elements of the set
-
Meaningless.
is not a set, so it cannot be a subset of another set.
-
True.
is the only element of the set
and is an element of
so every element in
is an element of
In the example above,
is a subset of
You might wonder what other sets are subsets of
If you collect all these subsets of
into a new set, we get a set of sets. We call the set of all subsets of
the
power set of
and write it
Example 0.3.4.
Solution.
is a set of sets, all of which are subsets of So
Notice that while
it is wrong to write
since none of the elements in
are numbers! On the other hand, we do have
because
What does a subset of
look like? Notice that
because not everything in
is in
But we do have
The only element of
is the set
which is also an element of
We could take the collection of all subsets of
and call that
Or even the power set of that set of sets of sets.
Another way to compare sets is by their
size. Notice that in the example above,
has 6 elements and
and
all have 3 elements. The size of a set is called the set’s
cardinality . We would write
and so on. For sets that have a finite number of elements, the cardinality of the set is simply the number of elements in the set. Note that the cardinality of
is 3. We do not count repeats (in fact,
is exactly the same set as
). There are sets with infinite cardinality, such as
the set of rational numbers (written
), the set of even natural numbers, and the set of real numbers (
). It is possible to distinguish between different infinite cardinalities, but that is beyond the scope of this text. For us, a set will either be infinite, or finite; if it is finite, the we can determine its cardinality by counting elements.
Example 0.3.5.
-
-
-
If
what is the cardinality of
Solution.
-
Since
we can conclude that the cardinality of the set is
(you need to add one since 23 is included).
-
Here
The three elements are the number 1, the set
and the empty set.
-
We wrote out the elements of the power set
above, and there are 8 elements (each of which is a set). So
(You might wonder if there is a relationship between
and
for all sets
This is a good question which we will return to in
Chapter 1.)
Subsection Operations On Sets
Is it possible to add two sets? Not really, however there is something similar. If we want to combine two sets to get the collection of objects that are in either set, then we can take the union of the two sets. Symbolically,
read, “ is the union of and ” means that the elements of are exactly the elements which are either an element of or an element of (or an element of both). For example, if and then
The other common operation on sets is intersection. We write,
and say, “ is the intersection of and ” when the elements in are precisely those both in and in So if and then
Often when dealing with sets, we will have some understanding as to what “everything” is. Perhaps we are only concerned with natural numbers. In this case we would say that our universe is Sometimes we denote this universe by Given this context, we might wish to speak of all the elements which are not in a particular set. We say is the complement of and write,
when contains every element not contained in So, if our universe is and then
Of course we can perform more than one operation at a time. For example, consider
This is the set of all elements which are both elements of and not elements of What have we done? We’ve started with and removed all of the elements which were in Another way to write this is the set difference:
It is important to remember that these operations (union, intersection, complement, and difference) on sets produce other sets. Don’t confuse these with the symbols from the previous section (element of and subset of).
is a set, while
is true or false. This is the same difference as between
(which is a number) and
(which is false).
Example 0.3.6.
Let and If the universe is find:
-
-
-
-
-
-
-
-
-
Solution.
-
since everything in is already in
-
since everything in is in
-
as the only element of both and is 2.
-
since and have no common elements.
-
First we find that then we take everything not in that set.
-
since the elements 1, 3, and 5 are in but not in This is the same as
-
The set contains all elements that are either in but not in (i.e., ), or not in both and (i.e., ).
-
since nothing is added by the empty set.
-
since nothing can be both in a set and in the empty set.
Having notation like this is useful. We will often want to add or remove elements from sets, and our notation allows us to do so precisely.
Example 0.3.7.
If
then we can describe the set we get by adding the number 4 as
If we want to express the set we get by removing the number 2 from
we can do so by writing
Careful though. If you add an element to the set, you get a new set! So you would have
and then correctly say that
contains 4, but
does not.
You might notice that the symbols for union and intersection slightly resemble the logic symbols for “or” and “and.” This is no accident. What does it mean for to be an element of It means that is an element of or is an element of (or both). That is,
Also,
which says is an element of the complement of if is not an element of
There is one more way to combine sets which will be useful for us: the
Cartesian product,
This sounds fancy but is nothing you haven’t seen before. When you graph a function in calculus, you graph it in the Cartesian plane. This is the set of all ordered pairs of real numbers
We can do this for
any pair of sets, not just the real numbers with themselves.
Put another way,
The first coordinate comes from the first set and the second coordinate comes from the second set. Sometimes we will want to take the Cartesian product of a set with itself, and this is fine:
(we might also write
for this set). Notice that in
we still want
all ordered pairs, not just the ones where the first and second coordinate are the same. We can also take products of 3 or more sets, getting ordered triples, or quadruples, and so on.
Example 0.3.8.
Let
and
Find
and
How many elements do you expect to be in
Solution.
There will be 3 pairs with first coordinate
three more with first coordinate
and a final three with first coordinate
Subsection Venn Diagrams
There is a very nice visual tool we can use to represent operations on sets. A
Venn diagram displays sets as intersecting circles. We can shade the region we are talking about when we carry out an operation. We can also represent cardinality of a particular set by putting the number in the corresponding region.
Each circle represents a set. The rectangle containing the circles represents the universe. To represent combinations of these sets, we shade the corresponding region. For example, we could draw
as:
Here is a representation of
or equivalently
A more complicated example is
as seen below.
Notice that the shaded regions above could also be arrived at in another way. We could have started with all of then excluded the region where and overlap outside of That region is So the above Venn diagram also represents So using just the picture, we have determined that