Chapter 2 Sets
Chapter 2 Sets
Sets, Functions,
Sequences
and Summation
It is common for sets to be denoted using uppercase letters. Lowercase letters are
usually used to denote elements of sets.
There are several ways to describe a set:
Roster method.
Set builder notation.
Roster method: sets are written using curly brackets {, } with their elements
listed in between.
Example (1): The set V of all vowels in the English alphabet can be written as
V = {a, e, i, o, u}.
Example (2): The set O of odd positive integers less than 10 can be expressed by
O = {1, 3, 5, 7, 9}.
Infinite
Note: Sometimes the “…” can be used in the middle to save writing long lists.
Example : The set O of all odd positive integers less than 10 can be written as
O = {x | x is an odd positive integer less than 10}.
Or
O = {x ∈ Z+ | x is odd and x < 10}.
Sets Equivalence
Empty Set:
is a special set that has no elements. This set is called the
empty set, or null set, and is denoted by ∅.
The empty set can also be denoted by { }.
Example : Draw a Venn diagram that represents V, the set of vowels in the English
alphabet.
Subset
The set A is a subset of B if and only if every element of A is also an element of B.
We use the notation A ⊆ B to indicate that A is a subset of the set B.
U
B
Subset
Example : A= {r, s, t, u, w} and B={s, u, w}
U
B
B is a subset of A.
Subset
The set A is a subset of B if and only if every element of A is also an element of B.
We use the notation A ⊆ B to indicate that A is a subset of the set B.
Some principles
Example : A= { a, b, c, d}
C ⊈ A and A ⊈ C
C ⊈ B and B ⊈ C
C B
Proper Subset
Subset VS Proper Subset
A proper subset of a set A is a subset of A that is not equal to A. In
other words, if B is a proper subset of A, then all elements of B are
in A but A contains at least one element that is not in B.
Example:
A= {1, 3, 5}
B= {1, 5}
C= {1, 3, 5}
D= {1, 4}
B is a proper subset of A (B ⊂ A)
C is a subset of A (C ⊆ A) but it is not proper subset of A since A=C
D is not a subset of A since is not an element of A.
Subset VS Proper Subset
set A is a subset of a set B but that A ≠ B, we write A ⊂ B and say that A is a proper
subset of B. For A ⊂ B to be true, it must be the case that A ⊆ B and there must
exist an element x of B that is not an element of A. That is, A is a proper subset of B.
In other words, If A and B are two sets, then A is called the proper subset of B if A
⊆ B but B ⊈ A i.e., A ≠ B. The symbol ‘⊂’ is used to denote proper subset.
Symbolically, we write A ⊂ B.
Example :
A= {a, b, c, d}, B={a, c, d}, C= {d, c, b, a}
C ⊆ A because all elements in C are found in A.
Moreover, they are equal sets.
But C is not proper subset of A.
B ⊂ A; B is proper subset of A because the set B has less elements
than A.
A is a subset of B if and only if every element of A is in B.
⊆ means “ Subset ”.
⊈ means “not subset”.
Example : A= {1, 2, 3, 4, 5}
B= { 1, 2, 3, 3, 4, 5, 5}.
B ⊆A , which means B is subset of A.
Question : A= {1, 3, 4}
B= { 1, 2, 3, 4}.
Is A a subset or proper subset of B?
Example : Let A be all multiples of 4 and B be all multiples of 2.
Is A a subset of B? and Is B a subset of A?
A= { …, -8, -4, 0, 4, 8, …}
The answer B= { …, -8, -6, -4, -2, 0, 2, 4, 6, 8, …}
A ⊂ B but B ⊄A.
Some conclusions
Example (1): Let A be the set of odd positive integers less than 10.
Then |A|= 5.
Example (3): Because the null set has no elements, it follows that |∅| = 0
Examples :
S = { a, b, c, {7}}
|S| = 4.
{Ꝋ} = {{}}
|{Ꝋ}| = 1.
Power Set
Given a set S, the power set of S is the set of all subsets of the set S. The power
set of S is denoted by P(S).
If a set has n elements, then its power set has 2n elements.
Example (1) : What is the power set of the set S {0, 1, 2}?
The power set P({0, 1, 2}) is the set of all subsets of {0, 1, 2}.
Hence, P({0, 1, 2}) = {∅,{0},{1},{2},{0, 1},{0, 2},{1, 2},{0, 1, 2}}.
P (S) = 8.
Example (2) :
What is the power set of the empty set? What is the power set of the set { ∅}?
The empty set has exactly one subset, namely, itself. Consequently, P( ∅) = { ∅}.
The set {∅} has exactly two subsets, namely, ∅ and the set {∅} itself. Therefore,
P({∅}) = {∅,{∅}}.
Set Operations
Set Operations
Union: A ⋃ B= { X: X∈ A or X ∈ B}
Example :
A= {a, b, c} and B= {b, c, d, e}
Then A ⋃ B= { a, b, c, d, e}.
Intersection: A ⋂ B= { X: X∈ A and X ∈ B}
Example (1):
Then BC = { 1, 5}.
Example
Let A= {8, 7, 2}, E= { 1, 2, 3, 4, 5, 6, 7, 8, 9} and S= {2, 3, 5, 7}.
Find AC, SC , EC , (A ⋂ S )C and (A ⋃ S )C ?
AC= { 1, 3, 4, 5, 6, 9}
SC = { 1, 4, 6, 8, 9}
EC= { }.
(A ⋂ S )C= {1, 3, 4, 5, 6, 8, 9}
(A ⋃ S )C= { 1, 4, 6, 9}
ti e s
t I d enti
S e
Use set builder notation and logical equivalences to show
that:
𝑨 ∩ ( 𝑩 − 𝑨 )=∅
¿ [ ( 𝒙 ∈ 𝑨 ) ∧ ¬ ( 𝒙 ∈ 𝑨 ) ]∧( 𝒙 ∈ 𝑩) Note:
¿ 𝑭 ∧ ( 𝒙 ∈ 𝑩)
, which means
𝑨 ∪ 𝑩 ≡( 𝒙 ∈ 𝑨 )∨( 𝒙 ∈ 𝑩)
𝑨 ∩ 𝑩 ≡( 𝒙 ∈ 𝑨)∧( 𝒙 ∈ 𝑩)
𝑨 − 𝑩 ≡( 𝒙 ∈ 𝑨)∧( 𝒙 ∉ 𝑩 )
Use a truth table to show that A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).
Computer Representation of Sets
Represent a subset A of U with the bit string of length n, where the ith bit in
this string is 1 if ai belongs to A and is 0 if ai does not belong to A
Example:
Answer :
the set of odd integers in U, namely, {1, 3, 5, 7, 9}, the bit string is:
10 1010 1010.
Functions
The function f Maps A to B
𝑓 ( 𝑎 )=𝑏
F(Adams)= A
F(Chou)=C
…
a
b 1
c 2
d 3
e 4
One-to-One Function:(Injunction)
Onto Function:(Surjection)
One-to-One correspondence Function:(Bijection)
( One-to-One and Onto)
One-to-One function
Onto function
Inverse Functions
Invertible
• A one-to-one correspondence (Bijection) is called invertible because we can
define an inverse of this function. A function is not invertible if it is not a one-
to-one correspondence, because the inverse of such a function does not exist.
a 1 1 a One-to-One
One-to-One
b 2 2 b Onto
Onto
c 3 3 c
𝒇 ( 𝒂 )=𝟐 , 𝒇 ( 𝒃 )=𝟑 , 𝒇 ( 𝒄 ) =𝟏 𝒇
−𝟏
( 𝟏 )=𝒄 , 𝒇 − 𝟏 ( 𝟐 ) =𝒂 , 𝒇 − 𝟏 ( 𝟑 )=𝒃
Example :
Let f : Z → Z be such that . Is f invertible, and if it is, what is its
inverse?
The function is a one-to-one correspondence. ⸫ it is invertible.
Example :
Let f be the function from R to R with . Is f invertible?
, f is not one-to-one ⸫ f is not invertible (Note we can also show that f is not
invertible because it is not onto.)
COMPOSITION
The The
function g function f
Maps A to B Maps B to C
Example:
Let g be the function from the set {a, b, c} to itself such that , ,
and . Let be the function from the set to the set such that , , and . What
is the composition of f and g, and what is the composition of g and
f?
Answer:
,
,
.
Note that is not defined, because the range of is NOT a subset of the
domain of .
Example:
( 𝒇 ∘𝒈 )( 𝒙 )= 𝒇 (𝒈 ( 𝒙 ) )
a a 1
( 𝒇 ∘ 𝒈 ) ( 𝒂 )= 𝒇 ( 𝒈 ( 𝒂 ) )= 𝒇 ( 𝒃 )=𝟐
b b 2 ( 𝒇 ∘ 𝒈 ) ( 𝒃 ) = 𝒇 ( 𝒈 ( 𝒃 ) ) = 𝒇 ( 𝒄 ) =𝟏
c c 3
g f ( 𝒇 ∘ 𝒈 ) ( 𝒄 ) = 𝒇 ( 𝒈 ( 𝒄 ) ) = 𝒇 ( 𝒂 )=𝟑
( 𝒈 ∘ 𝒇 )( 𝒙 )=𝒈 ( 𝒇 ( 𝒙 ) )
a a 1 ( 𝒈 ∘ 𝒇 ) ( 𝒂 )=𝒈 ( 𝒇 ( 𝒂 ) )=𝒈 ( 𝟑 ) =𝒖𝒏𝒅𝒆𝒇𝒊𝒏𝒆𝒅
b b 2
c c 3
( 𝒈 ∘ 𝒇 ) ( 𝒃 ) =𝒈 ( 𝒇 ( 𝒃 ) ) =𝒈 ( 𝟐 )=𝒖𝒏𝒅𝒆𝒇𝒊𝒏𝒆𝒅
g f ( 𝒈 ∘ 𝒇 ) ( 𝒄 ) =𝒈 ( 𝒇 ( 𝒄 ) ) =𝒈 ( 𝟏 )=𝒖𝒏𝒅𝒆𝒇𝒊𝒏𝒆𝒅
Note that g ◦ f is not defined, because the range of f is NOT a subset of the domain of
g
Example:
Letand be the functions from the set of integers to the set of integers
defined by and . What is the composition of and ? What is the
composition of and ?
Answer:
.
The Graphs of Functions
Let f be a function from the set A to the set B. The graph of the function f
is the set of ordered pairs {(a, b) | a ∈ A and f (a) = b}.
Some Important Functions
Examples
⌈ 𝟏/𝟐 ⌉=𝟏
⌊ 𝟏/𝟐 ⌋ =𝟎 3
⌈
𝟏 𝟑 . 𝟏 ⌉ =𝟒
⌊− ⌋=−𝟏
𝟐
7
𝟏
− ⌈⌉𝟕
=𝟎⌉ =𝟕
𝟐
Sequences and
Summations
Definition of sequences
• Sequences are ordered lists of elements, it is a function from a subset of the set of
integers (usually either the set {0, 1, 2, . . .} or the set {1, 2, 3, . . .}) to a set S. We use
the notation an to denote the image of the integer n. We call an a term of the
sequence.
• the notation {an} to describe the sequence.
• an represents an individual term of the sequence {an}.
The list of the terms of this sequence, beginning with a1, namely,
starts with
a1 = 1
a2 = ½
and so on…
Finite sequences
Finite sequence is a sequence with a domain consists of the set {1,2,3,4,…,n} .
Example (1) : Find all of the terms of the finite sequence an = (-1)n /(2n +1) , 1≤n≤5
a1= - 1/3
a2= 1/5
a3= - 1/9
a4=1/17
a5= - 1/33
The five terms of the sequence are ( - 1/3, 1/5, - 1/9, 1/17, - 1/33)
an = n 2
Infinite sequences
1, 2, 3, 4, …
The next number is 5.
1, 3, 5, 7, …
The next number could be 9 or 11
The first case is odd numbers [ 1,3,5,7,9,11,13,…]
The second case is prime number [1,3,5,7,11,13,…]
( a, a + d, a + 2d, . . . , a + nd, . . . )
The list of terms s0, s1, s2, s3, . . . begins with −1, 3, 7, 11, . . . ,
Example : The sequence {t } with t = 7 − 3n with initial terms and common
n n
differences equal to 7 and −3, respectively. the list of terms t0, t1, t2, t3, . . .
begins with 7, 4, 1,−2, . . . .
t0= 7 – 3 . (0) = 7
t1= 7 – 3 . (1) = 4
t2= 7 – 3 . (2) = 1
t3= 7 – 3 . (3) = -2
And so on…
Explicit sequences
Sequence called explicit because it tells us exactly what value any particular
terms has, depend on the given rule.
Example : the sequence 1,4,9,16,25,… is an example of explicit sequence. It is easy
to describe term using only its position number. It is the square of n, bn= n2 .
Find the following terms:
b5 = 52 = 25
b9 = 92 = 81
Geometric sequence
where the initial term a and the common ratio r are real numbers.
initial term and common ratio equal to 1 and −1. The list of terms b 0, b1, b2, b3, b4, . .
. begins with (1,−1, 1,−1, 1, . . . ).
Examples
get to the next term. So , we describe the sequence a1=3, an=an-1 +5.
Example (2):
find the first three terms and the 4th of the infinite sequence given by
the recursive sequence an = (an-1)2 +5, a1=-1
a4= (41)2+5=1686
Example (3):
Let {an} be a sequence that satisfies the recurrence relation
a3 = a2 − a1 = 2 − 5 = −3.
We can find a4, a5, and each successive term in a similar way.
Sequence Summation
we consider the addition of the terms of a sequence. For this we introduce
summation notation. We begin by describing the notation used to express the
sum of the terms am, am+1, . . . , an
am + am+1 + ・ ・ ・ +an.
Where the variable j is called the index of summation . starting with its
lower limit m and ending with its upper limit n.
is used to denote summation.
Example: Use summation notation to express the sum of the first 100 terms of
Solution: The lower limit for the index of summation is 1, and the upper limit is
100.
Example (1) : What is the value of
Solution: We have
= 12 + 22 + 32 + 42 + 52
= 55
= 1 + 2 + 3 + 4 + 5+ 6
= 21
= 21
What is
Example (4): What is the value of about this
one?
Remember
= (100 * 101 )/2
=5050
Example (5): What is the value of
= 12 + 22 + 32 + 42 + 52 + 62
= 1+ 4+ 9+ 16+ 25 + 36
= 91
REMEMBER
=-
=338350 – 40425
= 297925
Good
Job,
you
did it
Example (5): What is the value of
= 13 + 23 + 33 + 43
= 1+ 8 + 27 + 64
= 100
REMEMBER
= 25502500
Geometric series
= 20 + 21 + 22 + 23 + … + 210
a= 1, r= 2, n=10
=
= 2047
Example : What is the value of
=
= 1536 – 3
= 1533
ANY
QUESTION
U
𝑈={−1 , 0 , 1 , 2 ,3 , 4 , 5 , 6 }
𝑃={−1 , 0 , 1 , 2 }
2
𝑄={𝑥 : 𝑥 𝜖 𝑃 }
76