2. Overview
• In this unit you will:
• learn what the term set means in mathematics.
• develop a logical method to doing formal proofs of results
involving sets and how the properties of functions are applied to
the definition of sets.
• see how the properties of functions are applied to results involving
sets.
• In addition, you will be able to determine what a countable
set is and what an uncountable set is.
3. Unit Objectives
1. Define a set and apply the different mathematical symbols to solving set
problems.
2. Identify the different set operations and solve problems involving these.
3. Do formal proofs of problem results involving sets.
4. Prove that two sets have the same cardinality.
5. Define a countable set as well as an uncountable set.
6. Prove that a set is countable or uncountable, as the case may be.
7. Apply the properties of functions to solving results involving sets.
5. Definition of Set
•Definition A set is any well-defined collection
of objects or elements.
• We write A = {1, 2, 3} to denote a set of the first three Natural
numbers, or B = {a, e, i, o, u} to denote the set of vowels.
• Note that the set name is a capital letter and the braces enclose
the elements of the set.
6. Set Notations
• - Belongs to or is a member of. e.g. x A means x is a member of set A.
• ∉ - Does not belong to or is not a member of. x ∉ A means x is not a member
of set A. , ⊃, , ⊇ - is a subset of .
• A B means A is a proper subset of B. A B means A is a subset of B.
• If all members of A are also in B, we call A a subset of B (and B a superset
of A), and
• write A B or B ⊇ A.
• NB : A B and B A ⇔ A = B.
7. Universal Set
•Typically, sets come from a more universal set
which is denoted by U or sometime E.
•So for instance, we write: U = {1, 2, 3, 4, 5, 6,
7, 8, 9, 10} and A = {1, 2, 3}
8. Venn Diagrams
• Venn diagrams are used to denote relationships between sets.
If U = {1, 2, 3, 4, 5, 6. 7,8, 9, 10}
A = {1, 2, 3, 4, 5}
B = {4, 5, 6}
The relationship is shown at left.
9. Subsets
• Definition A set all of whose elements belong to
another set is called a subset of the larger set.
• For instance, if A = {1, 2, 3} and B = {1, 2, 3, 4, 5}
then A is a subset of B. Conversely, B is called a
superset of A.
• We write A B.
10. Elements
•Definition An element, a, is said to belong to a
set, A, or be a member of the set if a is in the
set.
•For instance, if A = {1, 2, 3} then 1 is an
element of the set A. We write a A. Also, 3 is
not a member of A and we write 3 ∉ A.
11. Equal sets
•Definition: Two sets A and B are said to be
equal if they possess precisely the same
elements.
•For instance, if A = {1, 2, 3} and B = {3, 2, 1}
then A = B.
12. Proof of Equal by Containment
•To prove two sets A and B are equal we have to
show that A is a subset of B and B is a subset of
A. Then they possess precisely the same
elements and are equal.
•Proof Method: A B and B A ⇔ A = B.
13. Power Set
•Definition: The set of all subsets of a given set
A, is called the Power set of that set and denoted
P(A).. Note that | P(A)| = 2|A|. Thus, P(A) is
sometimes written 2A.
•For instance, if A = {1, 2, 3} then P(A) = {{},
{1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}
14. Cantor’s Theorem
•Theorem: The cardinality of the Power set,
P(A), of a given set A is greater then that of the
set A.
Consider A = {1, 2, 3} and |A| = 3. Then P(A)
= {{}, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2,
3}} and | P(A) | = 8.
15. Cantor’s Theorem Illustration
For instance, if A = {1, 2, 3} then P(A) = {{}, {1}, {2}, {3}, {1, 2}, {1,
3}, {2, 3}, {1, 2, 3}}. Consider a function f : A P ( A) given by
f (1) {1, 3}; f (2) { }; f (3) {2}.
f is clearly 1-1. But consider the set B such as B = {2, 3}. Clearly in our
example, there is no value of x for which f (x) = B , i.e., there is no
element of the set {1, 2 , 3} which maps to the set B = {2, 3}. B = {2, 3}
is a member of P( (A) , the power set of A and therefore P( (A) has more
elements than the set A.
16. Some Important Sets
• The set of Natural numbers, N = {1, 2, 3, …}
• The set of integers, Z = {0, ±1, ±2, ±3, …}
• The set of rational numbers, Q = {x/y: x, y Z}
• The set of real numbers, R ={numbers on real line}
• The set of complex numbers, C = {x + iy: x, y R and i2 = -1}
• The set of Gaussian integers, G = {x + iy: x, y Z and i2 = -1}
17. More Set Notations
• ⊄ - is not a subset of
• for each ( for all)
• there is (there exist)
• ⇔ - if and only if (also written iff )
• - the negation of
• U - the universal set
• If U { } is a given set whose subsets are under consideration, U will be called the universal
set.
• { } - the empty set
• A′ - the complement of the set A. e.g. let U = {1, 2, 3, 4, 5, 6} and A = {3, 4, 5} A′ = {1, 2, 6}.
18. Set Operations
• Union,
• Intersection,
• Difference, AB or A - B
• Power Set,
• Cartesian Product, A B
• Symmetric Difference, A ∆ B or A B
19. Example: A − B = A ∩ B’
x ∈ A – B
⇒ x ∈ A and x ∉ B
⇒ x ∈ A and x ∈ B’
⇒ x ∈ A ∩ B’
⇒ A – B ⊆ A ∩ B’
Conversely, x ∈ A ∩ B’
⇒ x ∈ A and x ∈ B’
⇒ x ∈ A and x ∉ B
⇒ x ∈ A – B
⇒ A ∩ B’ ⊆ A – B
∴ A – B ⊆ A ∩ B’ and A ∩ B’ ⊆ A – B ⇒ A − B = A ∩ B’
20. Cardinality of a Set
• “The number of elements in a set.”
• Let A be a set.
a.If A = (the empty set), then the cardinality of A is 0.
• b. If A has exactly n elements, n a natural number, then the
cardinality of A is n. The set A is a finite set.
• c. Otherwise, A is an infinite set.
21. Cardinality of a Set
• The cardinality of a set A is denoted by |A|.
a.If A = , then |A|= 0.
b.If A has exactly n elements, then |A| = n.
c.If A is an infinite set, then |A| = .
22. Union
• The union of two sets A and B (written A B) is the set that contains
those elements in either set A or B or both).
• e.g. Let U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {2, 3, 4, 5} and B = {1, 3,
4, 7} then A B = {1, 2, 3, 4, 5, 7}
• In set-builder notation, we write: A B = {x : x A or x B}
• This notation reads A B is a set of all x such that x belongs to A or
x belongs to B or both sets
23. Intersection
The intersection of two sets A and B (written A B) is the set that
contains those elements common to both A and B.
• e.g. Let U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {2, 3, 4, 5} and B = {1,
3, 4, 7}.then A B = {3, 4}.
• In set-builder notation: A B = {x : x A and x B} . This
notation reads A B is a set of all x such that x belong to A and x
belong to B
• This means: x A B ⇔ x A x B
24. Using Logic Symbols
• Given A = {1, 2, 3} and B = {3, 4, 5} x A B ⇔ x A x B
• As in the e.g. above 1, 3, 5 belong to A B. 3 belongs to both sets.
• x ∉ A B ⇔ (x A x B) (read the negation of x in A or x in
B) ⇔ x ∉ A x ∉ B
• As in the e.g. above 6 does not belong to the sets A and B and does
not belong to A B .
25. P(A) P(B) P(A B)
Let x P(A) P(B), then x P(A) or x P(B)
⇒ x A or x B
⇒ x A or x B
⇒ x A B
⇒ x P(A B)
Thus, P(A) P(B) P(A B)
26. Difference
• The difference of A and B (written A - B) is the set that
contains those elements in A which are not in B.
• e.g. Let U = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, A = {2, 3, 4, 5} and B =
{1, 3, 4, 7} then A B = {4, 5}.
• In set builder notation, we write: A B = {x: x A and x ∉ B}
• This means: x A B ⇔ x A x ∉ B.
27. Exercises
• U = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10), A = {1, 2, 3}, B = (3, 4, 5, 6}
• What is:
• A B
• A B
• A’
• A’ B
• B’ A
31. Set Identities
Identity
A U = A
A = A
Domination
A U = U
A =
Idempotent
A A = A
A A = A
Excluded Middle
A A’= U
Uniqueness
A A’ =
Double Complement
(A’)’= A
33. Cartesian Product
• Definition Given sets A and B, we define AB = {(a, b) : a A and b B}
.
• (We read A B as “A cross B" and call (a, b) "the ordered pair a, b." We often
refer to A B as the Cartesian product of A and B.
• In the common special case both coordinates are taken from the same set, we
often write A2 instead of A× A.
• e.g. If A = {1, 2} and B = {3, 4}. The possible members of the Cartesian
product of A and B, A B = { (1, 3), (1, 4), (2, 3), (2, 4)} where the first
element of the ordered pair must come from the set A and the second
element must come from the set B.
34. Cartesian Product Notation and Definitions
• Definition For any integer n 3 , the structure (x1, x2 ,…, xn ) is
called an n-tuple.
• Definition Given sets (S1, S2 ,…, Sn ), we define the Cartesian
product S1 S2 …, Sn as the set of all n-tuples (x1, x2 ,…, xn ) such
that x1 S1, x2 S2 , and so on.
• As before, in the event that the sets S1, S2 , and so on are actually all
the same set, we will often use the notational shorthand S n = S
S… S
35. Power Set
• Definition: P(A) = {S : S A}(We read P(A)as "the power set of A") .
• The power set of a set A is the set of subsets of the set A, including the
empty set, and the set A itself. e.g. If A = {1,2}. The power set of A is
P(A) = {{}, {1}, {2}, {1,2}}.
If a set has a cardinality of n, then the cardinality of the power set is 2n . For
this reason, sometimes we write 2A to denote the power set of the set A.
The power set of a set, whether finite or not, always has a strictly larger
cardinality than the set itself.
37. Cantor’s Theorem
• Let A = {0, 1, 2, 3} Then we can form the Power set of A, P(A) =
{{}, {0}, {1}, {2}, …}
• Let f: A → P(A) be defined by f(0) = {0, 3}, f(1) = {0, 1, 2}, f(2)
= {} and f(3) = {2}
• Clearly f is 1-1 but consider the set {2, 3}. There is no element
that maps onto this element in the range. This f is not onto and
|P(A)| > |A|.
38. Countability of a Set
• A set S is finite if there is a 1-1 correspondence (bijection)
between it and the set {1, 2, 3, . . ., n} for some natural
number n.
• A set S is countably infinite if there is a 1-1 correspondence
between it and the natural numbers N.
• A set S is countable if it is either finite or countably infinite.
• A set S is uncountable if it is not countable.
39. The set of Integers is Countable
• To show this, we need a bijection between the set of Integers, Z, and the set
of Natural Numbers, N
• Consider f: Z → N;
• f(k) = 2k for k positive integer, and
• f(k) = 1 – 2k for k a negative integer.
• Then f takes; 1, 2, 3 … → 2, 4, 6,… etc and 0, -1, -2, -3 … → 0, 1, 3, 5, etc
• We have a bijection and hence Z is countable.
40. The Set of Rationals in Countable
• Again, we need to establish a
bijection between the set of rationals
and the set of Natural numbers.
• The diagram at right shows the
mapping.
42. Some Additional Definitions
• Definition Set A and B are disjoint if A B = { }.
• Definition Given a set A with elements from the universe U, the complement
of A (written A') is the set that contains those elements of the universal set
U which are not in A.
• That is, A ' = U A.
• Subset:
44. Examples of Formal Proofs
• Let A and B be any two sets. Prove that A B = A B′.
• Ɐx A B ⇒ x A x ∉ B
⇒ x A x B′
⇒x A B′
• This shows that A B A B′
• Ɐx A B′ ⇒ x A x B ′
⇒ x A x ∉ B
⇒ x A B
This shows that A B′ A B. Therefore, A B = A B′.
45. Example 1 Again
• Prove that A B = A B′.
• Ɐx, x A B ⇔ x A x ∉ B
⇔ x A x B′
⇔ x A B′
Therefore, A B = A B′.
46. Example 2
• If A B, prove that A C B C for any set C
• Ɐx, x A C ⇒ x A x C
⇒ x B x C ( A B)
⇒ x B C
• Therefore A C B C
47. Example 3
• Prove that A ( B C ) = ( A B) ( A C ) for all sets A, B and C
(Distributive Law).
• Part I: Show that A ( B C ) ( A B) ( A C )
• Suppose that x A ( B C ) ⇒ x A x ( B C )
⇒ x A, x B or x C (or both)
⇒ (x A x B ) (x A x C)
⇒ x A B x A C
⇒ x ( A B) ( A C )
48. Example 3 Cont’d
• Part II Show that ( A B) ( A C) A (B C)
• Suppose that x ( A B) ( A C ) ⇒ x A B x A C
⇒ (x A x B ) (x A x C)
⇒ x A (x B x C)
⇒ x A x B C
⇒ x A (B C)
• This shows that ( A B) ( A C) A (B C)
• ∴ A ( B C ) = ( A B) ( A C )
49. Example 3 Again
• Prove that A ( B C ) = ( A B) ( A C ) for all sets A, B and C
• Suppose that x A ( B C ) ⇔ x A x B C
⇔ x A x B x C
⇔ (x A x B) ( x A x C) distributive property
⇔ x A B x A C
⇔ x ( A B) ( A C )
50. Example 4
Prove that (A - B) - C = A - (B C) .
• Part I: Show that ( A B) C A (B C)
• For all x, x ( A B) C ⇒ x A B x ∉C from difference rule
⇒ x A x ∉ B x ∉ C
⇒ x A (x B x C)
⇒ x A x ∉(B C)
⇒ x A (B C)
T his shows that ( A B) C A ( B C )
51. Example 4 Cont’d
• Part II: Show that A ( B C ) ( A B) C
• Suppose that x A ( B C ) ⇒ x A x ∉ ( B C ) from difference rule
⇒ x A (( x B ) ( x C ))
⇒ x A ( x B) ( x C )
⇒ x A x ∉ B x ∉C
⇒ x A B x ∉C
⇒ x ( A B) C
• This shows that A ( B C ) ( A B) C
• Therefore, ( A B) C = A ( B C )
52. Example 4 Again
• Prove that (A - B) - C = A - (B C) .
• For all x, x ( A B) C ⇔ x ( A B) x ∉ C
⇔ x A x ∉ B x ∉ C
⇔ x A (( x B ) ( x C ))
⇔ x A ( x B)
⇔ x A x ∉ B C
⇔ x A (B C)
53. Example 5
• Prove that for any sets S and Ai (i I ) S Ai = ∩ (S Ai )
• For all x, x S Ai ⇔ [ x S, x ∉ Ai ]
⇔ (i ) [ x S, x ∉ Ai ]
⇔ (i ) [ x S Ai ]
⇔ x ∩ ( S Ai )
54. Example 6
• Prove that if A B , then ( A C) (B C).
Since A B then x A ⇒ x B
• Ɐ(x, y), ( x, y) A C ⇒ x A y C
⇒ x B y C (Since A B)
⇒ ( x, y) B C
Therefore, ( A C) (B C )
55. Example 7
Prove that (A B) C = ( A C) (B C). Distributive property
• For all (x, y), ( x, y ) ( A B ) × C
⇔ x ( A B) y C
⇔ ( x A x B) y C
⇔ (x A y C) (x B y C) distributive property
⇔ ( x, y ) ( A × C ) ( x, y ) ( B × C )
⇔ (x, y) ( A× C) (B × C).
Therefore, (A B) × C = ( A× C) (B × C).
56. Example 7
Prove that P(A) P(B) P( A B).
• X P ( A) P ( B ) ⇒ X A X B
⇒ X AB
⇒ X P ( A B)
• Therefore, P(A) P(B) P( A B).
58. Family of Sets
• If we’re working with a few sets at a time, it’s probably sufficient to use
A, B, and C to represent them.
• Yet, if we have many sets, for instance, 10 sets (generally called a family
or collection of sets instead of a set of sets), it might be more sensible to
put them into a family and address them as A1 , A2 , ..., A10.
• In a case like this, we would say that the set {1, 2, 3,..., 10} indexes the
family of sets.
59. Family of Sets
• This notation has advantages, for then we could write unions and
intersections more succinctly