This lecture introduces the basics of set theory.
A set is a collection of objects. Sets are usually denoted by a letter and the objects (or elements) belonging to a set are usually listed within curly brackets.
Example_
Denote by the letter
the set of the natural numbers less than or equal to
.
Then, we can
write:
Example_
Denote by the letter
the set of the first five letters of the alphabet. Then, we can
write:
Note that a set is an unordered collection of objects, i.e. the order in which the elements of a set are listed does not matter.
Example_
The two
sets
and
are
considered identical.
Sometimes a set is defined in terms of one or more properties satisfied by its
elements. For example, the
set
could
be equivalently defined
as:
which
reads as follows:
"
is the set of all natural numbers
such that
is less than or equal to
",
where the colon symbol
(
)
means "such that" and precedes a list of conditions that the elements of the
set need to satisfy.
Example_
The
set
is
the set of all natural numbers
such that
divided by
is also a natural number,
i.e.:
When an element
belongs to a set
,
we
write:
which
reads
"
belongs to
"
or
"
is a member of
".
On the contrary, when an element
does not belong to a set
,
we
write:
which
reads
"
does not belong to
"
or
"
is not a member of
".
Example_
Let the set
be defined as
follows:
Then,
for
example:
and:
If
and
are two sets and if every element of
also belongs to
,
then we
write:
which
reads
"
is included in
"
or
and
we read
"
includes
".
We also say that
is a subset of
.
Example_
The set
is
included in the
set
because
all the elements of
also belong to
.
Thus, we can
write:
When
but
is not the same as
(i.e. there are elements of
that do not belong to
),
then we
write:
which
reads
"
is strictly included in
"
or
We
also say that
is a proper subset of
.
Example_
Given the sets
we
have
that:
but
we cannot
write:
Let
and
be two sets. Their union is the set of all elements that belong to at least
one of them and it is denoted
by:
Example_
Define two sets
and
as
follows:
Their
union
is:
If
,
,
...,
are
sets, their union is the set of all elements that belong to at least one of
them and it is denoted
by:
Example_
Define three sets
,
and
as
follows:
Their
union
is:
Let
and
be two sets. Their intersection is the set of all elements that belong to both
of them and it is denoted
by:
Example_
Define two sets
and
as
follows:
Their
intersection
is:
If
,
,
...,
are
sets, their intersection is the set of all elements that belong to all of them
and it is denoted
by:
Example_
Define three sets
,
and
as
follows:
Their
intersection
is:
Suppose that our attention is confined to sets that are all included in a
larger set
,
called universal set. Let
be one of these sets. The complement of
is the set of all elements of
that do not belong to
and it is indicated
by
Example_
Define the universal set
as
follows:
and
the two
sets:
The
complements of
and
are:
Also note that for any set
:
De Morgan' Laws
are:
and
can be extended to collections of more than two
sets:
Below you can find some exercises with explained solutions:
Exercise set 1 (simple exercises on unions, intersections and complements)