Basic Set Theory: 1 2 2 Sets and Elements 2

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Basic Set Theory

Contents
1 Introduction 2

2 Sets and Elements 2


2.1 Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Universal Set, Empty Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Subset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Proper Subset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.5 Sets of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.6 Power Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.7 Disjoint Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.8 Venn Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Basic Set Operations 6


3.1 Union of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.2 Intersection of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Difference of Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4 Complement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.5 Operations on comparable sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.6 De Morgan’s theorems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4 Principle of Inclusion and Exclusion 9

1
Sets and Elements 2

1 Introduction
Set theory is a basis of modern mathematics, and notions of set theory are used in all formal
descriptions. The notion of set is taken as undefined, primitive, or basic, so I will not try to
define what a set is, but an informal description is provided below, and also described are some
important properties and operations regarding sets, and some examples. All other notions of
mathematics can be built up based on the notion of set.

2 Sets and Elements


A set is a well-defined collection of distinguishable objects. The objects are called the elements
of the set and are said to belong to the set while the set is said to contain its element.
Although we shall study sets as abstract entities, listed below are ten particular examples of sets.
Example 1. The numbers 1, 3, 7, and 10.
Example 2. The solutions of the equation x2 − 3x − 2 = 0.
Example 3. The vowels of the English alphabet: a, e, i, o, u.
Example 4. The people living on the earth presently.
Example 5. The students Ramesh, Suresh, and Mahesh.
Example 6. The students who are absent from school.
Example 7. The countries India, Pakistan, and Bangladesh.
Example 8. The capital cities of Europe.
Example 9. The numbers 2, 4, 6, 8, . . . .
Example 10. The rivers in India.

Notice that the sets in the odd numbered examples are defined, i.e., presented, by actually
listing its elements; and the sets in the even numbered examples are defined by stating properties,
i.e., rules, which decide whether or not a particular object is an element of the set.
As seen in the above examples, sets can consist of elements of various natures: people, physical
objects, numbers, signs, and, sometimes, other sets as well. (We will use the words object or
entity in a very broad way to include all these different kinds of things.) A set is an object; its
members do not have to be physically collected together for them to constitute a set.
The membership criteria for a set must in principle be well-defined, and not vague. If we
have a set and an object, it is possible that we do not know whether this object belongs to the
set or not, because of our lack of information or knowledge. (E.g. “The set of students in this
room over the age of 15”: a well-defined set but we may not know who is in it.) But the answer
should exist, at any rate in principle. It could be unknown, but it should not be vague. If the
answer is vague for some collection, we cannot consider that collection as a set. Another thing:
If we have a set, then for any two elements of it, x and y, it should not be vague whether x = y,
or they are different. (If they are identical, then they are not actually “two” elements of it; the
issue really arises when we have two descriptions of elements, and we want to know whether those
descriptions describe the same element, or two different elements.)
For example: is the letter q the same thing as the letter Q? Well, it depends on what set we
are considering. If we take the set of the 26 letters of the English alphabet, then q and Q are
the same element. But if we take the set of 52 upper-case and lower-case letters of the English
alphabet, then q and Q are two distinct elements. Either is possible, but we have to make it clear
what set we are talking about, so that we know whether or not q = Q. Sometimes we simply
assume for the sake of examples that a description is not vague when perhaps for other purposes
it would be vague – e.g., the set of all red objects.

Anant Kumar Mob. No. 9932347531, 9002833857


Sets and Elements 3

2.1 Notations
Usually, sets are denoted by capital letters of the alphabet like A, B, C, X, Y , . . . while the
elements are denoted by small letters a, b, c, x, y, z, . . . and so on. We also have the following
notations:
• set of natural numbers: N
• set of prime numbers: P
• set of integers: Z
• set of rational numbers: Q
• set of real numbers: R
• set of positive real numbers: R+
If a is an element of a set A, we write down a ∈ A (read “a belongs to A”) and if a is not an
element of set A, we write a ∈/ A (read “a does not belong to A”).
There are two ways to specify sets:
• the tabular or roster form
• set-builder form
In roster or tabular form, the set is specified by actually listing all its distinct elements separated
by commas and enclosing them inside a pair of braces {}. For example, let set A consist of the
numbers 1, 3, 7, and 10, then we write
A = {1, 3, 7, 10}
In set-builder form, we specify the set by stating the property or properties satisfied by a generic
element to be part of the set. For example, if B is the set of all even integers, then B can be
specified as:
B = {x | x = 2n, n ∈ Z}
which reads “B is the set of x such that x is equal to 2n for an integer n”. The x before “|”
represents a generic element of the set, the vertical bar “|” means “such that” and the statement
after the vertical bar gives the condition which x satisfies. As examples, let us write the ten sets
given in the above examples using these notations:
Example 11. A1 = {1, 3, 7, 10}.
Example 12. A2 = {x | x2 − 3x − 2 = 0}.
Example 13. A3 = {a, e, i, o, u}.
Example 14. A4 = {x | x is a person living on the earth presently}.
Example 15. A5 = {Ramesh, Suresh, Mahesh}.
Example 16. A6 = { x | x is a student, x is absent from school}.
Example 17. A7 = {India, Pakistan, Bangladesh}.
Example 18. A8 = {x | x is a capital city, x is in Europe}.
Example 19. A9 = {2, 4, 6, 8, . . . }.
Example 20. A10 = { x | x is a river, x is in India}.

Equality of sets: Two sets A and B are equal, written A = B, if they have the same elements,
that is, if every element which belongs to A also belongs to B, and vice versa. The negation of
A = B is written A ̸= B.

Anant Kumar Mob. No. 9932347531, 9002833857


Sets and Elements 4

2.2 Universal Set, Empty Set


All sets under investigation in any application of set theory are assumed to be contained in
some large fixed set called the universal set or universe of discourse. For example, in plane
geometry, the universal set consists of all points in the plane, and in human population studies
the universal set consists of all the people of the world. We shall denote the universal set with U
unless otherwise specified.
Given a universal set U and a property P, there may be no element in U which has the
property P. For example, the set S = {x | x ∈ R, x2 = −1} has no elements since the square of
a real number can never be negative. This set with no elements is called empty set or null set,
and is denoted by ∅ (based on the Greek letter phi ). There is only one empty set: If S and T
are both empty set, then S = T since they have exactly the same elements, namely, none.

2.3 Subset
If every element in a set A is also a member of a set B, then A is called a subset of set B. More
specifically, A is a subset of B if x ∈ A implies x ∈ B.
If A is a subset of B, we denote this relationship by writing

A⊂B

which can also be read “A is contained in B”.


Example 21. The set C = {1, 3, 5} is a subset of D = {5, 4, 3, 2, 1}, since each element 1, 3, and 5
belonging to C also belongs to D.

Example 22. The set E = {2, 4, 6} is a subset of F = {6, 4, 2}, since each element 2, 4 and 6 belonging
to E also belongs to F . Note, in particular, that E = F . In a similar manner it can be shown that every
set is a subset of itself.

Example 23. Let G = {x | x is a positive even integer}, and H = {x | x is a positive integral power of 2}.
Then H ⊂ G.

With the above definition of a subset, we are able to restate the definition of the equality of
two sets:

 Definition 1 (Equality of two sets). Two sets A and B are equal, i.e. A = B, if and only if
A ⊂ B and B ⊂ A.

If A is a subset of B, then we can also write

B⊃A

which reads “B is a superset of A” or “B contains A”. Furthermore, we write

A ̸⊂ B or B ̸⊃ A

if A is not a subset of B. In conclusion, we state:


♣ Remark 1. The null set ∅ is considered to be a subset of every set.
♣ Remark 2. Each set is a subset of itself.
♣ Remark 3. If A is not a subset of B, i.e., if A ̸⊂ B, then there is at least one element in A
that is not a member of B.

Anant Kumar Mob. No. 9932347531, 9002833857


Sets and Elements 5

2.4 Proper Subset


Since every set A is a subset of itself, we call B a proper subset of A if, first, B is a subset of A
and, secondly, if B is not equal to A. That is B is a proper subset of A if

B⊂A and A ̸= B

In some books “B is a subset of A” is denoted by

B⊆A

and “B is a proper subset of A” is denoted by

B⊂A

We will continue to use the notations introduced in Section 2.3 in which we do not distinguish
between a subset and a proper subset.

2.5 Sets of Sets


It sometimes will happen that the objects of a set are sets themselves; for example, the set of all
subsets of A. In order to avoid saying “set of sets”, it is common practice to say “family of sets”
or “class of sets”. Under these circumstances, and in order to avoid confusion, we sometimes will
let script letters
A , B, . . .
denote the families, or classes, of sets since capital letters already denote their elements.
Example 24. In geometry we usually say “a family of lines” or “a family of curves” since lines and curves
are themselves sets of points.

Example 25. The set A = {{2, 3}, {2}, {5, 6}} is a family of sets. Its members are the sets {2, 3},
{2}, and {5, 6}.

Theoretically, it is possible that a set has some members which are sets themselves and some
members which are not sets, although in any application of the theory of sets this case arises
infrequently.
Example 26. Let A = {2, {1, 3}, 4, {2, 5}}. Then A is not a family of sets; here some elements of A
are sets and some are not.

2.6 Power Set


The family of all the subsets of any set S is called the power set of S. We denote the power set
of S by 2S .
Example 27. Let M = {a, b}. Then

2M = {{a, b}, {a}, {b}, ∅}

Example 28. Let T = {4, 7, 8}. Then

2T = {T, {4, 7}, {4, 8}, {7, 8}, {4}, {7}, {8}, ∅}

If a set S is finite, say S has n elements, then the power set of S can be shown to have 2n
elements. This is one reason why the class of subsets of S is called the power set of S and denoted
by 2S .

Anant Kumar Mob. No. 9932347531, 9002833857


Basic Set Operations 6

2.7 Disjoint Sets


If sets A and B have no elements in common, i.e. if no element of A is in B and no element of
B is in A, then we say that A and B are disjoint.
Example 29. Let A ={1, 3, 7, 8} and B = {2, 4, 7, 9}. Then A and B are not disjoint since 7 is in both
the sets.

Example 30. Let A be the set of all even integers and B the set of all odd integers. Then A and B are
disjoint since no integer is simultaneously even and odd.

Example 31. Let E = {x, y, z} and F = {r, s, t}. Then E and F are disjoint.

2.8 Venn Diagrams


A Venn diagram is a pictorial representation of sets where sets are represented by enclosed areas
in a plane. The universal set U is represented by the points in a rectangle, and other sets are
represented by disks lying within the rectangle. If A ⊂ B, then the disk representing A will be
entirely within the disk representing B, as shown in Figure 1a. If A and B are disjoint, then
the disk representing A will be separated from the disk representing B, as in Figure 1b. On the
other hand if A and B are two arbitrary sets, it is possible that some elements are in A but not
in B, some elements are in B but not in A, some are in both A and B, and some other are in
neither A nor B; hence, in general, we represent A and B as in Figure 1c.

U U U
B B B
A A
A

(a) A ⊂ B (b) A and B are disjoint. (c)

Figure 1: Venn Diagrams

3 Basic Set Operations


In this section, we describe the basic operations defined on sets. These are the operations of
union, intersection, and difference of sets.

3.1 Union of Sets


Given sets A and B, their union denoted by A ∪ B (read: “A union B”) is the set of all elements
which belong to A or to B or both. That is,

A ∪ B = {x | x ∈ A, or x ∈ B}

We show the union of sets A and B in the Venn diagram in Figure 2.


Example 32. Let S = {a, b, c, d} and T = {f, b, d, g}. Then

S ∪ T = {a, b, c, d, f, g}

Example 33. Let P be the set of positive real numbers and let Q be the set of negative real numbers.
Then P ∪ Q, the union of P and Q, consists of all real numbers except zero.

Anant Kumar Mob. No. 9932347531, 9002833857


Basic Set Operations 7

111111
000000
U 000000
111111
000000
111111
U U
000
111
000000
111111 1
0
000
111
000000
111111
000
111 0
1 11
00
000000
111111
000
111 B 0
1 B 00
11
00
11 B
000000
111111
A
000
111
A 0
1
0
1
A
00
11
000000
111111
000
111 00
11
000000
111111
000000
111111
Figure 2: A ∪ B is the shaded Figure 3: A ∩ B is the shaded Figure 4: A − B is the shaded
portion portion portion

It follows directly from the definition of the union that the sets A ∪ B and B ∪ A are the same
set, i.e.,
(Commutative Property) : A∪B =B∪A
We also notice that A ⊂ (A ∪ B) and B ⊂ (A ∪ B).

3.2 Intersection of Sets


The intersection of sets A and B, denoted A ∩ B (read “A intersection B”), is the set of elements
which are common to A and B, that is, those elements which belong to A and which also belong
to B. More concisely,
A ∩ B = {x | x ∈ A and x ∈ B}
We show the intersection of sets A and B in the Venn diagram in Figure 3.
It follows directly from the definition of the intersection of two sets that
(Commutative Property) : A∩B =B∩A
We also notice that (A ∩ B) ⊂ A and (A ∪ B) ⊂ B. Further for disjoint sets A and B, we have
A ∩ B = ∅.
Example 34. For three sets A, B, and C, if A ∪ B = A ∪ C and A ∩ B = A ∩ C, then B = C.
Solution: We prove that B ⊂ C and C ⊂ B. That will mean that B = C. Let x ∈ B. Then there are
only two distinct cases: (i) x ∈ A, or (ii) x ̸∈ A.
(i) If x ∈ A, then (since it is already in B)
x∈A∩B
⇒ x∈A∩C (∵ A ∩ B = A ∩ C)
⇒ x∈C (∵ x is already in A)
(ii) If x ̸∈ A, then (since it is already in B)
x∈A∪B
⇒ x∈A∪C (∵ A ∪ B = A ∪ C)
⇒ x∈C (∵ x is not in A but it is in the union of A and C)
That is, whenever x is in B, it is also in C. Hence B ⊂ C.
Again, let y ∈ C. Then there are only two distinct cases: (i) y ∈ A, or (ii) y ̸∈ A.
(i) If y ∈ A, then (since it is already in C)
y ∈A∩C
⇒ y ∈A∩B (∵ A ∩ C = A ∩ B)
⇒ y∈B (∵ y is already in A)
(ii) If y ̸∈ A, then (since it is already in C)
y ∈A∪C
⇒ y ∈A∪B (∵ A ∪ C = A ∪ B)
⇒ y∈B (∵ y is not in A but it is in the union of A and B)

Anant Kumar Mob. No. 9932347531, 9002833857


Basic Set Operations 8

That is, whenever y is in C, it is also in B. Hence C ⊂ B. So B ⊂ C and C ⊂ B. But this implies that
B = C.

3.3 Difference of Sets


The difference of sets A and B is the set of elements which belong to A but which do not belong
to B. We denote the difference of A and B by A − B which is read “A difference B” or simply
“A minus B”. We show the difference of sets A and B in the Venn diagram in Figure 4.
Example 35. Let S = {a, b, c, d} and T = {f, b, d, g}. Then

S − T = {a, c} and T − S = {f, g}

The difference of A and B may also be written concisely as

A − B = {x | x ∈ A, x ∈
/ B}

Also note that (A − B) ⊂ A and the sets (A − B), A ∩ B, and (B − A) are mutually disjoint,
that is, the intersection of any two is the null set.
The difference of A and B is also denoted by A/B or by A ∼ B.

3.4 Complement
The complement of a set A is the set of the elements which do not belong to A, the difference of
the universal set U and A. We denote the complement of A by Ac or A′ . It can be written in a
concise form as
A′ = {x | x ∈ U, x ∈
/ A}
In Figure 5, A′ is shown by the shaded portion assuming that the universal set consists of the
1111111111
0000000000
0000000000
1111111111
0000000000
1111111111
U

0000000000
1111111111
0000000000
1111111111A B

0000000000
1111111111
0000000000
1111111111
Figure 5: A′ is the shaded portion.

entire rectangle. The following facts follow directly from the definition of the complement:

(i) The union of a set A and its complement A′ is the universal set U, i.e. A ∪ A′ = U. Further,
A and A′ are disjoint, i.e. A ∩ A′ = ∅.

(ii) The complement of the universal set is the empty set and vice-versa, i.e. U′ = ∅ and
∅′ = U.

(iii) The complement of the complement of a set is the set itself: (A′ )′ = A.

Also notice that the difference of two sets A and B can be expressed as follows:

A − B = A ∩ B′

The proof follows from the fact that

/ B} = {x | x ∈ A, x ∈ B ′ } = A ∩ B ′
A − B = {x | x ∈ A, x ∈

Anant Kumar Mob. No. 9932347531, 9002833857


Principle of Inclusion and Exclusion 9

3.5 Operations on comparable sets


Two sets A and B are said to be comparable if either A ⊂ B or B ⊂ A, i.e. if one of the sets is
a subset of the other. Moreover, two sets A and B are said to be not comparable if A ̸⊂ B and
B ̸⊂ A. Note that if A is not comparable to B then there is an element in A which is not in B
and, also, there is an element in B which is not in A.
The operations of union, intersection, difference and complement have simple properties when
the sets under investigation are comparable. The following theorems can be easily proved:

⊙ Theorem 1. Let A be a subset of B. Then the intersection of A and B is precisely A, that


is, A ⊂ B implies A ∩ B = A.

⊙ Theorem 2. Let A be a subset of B. Then the union of A and B is precisely B, that is,
A ⊂ B implies A ∪ B = B.

⊙ Theorem 3. Let A be a subset of B. Then B ′ is a subset of A′ , that is, A ⊂ B implies


B ′ ⊂ A′ .

⊙ Theorem 4. Let A be a subset of B. Then the union of A and (B − A) is precisely B, that


is, A ⊂ B implies A ∪ (B − A) = B.

3.6 De Morgan’s theorems


De Morgan’s theorems are a pair of transformation rules relating the set operators union and
intersection in terms of each other by means of negation.

⊙ Theorem 5 (De Morgan’s first theorem). The complement of the union of two sets is the
intersection of the complements, that is, (A ∪ B)′ = A′ ∩ B ′ .

Proof. Consider x ∈ (A ∪ B)′ ; then x does not belong to A ∪ B. Therefore x ̸∈ A and x ̸∈ B, i.e.
x ∈ A′ and x ∈ B ′ , and by the definition of intersection, x ∈ A′ ∩ B ′ . Hence x ∈ (A ∪ B)′ implies
x ∈ A′ ∩ B ′ , i.e.
(A ∪ B)′ ⊂ (A′ ∩ B ′ )
Next, let y ∈ (A′ ∩ B ′ ); then y belongs to A′ and y belongs to B ′ . Thus, y ̸∈ A and y ̸∈ B and
hence y ̸∈ (A ∪ B), i.e. y ∈ (A ∪ B)′ . Hence, y ∈ (A′ ∩ B ′ ) implies y ∈ (A ∪ B)′ , i.e.

(A′ ∩ B ′ ) ⊂ (A ∪ B)′

Hence, by the definition of the equality of sets, we have (A ∪ B)′ = A′ ∩ B ′ .

⊙ Theorem 6 (De Morgan’s second theorem). The complement of the intersection of two sets
is the union of their complements, that is, (A ∩ B)′ = A′ ∪ B ′ .

The proof is along similar lines as above.

4 Principle of Inclusion and Exclusion


The number of elements in a set A is denoted by |A|. Let us count the number of elements
present in A ∪ B. Obviously, if there are no common elements in A and B, i.e., if A ∩ B = ∅,
then the number of elements in A ∪ B is simply the sum of the number of elements in A and B.
That is
A ∩ B = ∅ ⇒ |A ∪ B| = |A| + |B| (Sum Rule) (1)
But what if A ∩ B ≠ ∅, i.e. the sets A and B do have one or more elements in common. In
this case, when we add |A| and |B|, we have actually added the number of common elements

Anant Kumar Mob. No. 9932347531, 9002833857


Principle of Inclusion and Exclusion 10

twice (once with |A| and again with |B|). So we remove the number of common elements once
to rectify our mistake so that

|A ∪ B| = |A| + |B| − |A ∩ B| (2)

This statement is called the principle of inclusion and exclusion (PIE in short) for two sets.
Example 36. How many integers from 1 to 100 are multiples of 2 or 3?
Solution: Let A denote the set of all integers from 1 to 100 that are even, and let B denote the set of all
integers from 1 to 100 that are odd. Then we need |A ∪ B|. First of all |A| = 50 since we have 2 × 1, 2 × 2,
2 × 3, . . . , 2 × 50 = 100. Similarly, since 3 × 1, 3 × 2, . . . 3 × 33 = 99, we have |B| = 33. Also, A ∩ B is the
set of integers from 1 to 100 that are multiple of 2 and 3 both, i.e. they are multiple of 6. Since 6, 6 × 2,
. . . , 6 × 16 = 96, we get |A ∩ B| = 16. Hence, by Equation 2, we have

|A ∪ B| = |A| + |B| − |A ∩ B| = 50 + 33 − 16 = 67

By similar arguments, we can extend PIE to three sets A, B, C as follows:

|A ∪ B ∪ C| = |A| + |B| + |C| − |A ∩ B| − |B ∩ C| − |A ∩ C| + |A ∩ B ∩ C| (3)

In Figure 6, it is shown how the formula takes into account each region exactly once by depicting

Figure 6: Each term of the inclusion-exclusion formula gradually corrects the count until finally each portion of
the Venn diagram is counted exactly once.

the number of times each region is counted by the various terms of Equation 3.
Generalizing the results of these examples gives the principle of inclusion-exclusion for a
finite numbers of sets: to find the number of elements of the union of n sets, i) include the
number of elements of the sets, ii) exclude the number of elements of the pairwise intersections,
iii) include the number of elements of the triple-wise intersections, iv) exclude the number of
elements of the quadruple-wise intersections, v) include the number of elements of the quintuple-
wise intersections, vi) and continue, until the number of elements of the n-tuple-wise intersection
is included (if n is odd) or excluded (n even). That is for a finite number n of sets A1 , A2 , . . . ,
An :

∪n ∑ n ∑ ∑

Ai = |Ai | − |Ai ∩ Aj | + |Ai ∩ Aj ∩ Ak | − · · · + (−1)n−1 |A1 ∩ . . . ∩ An |

i=1 i=1 1≤i<j≤n 1≤i<j<k≤n
(4)

Anant Kumar Mob. No. 9932347531, 9002833857

You might also like