SETS
SETS
SETS
1
What is a set?
◍ A set is a group of “objects”
◌ Classes offered by a department: { GE 1, GE 2,
GE 3, … }
◌ Colors of a rainbow: { red, orange, yellow,
green, blue, indigo, violet }
◌ States of matter { solid, liquid, gas, plasma }
2
Set Properties 1
equivalent to {3, 5, 2,
4, 1}
3
Set properties 2
◍ Sets do not have duplicate elements
◌ Consider the set of vowels in the
alphabet.
It makes no sense to list them as {a, a,
a, e, i, o, o, o, o, o, u}
What we really want is just {a, e, i, o,
u}
4
Specifying a Set 1
6
Specifying a Set 2
7
EXAMPLE SET-BUILDER
NOTATION
8
Specifying a Set 3
◍ A set is said to “contain” the various
“members” or “elements” that make up the set
◌ If an element a is a member of (or an
element of) a set S, we use then notation
a S
◌ 4 {1, 2, 3, 4}
◌ If an element is not a member of (or an
element of) a set S, we use the notation
a S
◌ 7 {1, 2, 3, 4}
◌ Virginia {1, 2, 3, 4}
9
Often Used Sets
◍ N = {0, 1, 2, 3, …} is the set of natural
numbers
◍ Z = {…, -2, -1, 0, 1, 2, …} is the set of
integers
◍ Z+ = {1, 2, 3, …} is the set of positive
integers (a.k.a whole numbers)
◍ Q = {p/q | p Z, q Z, q ≠ 0} is the set
of rational numbers
◌ Any number that can be expressed as a fraction of
two integers (where the bottom one is not zero)
◍ R is the set of real numbers
10
The Universal Set
11
The Universal Set
12
Venn Diagrams
13
Sets of Sets
◍ Sets can contain other sets
◌ S = { {1}, {2}, {3} }
14
The Empty Set
◍ If a set has zero elements, it is called
the empty (or null) set
◌ Written using the symbol
◌ Thus, = { } VERY
IMPORTANT
◌ If you get confused about the empty set
in a problem, try replacing by { }
◍ As the empty set is a set, it can be a
element of other sets
◌ { , 1, 2, 3, x } is a valid set
15
The Empty Set
◍ Note that ≠ { }
◌ The first is a set of zero elements
◌ The second is a set of 1 element (that
16
Set Equality
◍ Two sets are equal if they have the same
elements
◌ {1, 2, 3, 4, 5} = {5, 4, 3, 2, 1}
◌ Remember that order does not matter!
◌ {1, 2, 3, 2, 4, 3, 2, 1} = {4, 3, 2, 1}
◌ Remember that duplicate elements do
not matter!
◍ Two sets are not equal if they do not have
the same elements
◌ {1, 2, 3, 4, 5} ≠ {1, 2, 3, 4}
17
Subsets 1
◍ If all the elements of a set S are also
elements of a set T, then S is a subset of T
◌ For example, if S = {2, 4, 6} and T = {1,
2, 3, 4, 5, 6, 7}, then S is a subset of T
◌ This is specified by S T
◌ Or by {2, 4, 6} {1, 2, 3, 4, 5, 6, 7}
◍ If S is not a subset of T, it is written as
such:
S T
◌ For example, {0, 8, 9} {1, 2, 3, 4, 5,
6, 7}
18
Subsets 2
19
Proper Subsets
◍ If S is a subset of T, and S is not equal to T,
then S is a proper subset of T
◌ Let T = {0, 1, 2, 3, 4, 5}
◌ If S = {1, 2, 3}, S is not equal to T, and S is a
subset of T
◌ A proper subset is written as S T
20
Proper Subsets 2
21
Set Cardinality
◍ The cardinality of a set is the number of
elements in a set
◌ Written as |A|
◍ Examples
◌ Let R = {1, 2, 3, 4, 5}. Then |R| = 5
◌ || = 0
◌ Let S = {, {a}, {b}, {a, b}}. Then |S| = 4
◍ This is the same notation used for vector
length in geometry
◍ A set with one element is sometimes called
a singleton set
22
Set Operations
23
Set operations: Union
AUB
U
A B
24
Set operations: Union
York, Washington, 3, 4}
◌ {1, 2} U = {1, 2}
25
Set operations: Intersection
A∩B
U
A B
26
Set operations: Intersection
27