You are on page 1of 10

CHAPTER II : SETS AND FUNCTIONS

INTRODUCTION
The concept of sets appears in all chapters of mathematics. As we shall see, the properties
of sets are very similar to that of propositions. The present chapter concludes with a study of
functions.

A- SETS
1-SETS AND ELEMENTS OF A SET
A set is a collection of distinct objects called the elements or members of the set.
Throughout this chapter, we will use capital letters 𝐴, 𝐵, 𝑋, 𝑌, … to denote sets and lowercase
letters to denote elements. The statement « 𝑝 is an element of 𝐴 » or its equivalent « 𝑝 belongs
to 𝐴 » is written as 𝑝 ∈ 𝐴. The negation of 𝑝 ∈ 𝐴 is written as 𝑝 ∉ 𝐴.
The fact that a set is completely determined when its elements are specified is formally
expressed as follows :

The sets 𝐴 and 𝐵 are equal if they contain the same elements

As usual, we write 𝐴 = 𝐵 if the sets 𝐴 and 𝐵 are equal. Otherwise, we write 𝐴 ≠ 𝐵. There are
essentially two maners to define a set :
a) The first is to list its elements. For example, 𝐴 = {𝑎, 𝑒 𝑖, 𝑜, 𝑢}. The order in which the
elements are listed does no matter.
b) The second is to state the property that characterizes the elements of the set. For
example, the set of all planets in the solar system, the set of all even integers, the set of
polynomials with real coefficients, and so on. For a property 𝑃 and an element 𝑠 of a
set 𝑆, we write 𝑃(𝑠) to indicate that 𝑠 has the property 𝑃. Then the notation 𝐴 = {𝑠 ∈
𝑆: 𝑃(𝑠)} indicates that the set 𝐴 consists of all elements 𝑠 of 𝑆 having the property 𝑃.
The colon : is commonly read as « such that », and is also written as « | ». So
{𝑠 ∈ 𝑆| 𝑃(𝑠)} is an alternative notation {𝑠 ∈ 𝑆: 𝑃(𝑠)}. For a concrete example, 𝐵 = {𝑥 ∈
ℤ: 𝑥 < 4} ; that is, the set of integers that are less than 4. Here the property is « 𝑥 < 4 ».
In general, a set is defined by stating the property which characterizes its elements, except in
the case where the elements are few.
Given a set 𝐴 and a property 𝑃, it is possible that no element of 𝐴 satisfies the property 𝑃.
For example, the set 𝐴 = {𝑥 ∈ ℕ∗ : 𝑥 2 = 3} contains no element. The reason is that no positive
integer has the required property. The set that has no element is called the empty set and is
denoted by ∅. There is only one set with no element. Indeed, if 𝐴 and 𝐵 are sets that are both
empty then 𝐴 = 𝐵 as they have the same elements.

2- SUBSETS
Given sets 𝐴 and 𝐵, whenever each element of 𝐴 is also an element of 𝐵 we say that 𝐴 is a
subset 𝐵. It is also said that 𝐴 is contained in 𝐵 or 𝐴 is included in 𝐵. This relationship is
expressed as 𝐴 ⊆ 𝐵. If 𝐴 is not a subset of 𝐵 ; that is, at least one element of 𝐴 does not belong
to 𝐵, we write 𝐴 ⊈ 𝐵.

Examples
(i) Consider the sets 𝐴 = {1,3, 4, 5, 8, 9}, 𝐵 = {1, 2, 3, 5, 7}, and 𝐶 = {1, 5}. Then 𝐶 is
included in both 𝐴 and 𝐵. But 𝐵 is not included in 𝐵 as 2 for example, is an
element of 𝐵 which is not in 𝐴.
(ii) The sets ℤ of integers, ℚ of rational numbers, and ℝ of real numbers are
interconnected by ℤ ⊆ ℚ ⊆ ℝ.

Theorem
1- For any set 𝐴,
a) ∅ ⊆ 𝐴
b) 𝐴 ⊆ 𝐴
2- 𝐴 = 𝐵 if and only if 𝐴 ⊆ 𝐵 and 𝐵 ⊆ 𝐴.
3- If 𝐴 ⊆ 𝐵 and 𝐵 ⊆ 𝐶 then 𝐴 ⊆ 𝐶 .
A Venn diagram is a visual representation of sets by point sets in the plane. For instance,
the Venn diagram for 𝐴 is a subset of 𝐵, is represented as follows.

𝐴
𝐵

𝐴 is a subset of 𝐵

3- SETS OPERATIONS
a) UNION
The union of two sets 𝐴 and 𝐵, denoted by 𝐴 ∪ 𝐵 , is the set of all elements that belong to 𝐴 or
𝐵:
𝐴 ∪ 𝐵 = {𝑥: 𝑥 ∈ 𝐴 𝑜𝑟 𝑥 ∈ 𝐵}
where « or » is inclusive.

b) INTERSECTION
The intersection on two sets 𝐴 and 𝐵, denoted by 𝐴 ∩ 𝐵, is the set of all elements that belong
to both 𝐴 and 𝐵 :
𝐴 ∩ 𝐵 = {𝑥: 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∈ 𝐵}
Two sets 𝐴 and 𝐵 are mutually exclusive or disjoint if and only if 𝐴 ∩ 𝐵 = ∅. This can be
represented using a Venn diagram as :

𝐴 𝐵

𝐴 and 𝐵 are mutually exclusive

Examples
(i) Given the sets of numbers 𝐴 = {1, 2, 3, 4}, 𝐵 = {3, 4, 5, 6, 7}, and 𝐶 = {2, 3, 5, 7}.
𝐴 ∪ 𝐵 = {1, 2, 3, 4, 5, 6, 7}; 𝐴 ∩ 𝐵 = {3, 4}
𝐴 ∪ 𝐶 = {1, 2, 3, 4, 5, 7}; 𝐴 ∩ 𝐵 = {2, 3}
𝐵 ∪ 𝐶 = {2, 3, 4, 5, 6, 7}; 𝐵 ∩ 𝐶 = {3, 5, 7}
(ii) 𝑀 is the set of male students of a university 𝑈, and 𝐹 is the set of female students
from the same university. Then,
- 𝑀 ∪ 𝐹 = 𝑈, since each student of 𝑈 belongs to 𝑀 or 𝐹 ;
- 𝑀 ∩ 𝐹 = ∅, since no student belongs to both 𝑀 and 𝐹 .

Theorem : The following are equivalent.


1- 𝐴 ⊆ 𝐵
2- 𝐴 ∩ 𝐵 = 𝐴
3- 𝐴 ∪ 𝐵 = 𝐵

c) DIFFERENCE
The difference of two sets 𝐴 and 𝐵, denoted by 𝐴 − 𝐵 , is the set consisting of those
elements of 𝐴 that do not belong 𝐵 :
𝐴 − 𝐵 = {𝑥: 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∉ 𝐵}

𝐴 𝐵

A-B
Usually the sets that we work with are subsets of some ambient set. For instance, even
numbers, odd numbers, and prime numbers are all subsets of the set of integers ℤ. Such an
ambient set is referred to as a universal set (or a set of discourse) and denoted by 𝑈. In other
words, a universal set is the underlying set that all the sets under examination are subsets of.
We may thus speak of the set difference 𝑈 − 𝐴, which is the set of those elements of 𝑈 that do
not belong to 𝐴. The set difference 𝑈 − 𝐴 is usually denoted by 𝐴̅ and called the complement
of 𝐴 :
𝐴̅ = {𝑥: 𝑥 ∈ 𝑈 𝑎𝑛𝑑 𝑥 ∉ 𝐴}

𝐴 𝐴̅
𝑈

The complement of 𝑈 and empty set ∅ are respectively 𝑈 ̅ = ∅ and ∅ ̅ = 𝑈. Notice that the
complement of the complement of a set 𝐴 is 𝐴 ; i.e., 𝐴̿ = 𝐴.
They are a number of set identities that the set operations of union, intersection, and set
complementarity satisfy. They are very useful in calculations with sets. Below we give a table
of such set identities, where 𝑈 is a universal set and 𝐴, 𝐵 , and 𝐶 are subsets of 𝑈.

Union Intersection
Commutative 𝐴∪𝐵 = 𝐵∪𝐴 𝐴∩𝐵 = 𝐵∩𝐴
laws
Associative laws (𝐴 ∪ 𝐵) ∪ 𝐶 = 𝐴 ∪ (𝐵 ∪ 𝐶) (𝐴 ∩ 𝐵) ∩ 𝐶 = 𝐴 ∩ (𝐵 ∩ 𝐶)
Distributive laws 𝐴 ∩ (𝐵 ∪ 𝐶) = (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐶) 𝐴 ∪ (𝐵 ∩ 𝐶) = (𝐴 ∪ 𝐵) ∩ (𝐴 ∪ 𝐶)
Idempotent laws 𝐴∪𝐴 =𝐴 𝐴∩𝐴 =𝐴
Absorption laws 𝐴 ∩ (𝐴 ∪ 𝐵) = 𝐴 𝐴 ∪ (𝐴 ∩ 𝐵) = 𝐴
Identity laws 𝐴∪∅ = 𝐴 𝐴∩𝑈=𝐴
Universal Bound 𝐴∪𝑈 =𝑈 𝐴∩∅=∅
laws
Complement laws 𝐴 ∪ 𝐴̅ = 𝑈 𝐴 ∩ 𝐴̅ = ∅
De Morgan’s ̅̅̅̅̅̅̅
𝐴 ∪ 𝐵 = 𝐴̅ ∩ 𝐵̅ ̅̅̅̅̅̅̅
𝐴 ∩ 𝐵 = 𝐴̅ ∪ 𝐵̅
laws
Table : Algebra of sets

7- FINITE SETS
A set is called finite if it has a finite number of elements. In any other case, the set is said
infinite. For example, the empty set and the set of letters of the alphabet are finite, while the
set of positive integers is infinite. The cardinality or the size of a finite set 𝐴 is the number of
its elements. We write 𝑐𝑎𝑟𝑑(𝐴) to indicate the cardinality of 𝐴.

Theorem : If 𝐴 and 𝐵 are finite sets then 𝐴 ∪ 𝐵 and 𝐴 ∩ 𝐵 are finite sets, and
𝑐𝑎𝑟𝑑(𝐴 ∪ 𝐵) = 𝑐𝑎𝑟𝑑(𝐴) + 𝑐𝑎𝑟𝑑(𝐵) − 𝑐𝑎𝑟𝑑(𝐴 ∩ 𝐵)
In the special case where 𝐴 and 𝐵 are mutually exclusive, then
𝑐𝑎𝑟𝑑(𝐴 ∪ 𝐵) = 𝑐𝑎𝑟𝑑(𝐴) + 𝑐𝑎𝑟𝑑(𝐵)

Corollary : If 𝐴, 𝐵 , and 𝐶 are finite sets, then 𝐴 ∪ 𝐵 ∪ 𝐶 and 𝐴 ∩ 𝐵 ∩ 𝐶 are finite sets, and
𝑐𝑎𝑟𝑑(𝐴 ∪ 𝐵 ∪ 𝐶) = 𝑐𝑎𝑟𝑑(𝐴) + 𝑐𝑎𝑟𝑑(𝐵) + 𝑐𝑎𝑟𝑑(𝐶) − 𝑐𝑎𝑟𝑑(𝐴 ∩ 𝐵) −
𝑐𝑎𝑟𝑑(𝐴 ∩ 𝐶) − 𝑐𝑎𝑟𝑑(𝐵 ∩ 𝐶) + 𝑐𝑎𝑟𝑑(𝐴 ∩ 𝐵 ∩ 𝐶)

Example : Assume that 100 of the 120 students of a Master of Mathemetics decide to learn at
least one of the following languages : English, Russian and German. Assume that
65 studying English
45 studying German
42 studying Russian
20 studying English and German
25 studying English and Russian
15 studying German and Russian
Let 𝐸, 𝐺, and 𝑅 be the set of students who are learning English, German and Russian,
respectively. Find the number of students who study the three languages and assign the
correct number of students at each of the eight regions of the following Venn diagram.
The powerset of a set 𝐴 is the set 𝑃(𝐴) of all subsets of 𝐴, including the empty set and the
set 𝐴 itself. For example, the powerset of 𝐴 = {1, 2, 3} is
𝑃(𝐴) = {∅, {1}, {2}, {3}, {1, 2}, {1,3}, {2, 3}, {1, 2, 3}}.
There are 8 = 23 elements in 𝑃(𝐴) ; here 3 is the cardinality of 𝐴. More generally, the
following result holds.

Theorem : For any finite set 𝐴, the powerset of 𝐴 is a finite set with cardinality 2𝑐𝑎𝑟𝑑(𝐴) .

Let 𝑆 be a nonempty set. A partition of 𝑆 is a collection {𝐴𝑖 : 𝑖 ∈ 𝐼} of nonempty subsets of


𝑆 such that
(i) Each 𝑎 in 𝑆 belongs to one of the 𝐴𝑖 ;
(ii) 𝐴𝑖 ∩ 𝐴𝑗 = ∅ for 𝑖 ≠ 𝑗.
For instance, the collection {{1, 3, 5}, {2, 6}, {4, 8, 9}} is not a partition of 𝑆 = {1, 2, … , 9} because
7 belongs to 𝑆, but no member of this collection contains 7. Likewise, the collection
{{1, 3, 5}, {2, 4, 6, 8}, {5, 7, 9}} is not a partition of 𝑆 = {1, 2, … , 9} ; the reason is that two of the
three members of this collection are not mutually exclusive : {1, 3, 5} ∩ {5, 7, 9} = {5} ≠ ∅.
However, the collection {{1, 3, 5}, {2, 4, 6, 8}, {7, 9}} is a collection of 𝑆 = {1, 2, … , 9}.

8- CARTESIAN PRODUCTS
For two sets 𝐴 and 𝐵, we define the cartesian product of 𝐴 and 𝐵 to be the set of all
ordered pairs (𝑎, 𝑏) where 𝑎 ∈ 𝐴 and 𝑏 ∈ 𝐵. This operation on sets is somewhat similar to the
product of two numbers. We denote the cartesian product of 𝐴 and 𝐵 by 𝐴 × 𝐵. Thus,
𝐴 × 𝐵 = {(𝑎, 𝑏): 𝑎 ∈ 𝐴 𝑎𝑛𝑑 𝑏 ∈ 𝐵}
Given 𝐴 = {1, 2, 3} and 𝐵 = {𝑎, 𝑏}, then
𝐴 × 𝐵 = {(1, 𝑎), (1, 𝑏), (2, 𝑎), (2, 𝑏), (3, 𝑎), (3, 𝑏)}
and
𝐵 × 𝐴 = {(𝑎, 1), (𝑎, 2), (𝑎, 3), (𝑏, 1), (𝑏, 2), (𝑏, 3)}
So 𝐴 × 𝐵 and 𝐵 × 𝐴 are not equal since for example, (1, 𝑎) is a member of 𝐴 × 𝐵 but (1, 𝑎)
does not belong to 𝐵 × 𝐴. Consequently, the cartesian product of two sets is not commutative.
However, in a few special cases the two cartesian products do consist of exactly the same
set of ordered pairs. The first possibility is that 𝐵 = ∅, for this case both 𝐴 × 𝐵 and 𝐵 × 𝐴 are
the empty set. Likewise, both cartesian products 𝐴 × 𝐵 and 𝐵 × 𝐴 are empty when 𝐴 = ∅.
If both 𝐴 and 𝐵 are nonempty, there is only one other way to ensure that 𝐴 × 𝐵 = 𝐵 × 𝐴.
To discover what this condition might, let’s take any elements 𝑥 ∈ 𝐴 and 𝑦 ∈ 𝐵. (This is
possible since neither 𝐴 nor 𝐵 are the empty sets). So we could have (𝑥, 𝑦) ∈ 𝐴 × 𝐵. But since
𝐴 × 𝐵 = 𝐵 × 𝐴, we could then write (𝑥, 𝑦) ∈ 𝐵 × 𝐴, which means that 𝑥 ∈ 𝐵 and 𝑦 ∈ 𝐴. In
summary, we deduce that if 𝑥 is any element of 𝐴 then 𝑥 ∈ 𝐵 also, and fiurtheremore that if 𝑦
is any element of 𝐵 then 𝑦 ∈ 𝐴. But this exactly via criteria for showing that two sets are
equal, so conclude that we must have 𝐴 = 𝐵 . Clearly this condition works, for both sides of
𝐴 × 𝐵 = 𝐵 × 𝐴 reduce to just 𝐴 × 𝐴.
Theorem
1- For any two finite sets 𝐴 and 𝐵, the cartesian products 𝐴 × 𝐵 and 𝐵 × 𝐴 are finite sets, and
𝑐𝑎𝑟𝑑(𝐴 × 𝐵) = 𝑐𝑎𝑟𝑑(𝐴) × 𝑐𝑎𝑟𝑑(𝐵) = 𝑐𝑎𝑟𝑑(𝐵 × 𝐴)
2- For any three sets 𝐴, 𝐵 and 𝐶 ,
a) (𝐴 × 𝐵) × 𝐶 = 𝐴 × (𝐵 × 𝐶)
b) 𝐴 × (𝐵 ∪ 𝐶) = (𝐴 × 𝐵) ∪ (𝐴 × 𝐶)

B- FUNCTIONS
Given two sets 𝐴 and 𝐵, a function from 𝐴 to 𝐵 is a rule associating with each element of
𝐴 one and only one element of 𝐵. When there is a function 𝑓 from 𝐴 to 𝐵, we write 𝑓: 𝐴 ⟶ 𝐵.
The set 𝐴 is referred to as the domain of 𝑓, and the set 𝐵 is referred to as the codomain of 𝑓.
Since the function 𝑓 associates with each 𝑎 ∈ 𝐴 a unique 𝑏 ∈ 𝐵 , we say that 𝑓 maps 𝑎 to 𝑏 and
write 𝑓(𝑎) = 𝑏. In this case, 𝑏 is called the image of 𝑎 with respect to 𝑓, and 𝑎 is called a
preimage of 𝑏.
The graph of a function 𝑓: 𝐴 ⟶ 𝐵 is the set 𝐺(𝑓) of ordered pairs (𝑎, 𝑏) ∈ 𝐴 × 𝐵 such that 𝑓
maps 𝑎 to 𝑏 :
𝐺(𝑓) = {(𝑎, 𝑏) ∈ 𝐴 × 𝐵: 𝑓(𝑎) = 𝑏}
Two functions 𝑓: 𝐴 ⟶ 𝐵 and 𝑔: 𝐴 ⟶ 𝐵 are said to be equal and we write 𝑓 = 𝑔, if 𝑓(𝑎) = 𝑔(𝑎)
for every 𝑎 ∈ 𝐴. This is equivalent to say that the functions 𝑓 and 𝑔 have the same graph.
For a function 𝑓: 𝐴 ⟶ 𝐵, we call the set of all values of 𝑓 the range or image of 𝑓. Thus,
the image of 𝑓 is the set
𝐼𝑚(𝑓) = {𝑏 ∈ 𝐵: 𝑏 = 𝑓(𝑎)𝑓𝑜𝑟 𝑠𝑜𝑚𝑒 𝑎 ∈ 𝐴}
Consider the function 𝑓 such that 𝐺(𝑓) = {(1, 2), (2, 3), (3, 3), (4, 5), (5, −1), (6, 1)}. The domain
of 𝑓 is the set of the first components of the ordered pairs belonging to 𝐺(𝑓) ; i.e.,
𝑑𝑜𝑚𝑎𝑖𝑛(𝑓) = {1, 2, 3, 4, 5, 6}. However, the image of 𝑓 is the set of the second components of
the ordered pairs in 𝐺(𝑓). So 𝐼𝑚(𝑓) = {2, 3, 5, −1, 1}.
Generally, a function is expressed as a mathematical formula. For instance, the function that
maps any real number to its square can be described by writing 𝑓(𝑥) = 𝑥 2 , where 𝑥 is a
variable.

1- IMAGES AND INVERSE IMAGES


Let 𝑓: 𝐴 ⟶ 𝐵 be a function, 𝑆 a subset of 𝐴 and 𝑇 a subset of 𝐵. The image de 𝑆 with
respect to 𝑓 is the set of those elements of 𝐵 which the elements of 𝑆 are mapped to.
Therefore, the image of 𝑆 with respect to 𝑓 is the set
𝑓(𝑆) = {𝑓(𝑠): 𝑠 ∈ 𝑆}
On the other hand, the inverse image of 𝑇 with respect to 𝑓 is the set of those elements of 𝐴
that are mapped to some elements of 𝑇. Thus, the inverse image of 𝑇 with respect to 𝑓 is the
set
𝑓 −1 (𝑇) = {𝑎 ∈ 𝐴: 𝑓(𝑎) ∈ 𝑇}
For instance, let 𝑓: ℝ ⟶ ℝ be the function defined by 𝑓(𝑥) = |𝑥| and let the set 𝑆 = {𝑥 ∈
ℝ: 9 ≤ 𝑥 2 }. The image of 𝑆 with respect to 𝑓 is the set [0, +∞[. Let 𝑔: ℝ+ ⟶ ℝ be the function
defined by 𝑔(𝑥) = 𝑙𝑛𝑥 . The inverse image of 𝑆 with respect to 𝑔 is the set ]0, 𝑒 −3 ] ∪ [𝑒 3 , +∞[.

2- COMPOSITION
Given two functions 𝑓: 𝐴 ⟶ 𝐵 and 𝑔: 𝐵 ⟶ 𝐶 , their composition is defined as the function
ℎ: 𝐴 ⟶ 𝐶 such that ℎ(𝑎 ) = 𝑔(𝑓(𝑎)) for each 𝑎 ∈ 𝐴. We denote the composition of 𝑓 and 𝑔 by
𝑔 ∘ 𝑓.
Theorem : Let 𝑓: 𝐴 ⟶ 𝐵, 𝑔: 𝐵 ⟶ 𝐶 , and ℎ: 𝐶 ⟶ 𝐷 be functions. Then (ℎ ∘ 𝑔) ∘ 𝑓 = ℎ ∘ (𝑔 ∘ 𝑓).
The identity function on a set 𝐴 is the function 1𝐴 : 𝐴 ⟶ 𝐴 defined by 1𝐴 (𝑎) = 𝑎 for each
𝑎 ∈ 𝐴. For any function 𝑓: 𝐴 ⟶ 𝐵, we have
𝑓 ∘ 1𝐴 = 𝑓 𝑎𝑛𝑑 1𝐵 ∘ 𝑓 = 𝑓

3- PROPERTIES OF FUNCTIONS
a) INJECTIVE FUNCTIONS
A function 𝑓: 𝐴 ⟶ 𝐵 is said to be injective (or 𝑓 is a one-to-one function) if different elements
of 𝐴 have necessarily different images with respect to 𝑓. This means that for all 𝑥, 𝑥′ in 𝐴,
𝑥 ≠ 𝑥′ ⟹ 𝑓(𝑥) ≠ 𝑓(𝑥′)
The contrapositive of this implication is often used in practice to prove that a function is
injective. That is,
𝑓(𝑥) = 𝑓(𝑥 ′ ) ⟹ 𝑥 = 𝑥′
For example, the function 𝑓: ℝ+ ⟶ ℝ, 𝑥 ⟼ √𝑥 is injective. The reason is that two different
nonnegative real numbers have necessarily different square roots. However, the function
𝑓: ℝ ⟶ ℝ, 𝑥 ⟼ 𝑥 2 is not injective because for example, −1 ≠ 1 but 𝑓(−1) = 1 = 𝑓(1).

b) SURJECTIVE FUNCTIONS
A function 𝑓: 𝐴 ⟶ 𝐵 is said to be surjective (or 𝑓 is an onto function) if any element of 𝐵 has
at least one preimage with respect to 𝑓 in 𝐴. That is, for any 𝑏 ∈ 𝐵, there is 𝑎 ∈ 𝐴 such that
𝑓(𝑎) = 𝑏 :
∀𝑏 ∈ 𝐵, ∃𝑎 ∈ 𝐴, 𝑓(𝑎) = 𝑏
The negation of this statement is :
∃𝑏 ∈ 𝐵, ∀𝑎 ∈ 𝐴, 𝑓(𝑎) ≠ 𝑏
For example, the function 𝑓: ℝ ⟶ ℝ+ , 𝑥 ⟼ 𝑥 2 is surjective. This follows from the fact that
every nonnegative real number 𝑏 has at least one preimage with respect to 𝑓 : 𝑎 = −√𝑏 or 𝑎 =
√𝑏.

c) BIJECTIVE FUNCTIONS
A function 𝑓: 𝐴 ⟶ 𝐵 is said to be bijective (or 𝑓 is a one-to- one correspondence) if any
element of 𝐵 has a unique preimage with respect to 𝑓 in 𝐴. In other words, a function 𝑓 is
bijective if only if it is both injective and surjective.
For any bijective function 𝑓: 𝐴 ⟶ 𝐵, we can define therefore a function 𝑓 −1 : 𝐵 ⟶ 𝐴 as
𝑓 −1 (𝑏) = 𝑎 ⟺ 𝑓(𝑎) = 𝑏
The function 𝑓 −1
is called the inverse of 𝑓. So, we have that
(i) −1
𝑓 ∘ 𝑓 = 1𝐴
(ii) 𝑓 ∘ 𝑓 −1 = 1𝐵

4- SET EQUIVALENCE
Informally speaking, if 𝑓: 𝐴 ⟶ 𝐵 is an injective function then since different elements of 𝐴
are mapped to different elements of 𝐵, the size of 𝐵 is at least as large as the size of 𝐴. On the
other hand, if 𝑓 is surjective, then since each element of 𝐵 has at least one element in 𝐴 that is
mapped to it, the size of 𝐵 is no greater than the size of 𝐴. Thus, bijective functions provide us
with a means to compare the sizes of sets.
Two sets 𝐴 and 𝐵 are said to be equivalent and we write 𝐴~𝐵 or 𝐵~𝐴, if there is a
bijective function from 𝐴 to 𝐵. Obviously, each set is equivalent to itself. Furtheremore, if a
set is equivvalent to two other sets, then the two sets are also equivalent.
A set 𝐴 is said to be infinite or has infiinite cardinality when it is equivalent to a proper
part of itself ; in the contrary case, 𝐴 is said to be finite. For instance, ℕ, ℤ, ℚ and ℝ are infinite
sets. Any set that is equivalent to ℕ is called countably infinite, and sets that are either finite
or countably infinite are called countable.

EXERCISES
Exercise 1: Let 𝐴 and 𝐵 be sets. Show that
a) 𝐴 ∩ 𝐵 ⊆ 𝐴
b) 𝐴 ⊆ 𝐴 ∪ 𝐵
c) 𝐴 − 𝐵 ⊆ 𝐴

Exercise 2: What can you say about the sets 𝐴 and 𝐵 if the following are true?
a) 𝐴∪𝐵 =𝐴
b) 𝐴∩𝐵 =𝐴
c) 𝐴−𝐵=𝐴
d) 𝐴∩𝐵 =𝐵∩𝐴
e) 𝐴−𝐵=𝐵−𝐴

Exercise 3: Can you conclude that 𝐴 = 𝐵 if 𝐴, 𝐵, and 𝐶 are sets such that
a) 𝐴 ∪ 𝐶 = 𝐵 ∪ 𝐶 ?
b) 𝐴 ∩ 𝐶 = 𝐵 ∩ 𝐶 ?

Exercise 4: Let 𝐴 and 𝐵 be subsets of a universal set 𝑈. Show that 𝐴 ⊆ 𝐵 if and only if 𝐵̅ ⊆ 𝐴̅.

Exercise 5: The complement of a set 𝐴 with respect to a set 𝐵, denoted by 𝐴 − 𝐵, is the set of
elements of 𝐴 which do not belong to 𝐵:
𝐴 − 𝐵 = {𝑥: 𝑥 ∈ 𝐴 𝑎𝑛𝑑 𝑥 ∉ 𝐵}
1- Given the arbitrary sets 𝐴 and 𝐵. Show that
a) 𝐴 ∩ (𝐵 − 𝐴) = ∅
b) 𝐴 ∪ (𝐵 − 𝐴) = 𝐴 ∪ 𝐵
c) 𝐴 − 𝐵 = 𝐴 − (𝐴 ∩ 𝐵)
2- Let 𝐴 and 𝐵 be subsets of a universal set 𝑈. Show that
a) 𝐴 − 𝐵 = 𝐴 ∩ 𝐵̅
b) (𝐴 ∩ 𝐵) ∪ (𝐴 ∩ 𝐵̅) = 𝐴
3- Show that for all sets 𝐴, 𝐵, and 𝐶
(𝐵 − 𝐴) ∪ (𝐶 − 𝐴) = (𝐵 ∪ 𝐶) − 𝐴
4- Find the sets 𝐴 and 𝐵 if 𝐴 − 𝐵 = {1, 5, 7, 8}, 𝐵 − 𝐴 = {2, 10}, and 𝐴 ∩ 𝐵 = {3, 6, 9}.

Exercise 6: The successor of the set 𝐴 is the set 𝐴 ∪ {𝐴}. Find the successors of the following
sets.
a) {1, 2, 3}
b) ∅
c) {∅}
d) {∅, {∅}}
How many elements does the successor of a set with 𝑛 elements have?

Exercise 7: Determine the powerset of 𝑆 = {𝑎, 𝑏, 𝑐, 𝑑}.


Exercise 8: Given the equation (2𝑥, 𝑥 + 𝑦) = (6, 2), evaluate 𝑥 and 𝑦.

Exercise 9: Let 𝐴𝑖 = {1, 2, 3, … , 𝑖} for 𝑖 = 1, 2, 3, …. Find


a) ⋃𝑛𝑖=1 𝐴𝑖
b) ⋂𝑛𝑖=1 𝐴𝑖

Exercise 10: Suppose that the universal set is 𝑈 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. Express each of
the following sets with bit strings where the 𝑖th bit in the string is 1 if 𝑖 is in the set and 0
otherwise.
a) {3, 4, 5}
b) {1, 3, 6, 10}
c) {2, 3, 4, 5, 7, 8, 9}

Exercise 11: Using the same universal set as in the last problem, find the sets specified by
each of the following bit strings.
a) 1111001111
b) 0101111000
c) 1000000001

Exercise 12: The symmetric difference of 𝐴 and 𝐵, denoted 𝐴 ⊕ 𝐵; is the set containing those
elements in either 𝐴 or 𝐵, but not in both 𝐴 and 𝐵.
1- Find the symmetric difference of {1, 3, 5} and {1, 2, 3}.
2- Find the symmetric difference of the set of computer science majors at a school and the set
of mathematics majors at this school.
3- Draw the Venn diagram of the symmetric difference of the sets 𝐴 and 𝐵.
4- Show that 𝐴 ⊕ 𝐵 = (𝐴 ∪ 𝐵) − (𝐴 ∩ 𝐵).
5- Show that if 𝐴 is a subset of a universal set 𝑈, then
a) 𝐴 ⊕ 𝐴 = ∅.
b) 𝐴 ⊕ ∅ = 𝐴.
c) 𝐴 ⊕ 𝑈 = 𝐴̅.
d) 𝐴 ⊕ 𝐴̅ = 𝑈.
6- Show that if 𝐴 and 𝐵 are sets, then
a) 𝐴 ⊕ 𝐵 = 𝐵 ⊕ 𝐴.
b) (𝐴 ⊕ 𝐵) ⊕ 𝐵 = 𝐴.
7- What can you say about the sets 𝐴 and 𝐵 if 𝐴 ⊕ 𝐵 = 𝐴?

Exercise 13: Determine the graph of the function 𝑔 that maps each name of the set
{𝐵𝑒𝑟𝑡ℎ𝑒, 𝑀𝑎𝑟𝑡𝑖𝑛, 𝐷𝑎𝑣𝑖𝑑, 𝐴𝑙𝑎𝑖𝑛, 𝑅𝑒𝑛é𝑒} the number of different letters it contains.

Exercise 14: Give all the partitions of the set 𝐴 = {1, 2, 3}.

Exercise 15: Are the following functions? Justify your answer.


(i) 𝑓(𝑥) = 𝑥 2 with domain and codomain ℝ ;
(ii) 𝑔(𝑥) = 2𝑥 + 1 with domain and codomain ℚ ;
(iii) ℎ(𝑥) = ∓𝑥 with domain and codomain ℤ;
(iv) 𝑢(𝑥) = √𝑥 with domain and codomain ℕ.
Exercise 16: Let 𝑓 be the function from the set 𝐸 = {𝑎, 𝑏, 𝑐, 𝑑, 𝑒} to the set 𝐹 = {1, 2, 3, 4}
defined by
𝑓(𝑎) = 1, 𝑓(𝑏) = 2, 𝑓(𝑐) = 4, 𝑓(𝑑) = 2, 𝑓(𝑒) = 4
1- Given the sets 𝐴 = {𝑎, 𝑏, 𝑐} and 𝐴′ = {𝑎, 𝑑, 𝑒}.
a) Determine 𝑓(𝐴) and 𝑓(𝐴′ ).
b) Compare 𝑓(𝐴 ∩ 𝐴′) with 𝑓(𝐴) ∩ 𝑓(𝐴′).
c) Check that 𝑓(𝐴 ∪ 𝐴′ ) = 𝑓(𝐴) ∪ 𝑓(𝐴′).
2- Let 𝐵 = {1, 2} and 𝐵′ = {3, 4} be subsets of 𝐹 .
a) Find 𝑓 −1 (𝐵) and 𝑓 −1 (𝐵′).
b) Compare 𝑓 −1 (𝐵) ∩ 𝑓 −1 (𝐵′) with 𝑓 −1 (𝐵 ∩ 𝐵′).
c) Compare 𝑓 −1 (𝐵) ∪ 𝑓 −1 (𝐵′) with 𝑓 −1 (𝐵 ∪ 𝐵′).
3- Is 𝑓 one-to-one?
4- Is 𝑓 onto?

Exercise 17: Let 𝑓: 𝑆 → 𝑇 be a function. Prove that the following statements are equivalent.
a) 𝑓 is one-to-one;
b) 𝑓(𝐴 ∩ 𝐵 = 𝑓(𝐴) ∩ 𝑓(𝐵) for all subsets 𝐴 and 𝐵 of 𝑆;
c) 𝑓 −1 (𝑓(𝐴)) = 𝐴 for every subset 𝐴 of 𝑆;
d) For all disjoint subsets 𝐴 and 𝐵 of 𝑆, the images 𝑓(𝐴) and 𝑓(𝐵) are disjoint;
e) For all subsets 𝐴 and 𝐵 of 𝑆 with 𝐵 ⊆ 𝐴, we have 𝑓(𝐴 − 𝐵) = 𝑓(𝐴) − 𝑓(𝐵).

Exercise 18: Let 𝑆 the collection of subsets of a given set 𝑇. Let 𝑓: 𝑆 → ℝ be a real valued
function defined on 𝑆. The function 𝑓 is called additive if 𝑓(𝐴 ∪ 𝐵) = 𝑓(𝐴) + 𝑓(𝐵) whenever 𝐴
and 𝐵 are disjoint subsets of 𝑇. If 𝑓 is additive, prove that for any two sets, we have
𝑓(𝐴 ∪ 𝐵) = 𝑓(𝐴) + 𝑓(𝐵 − 𝐴) 𝑎𝑛𝑑 𝑓(𝐴 ∪ 𝐵) = 𝑓(𝐴) + 𝑓(𝐵) − 𝑓(𝐴 ∩ 𝐵)

You might also like