Set Theory
Set Theory
Set Theory
Set theory
Because a set is unordered, it does not make any sense to say that an
element of a set occurs twice. We generally denote finite sets with curly braces,
such as
{1, 2, 3, 4, 5}.
For large or infinite sets, it helps to use set builder notation. For example,
the even integers can be expressed as
{x | x = 2k, k ∈ Z}.
This should be read as “the set of all x such that x = 2k for some integer k.”
It is the vertical bar | that is interpreted as “such that,” but it may also be
read as “with the property,” or “satisfying,” or “for which,” and probably even
others. Note that some authors (including those of your textbook, prefer to
use a colon : instead of a vertical bar; you should get comfortable with both
notations. We can simplify with shorthand the form of the set of even integers
we wrote above as
{2k | k ∈ Z}.
Also, whenever the elements of your collection lie in some larger set, you should
specify this in the set builder notation. For example, our description of the
even integers really should have specified that x itself is an integer, as in
{x ∈ Z | x = 2k, k ∈ Z}.
Set can contain just about anything, including other sets! For example, the
set A = {0, {1, 2}, 3} has as its elements the integers, 0, 3 as well as the set
{1, 2}. The set A has three elements.
Definition 2.1.2 (Empty Set). The empty set is the set with no elements. In
particular, the empty set is the unique set for which the statement (∀x, x ∈
/ ∅)
is true.
15
16 CHAPTER 2. SET THEORY
A ⊆ B ⇐⇒ (∀x)(x ∈ A =⇒ x ∈ B).
A = B ⇐⇒ (∀x)(x ∈ A ⇐⇒ x ∈ B).
which has 8 elements. We will prove later that if a finite set has n elements,
then its power set has 2n elements.
Remark 2.1.8. By Theorem 2.1.4, we can see that for any set A, the power
set P(A) always contains ∅ and A. Note also that X ∈ P(A) if and only if
X ⊆ A. You will have to be careful not to confuse subsets with elements; the
notions are different.
union A ∪ B = {x | x ∈ A ∨ x ∈ B}
intersection A ∩ B = {x | x ∈ A ∧ x ∈ B}
difference A \ B = {x | x ∈ A ∧ x ∈
/ B}
Theorem 2.2.2. The binary operations union and intersection are commuta-
tive, associative and distribute over each other. That is,
A \ (B ∪ C) = (A \ B) ∩ (A \ C),
A \ (B ∩ C) = (A \ B) ∪ (A \ C).
The complement satisfies a few nice properties, and it really acts like nega-
tion. So, for example, (Ac )c = A and it satisfies De Morgan’s Laws by virtue
of Theorem 2.2.2, namely,
(A ∪ B)c = Ac ∩ B c ,
(A ∩ B)c = Ac ∪ B c .
In the theorem below we collect a few more facts about set operations,
particularly how they interact with the subset relation.
• A⊆A∪B
• A∩B ⊆A
• A∩∅=∅
• A∪∅=A
• if A ⊆ B, then B c ⊆ Ac
• A ∩ Ac = ∅
18 CHAPTER 2. SET THEORY
• A ∪ Ac = U
One other way to make new sets is to make ordered tuples. Remember, sets
are unordered, but it is very useful to have objects with order to them. For
example, when we considered points in the plane in algebra and calculus, we
used to represent them by a pair of real numbers, like (a, b) where a is the
horizontal offset from the origin, and b is the vertical offset. It is clear that
(0, 1) 6= (1, 0), so order matters.
Definition 2.2.6 (Cartesian product). For sets A, B we can form their Carte-
sian product (or just product) which consists of all ordered pairs where the
first component is an element of A and the second component is an element of
B. Symbollically,
A × B := {(a, b) | a ∈ A, b ∈ B}.
Note that your book calls the Cartesian product the “cross product.” This
is simply incorrect; no one refers to it this way. Cross products are either the
operation on three (or seven) dimensional vectors you learned in Calculus, or
they are much more complicated objects that involve group actions (you are
not supposed to know what a group action is). Just never use the term cross
product in place of Cartesian product.
Of course, we can form multiple Cartesian products to get order triples, or
more generally, order n-tuples. For example,
A × B × C = {(a, b, c) | a ∈ A, b ∈ B, c ∈ C}.
When we take the Cartesian product of a set with itself, we use exponential
notation for convenience, i.e.,
A × A × · · · × A = An .
| {z }
n
This is precisely why we use the notation Rn in linear algebra to denote col-
lection of vectors (they are ordered n-tuples of real numbers).
To maintain a grasp of Cartesian products, you should keep in mind the
analogy of rectangles. Consider the open intervals A = (2, 3) and B = (4, 7).
Then since A, B ⊆ R, we see that A × B ⊆ R2 , that is, it lies in the plane, so
we can visualize it! In particular, A × B is the (open) rectangle in the plane
whose x-values are between 2 and 3 and whose y-values are between 6 and
7. So, when you have some property about Cartesian products and you want
to see if and/or why it is true, imagine first that your Cartesian products are
rectangles in the plane. Hopefully this helps your intuition for the following
theorem.
• A × (B ∪ C) = (A × B) ∪ (A × C)
• A × (B ∩ C) = (A × B) ∩ (A × C)
• A×∅=∅
• (A × B) ∩ (C × D) = (A ∩ C) × (B ∩ D)
• (A × B) ∪ (C × D) ⊆ (A ∪ C) × (B ∪ D)
2.3. INDEXED FAMILIES OF SETS 19
In the above example, notice how we used N as a tool to specify our collec-
tion A using set builder notation. This is a common phenomenon and we give
it a name. We call a set an index set if it plays a role similar to that of N in
the previous example. Moreover, we say that it indexes the family A, and we
call A an indexed family. This is because we can access (or lookup) any set
in the family A using an element of the index set. We call an elemenet of the
index set an index (the plural of this is indices).
With this concept, we can rewrite the union and intersection with slightly
different notation, which is often more useful:
[ [ \ \
An := A An := A
n∈N A∈A n∈N A∈A
In fact, when the index set is N or some contiguous string of integers, we often
write the union and intersection with notation similar to summation notation
from Calculus. That is,
∞
[ [
An := An ,
n=1 n∈N
and similarly,
k
[
An := A1 ∪ A2 ∪ · · · ∪ Ak .
n=1
And similarly for intersections.
20 CHAPTER 2. SET THEORY
(n + 1)3 − (n + 1) = (n + 1) (n + 1)2 − 1
2.5. WELL-ORDERING AND STRONG INDUCTION 21
= n(n + 1)(n + 2)
= n3 + 3n2 + 2n
= (n3 − n) + 3n2 + 3n
= 3(k + n2 + n)
Then S = N.
Proof. We prove by induction that for every n ∈ N, {1, . . . , n}
Base case. Notice that by taking n = 1, we see that {k ∈ N | k < 1} = ∅
which is clearly a subset of S. Therefore, by the property of S, we find that
1 ∈ S, so {1} ⊆ N.
Inductive step. Let n ∈ N be arbitrary and suppose that {1, . . . , n} ⊆ S. This
is the same as the set {k ∈ N | k < n + 1}, so by the property of S, n + 1 ∈ S.
Therefore, {1, . . . , n + 1} ⊆ S.By induction, for every n ∈ N, {1, . . . , n} ⊆ S.
Hence [
N= {1, . . . , n} ⊆ S.
n∈N
We now recall the division algorithm, but we can provide a proof this time.
b = aq + r, 0 ≤ r < |a| .
The intger b is called the dividend, a the divisor, q the quotient, and r the
remainder.
Proof. Let a, b ∈ Z with a nonzero. For simplicity, we will assume that a > 0
because the proof when a < 0 is similar. Consider the set of integers A =
{b − ak | k ∈ Z, b − ak ≥ 0. This set is clearly nonempty, for if b ≥ 0 then
b − a0 = b ≥ 0 is in A, and if b < 0 then b − ab = b(1 − a) ≥ 0 is in A.
By the Well-Ordering Principle, A has a minimum element, which we call
r, and some integer which we call q so that r = b − aq. Then r ≥ 0 and notice
that r − a = b − aq − a = b − a(q + 1). Since a > 0, r − a < r. By the minimality
of r, we know r − a < 0 or equivlaently, r < a.
Now suppose there are some other integers q 0 , r0 with 0 ≤ r0 < a and
b = aq 0 + r0 . Then aq + r = aq 0 + r0 and hence r − r0 = aq − aq 0 = a(q − q 0 ).
Now −a < −r0 ≤ r−r0 ≤ r < a and hence a |q − q 0 | = |a(q − q 0 )| = |r − r0 | < a.
Dividing through by a, we obtain |q − q 0 | < 1 and since q − q 0 ∈ Z it must be
zero. Hence q = q 0 and so also r = r0 .
Proof. Let a, b be nonzero relatively prime integers which divide some integer
c. Since a, b divides c there exist integers r, s for which c = ar = bs. Since
gcd(a, b) = 1, by Theorem 1.7.5 there exist integers, x, y for which ax + by = 1.
Multipliying by c and using the division properties above we find
so ab divides c.
Proof. Obvious, but we omit the technical proof until we have a proper dis-
cussion of the definition of the number of elements in a set, which won’t occur
until Chapter 5.
Theorem 2.6.2. For finite sets A, B, which are not necessarily disjoint,
|A ∪ B| = |A| + |B| − |A ∩ B| .
Proof. Obvious when you look at a Venn diagram, but we omit the technical
proof for similar reasons.
In the above formula the sum is taken over all subcollections of j different sets
from among A1 , . . . , An . In particular, when n = 3, the above becomes
|A1 ∪ A2 ∪ A3 | = |A1 | + |A2 | + |A3 |
− |A1 ∩ A2 | + |A1 ∩ A3 | + |A2 ∩ A3 |
+ |A1 ∩ A2 ∩ A3 |
For the next theorem, recall that the factorial of a positive integer n is
defined inductively by
0! = 1
n! = n(n − 1)!
Theorem 2.6.9 (Combination Rule). We have the following formula for the
binomial coefficients:
n n!
= .
r r!(n − r)!
Proof. Note that the number of permutations of any r distinct objects from a
set of n objects is necessarily the number of subsets of size r (i.e., the num-
ber of combinations, the binomial coefficient) times the number of ways to
arrange those r elements (i.e., permutations of a set of size r). Therefore, by
Theorem 2.6.6 and Theorem 2.6.7, we have
n n!
r! =
r (n − r)!
which you should prove. This displayed equation essentially says that Pascal’s
triangle generates the binomial coefficients.