Introduction To Sets and Functions
Introduction To Sets and Functions
Introduction To Sets and Functions
1. Introduction to Sets
1.1. Basic Terminology. We begin with a refresher in the basics of set theory.
Our treatment will be an informal one rather than taking an axiomatic approach at
this time. Later in the semester we will revisit sets with a more formal approach.
Notation:
• S = {a, b, c, d} = {b, c, a, d, d}
Specify by attributes:
• S = {x|x ≥ 5 or x < 0}, where the universe is the set of real numbers.
Discussion
9
1. INTRODUCTION TO SETS 10
Sets can be written in a variety of ways. One can, of course, simply list the
elements if there are only a few. Another way is to use set builder notation, which
specifies the sets using a predicate to indicate the attributes of the elements of the
set. For example, the set of even integers is
{x|x = 2n, n ∈ Z}
or
{. . . , −2, 0, 2, 4, 6, . . . }.
The first set could be read as “the set of all x’s such that x is twice an integer.”
The symbol | stands for “such that.” A colon is often used for “such that” as well, so
the set of even integers could also be written
{x : x = 2n, n ∈ Z}.
1.3. Common Universal Sets. The following notation will be used throughout
these notes.
Discussion
The real numbers, natural numbers, rational numbers, and integers have special
notation which is understood to stand for these sets of numbers. Corresponding bold
face letters are also a common notation for these sets of numbers. Some authors do
not include 0 in the set of natural numbers. We will include zero.
Exercise 1.3.1. Which of the following sets are equal to the set of all integers
that are multiples of 5. There may be more than one or none.
(1) {5n|n ∈ R}
(2) {5n|n ∈ Z}
(3) {n ∈ Z|n = 5k and k ∈ Z}
(4) {n ∈ Z|n = 5k and n ∈ Z}
(5) {−5, 0, 5, 10}
1. INTRODUCTION TO SETS 11
Note:
Discussion
Please study the notation for elements, subsets, proper subsets, and the empty
set. Two other common notations for the complement of a set, A, is Ac and A0 .
Notice that we make a notational distinction between subsets in general and proper
subsets. Not all texts and/or instructors make this distinction, and you should check
in other courses whether or not the notation ⊂ really does mean proper as it does
here.
1.5. Element v.s. Subsets. Sets can be subsets and elements of other sets.
Example 1.5.1. Let A = {∅, {∅}}. Then A has two elements
∅ and {∅}
and the four subsets
∅, {∅}, {{∅}}, {∅, {∅}}.
Example 1.5.2. Pay close attention to whether the symbols means “element” or
“subset” in this example
• 2∈S • 3∈S • 4 6∈ S
• {2} ∈ S • {3} 6∈ S • {4} ∈ S
• {2} ⊂ S • {3} ⊂ S • {4} 6⊂ S
• {{2}} ⊂ S • {{3}} 6⊂ S • {{4}} ⊂ S
1. INTRODUCTION TO SETS 12
1.6. Cardinality.
Definition 1.6.1. The number of (distinct) elements in a set A is called the
cardinality of A and is written |A|.
If the cardinality is a natural number, then the set is called finite, otherwise it is
called infinite.
Example 1.6.1. Suppose A = {a, b}. Then
|A| = 2,
Example 1.6.2. The cardinality of ∅ is 0, but the cardinality of {∅, {∅}} is 2.
Example 1.6.3. The set of natural numbers is infinite since its cardinality is not
a natural number. The cardinality of the natural numbers is a transfinite cardinal
number.
Discussion
Notice that the real numbers, natural numbers, integers, rational numbers, and
irrational numbers are all infinite. Not all infinite sets are considered to be the same
“size.” The set of real numbers is considered to be a much larger set than the set of
integers. In fact, this set is so large that we cannot possibly list all its elements in
any organized manner the way the integers can be listed. We call a set like the real
numbers that has too many elements to list uncountable and a set like the integers
that can be listed is called countable. We will not delve any deeper than this into the
study of the relative sizes of infinite sets in this course, but you may find it interesting
to read further on this topic.
Exercise 1.6.1. Let A = {1, 2, {1}, {1, 2}}, B = {1, {2}}, C = {1, 2, 2, 2}, D =
{5n|n ∈ R} and E = {5n|n ∈ Z}.
Discussion
The operations of union and intersection are the basic operations used to combine
two sets to form a third. Notice that we always have A ⊆ A ∪ B and A ∩ B ⊆ A for
arbitrary sets A and B.
1.9. Product.
Definition 1.9.1. The (Cartesian) Product of two sets, A and B, is denoted
A × B and is defined by
A × B = {(a, b)|a ∈ A and b ∈ B}
1. INTRODUCTION TO SETS 14
Discussion
A cartesian product you have used in previous classes is R × R. This is the same
as the real plane and is shortened to R2 . Elements of R2 are the points in the plane.
Notice the notation for an element in R × R is the same as the notation for an
open interval of real numbers. In other words, (3, 5) could mean the ordered pair in
R × R or it could mean the interval {x ∈ R|3 < x < 5}. If the context does not make
it clear which (3, 5) stands for you should make it clear.
Example 1.9.1. Let A = {a, b, c, d, e} and let B = {1, 2}. Then
(1) A × B = {(a, 1), (b, 1), (c, 1), (d, 1), (e, 1), (a, 2), (b, 2), (c, 2), (d, 2), (e, 2)}.
(2) |A × B| = 10
(3) {a, 2} 6∈ A × B
(4) (a, 2) 6∈ A ∪ B
Exercise 1.9.1. Let A = {a, b, c, d, e} and let B = {1, 2}. Find
(1) B × A.
(2) |B × A|
(3) Is (a, 2) ∈ B × A?
(4) Is (2, a) ∈ B × A?
(5) Is 2a ∈ B × A?