Beamer Sets and Functions 10-2024

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

LECTURE 2

SETS AND FUNCTIONS

October 10, 2024 1/1


Young man, in Mathematics you dont understand things.
You just get used to them.
John von Neumann

October 10, 2024 2/1


SETS AND ELEMENTS

October 10, 2024 3/1


SETS AND ELEMENTS

In mathematics, we often encounter ”sets”, for example, real numbers


form a set. Defining a set formally is a delicate matter, so we will use
”naive” set theory, based on the intuitive properties of sets.
Definition
A set is a collection of objects called elements.

October 10, 2024 4/1


SETS AND ELEMENTS

We use uppercase letters to label sets, and elements will usually be


represented by lowercase letters. When a is an element of a set A, we write

a ∈ A.

Otherwise, we write
a∈
/ A.
If A contains no elements, it is the empty set, denoted by ∅.
Two sets are equal if they have exactly the same elements. In other words,

A = B ⇔ (x ∈ A ⇔ x ∈ B ).

All the elements that we will consider are assumed to belong to a universe
set U.
We use the bracket notation {} to refer to a set.

October 10, 2024 5/1


SETS AND ELEMENTS

Example
The sets {1, 2, 3} and {3, 2, 1} are the same, because the ordering does
not matter. The set {1, 1, 2, 3, 3} is also the same set as {1, 2, 3}, because
we are not interested in repetitions.

One may specify a set explicitly, that is by listing all the elements the set
contains, or implicitly, using a predicate :

{x : P (x )}.

This notation is also known as set-builder notation.


Example
A = {1, 2}, N = {0, 1, 2, · · · } are explicit descriptions.
The set {x : x is a prime number } is implicit.

October 10, 2024 6/1


Cardinality

Definition
The Cardinality |A| of a set A is the number of distinct elements of A. If
|A| is finite, then A is said to be finite. Otherwise, A is said to be infinite.

Example
1 | ∅ | = 0 while |{ ∅ }| = 1.

2 |{1, 2, 5}| = 3.

October 10, 2024 7/1


SET OPERATIONS

October 10, 2024 8/1


SET OPERATIONS

We now use operators (connectives) to define the set operations. These


allow us to build new set from given ones.
Definition
The union of A and B is

A ∪ B = {x : x ∈ A ∨ x ∈ B }.

Definition
The intersection of A and B is

A ∩ B = {x : x ∈ A ∧ x ∈ B }.

October 10, 2024 9/1


SET OPERATIONS

Example
If A = {1, 2, 3, 4} and B = {3, 4, 5, 6}, then

A ∪ B = {1, 2, 3, 4, 5, 6}

and
A ∩ B = {3, 4}.

These operations of union and intersection can be illustrated with Venn


diagrams.

October 10, 2024 10 / 1


SET OPERATIONS

Definition
The sets A and B are disjoint when A ∩ B = ∅.

Definition
The absolute complement or, simply, the complement of a set A is
defined as
A = U − A = {x : x ∈ U ∧ x ∈/ A}.

October 10, 2024 11 / 1


SET OPERATIONS

Definition
The relative complement of a set B with respect to a set A or, simply,
the set difference of B from A is

A − B = {x : x ∈ A ∧ x ∈
/ B }.

Read A − B as ”A minus B”.

October 10, 2024 12 / 1


SET OPERATIONS

Example
Let U = {1, 2, · · · , 10}, A = {1, 2, 3, 4, 5} and B = {3, 4, 5, 6, 7, 8}.
Then
A − B = {1, 2}
and
A = {6, 7, 8, 9, 10}.
Use Venn diagram to illustrate.

Example
R − Q : irrational numbers.

October 10, 2024 13 / 1


Some properties

As with the logical operations, we need an order to make sense of


expressions that involve many operations.
Example
If we take U = {1, 2, , 3, 4, 5}, A = {5}, B = {3, 4, 5} and C = {2, 3},
then
A ∪ (B ∩ C ) = {5} ∪ {3} = {3, 5},
while
(A ∪ B ) ∩ C = {3, 4, 5} ∩ {2, 3} = {3}.
This shows that, in general,

A ∪ (B ∩ C ) 6 = (A ∪ B ) ∩ C .

Therefore, we cannot write expressions as A ∪ B ∩ C .

October 10, 2024 14 / 1


Some properties

However, since, as we will see,

A ∪ (B ∪ C ) = (A ∪ B ) ∪ C ,

and
A ∩ (B ∩ C ) = (A ∩ B ) ∩ C ,
then we can write A ∪ B ∪ C and A ∩ B ∩ C .

October 10, 2024 15 / 1


Some properties

From the properties of the logical operators we derive the following.


Theorem
Let U be the universe set, and let A, B, C be sets. Then we have :
1 A∩B = B ∩A
2 A∪B = B ∪A
3 (A) = A
4 A∩B = A∪B
5 A∪B = A∩B
6 (A ∩ B ) ∩ C ) = A ∩ (B ∩ C )
7 (A ∪ B ) ∪ C ) = A ∪ (B ∪ C )
8 A ∩ (B ∪ C ) = (A ∩ B ) ∪ (A ∩ C )
9 A ∪ (B ∩ C ) = (A ∪ B ) ∩ (A ∪ C )

October 10, 2024 16 / 1


Properties of Cardinality

If A and B are disjoint finite sets, then A ∪ B is finite and

|A ∪ B | = |A| + |B |.

If A and B are finite sets, then A ∪ B and A ∩ B are finite and

|A ∪ B | = |A| + |B | − |A ∩ B |.

Corollary
If A, B and C are finite sets, then so is A ∪ B ∪ C , and

|A ∪ B ∪ C | = |A| + |B | + |C | − |A ∩ B | − |A ∩ C | − |B ∩ C | + |A ∩ B ∩ C |

October 10, 2024 17 / 1


Generalized Set Operations

Consider a finite number of sets, say, A1 , A2 , . . . , Am . The union and


intersection of these sets are denoted and defined, respectively, by

A1 ∪ A2 ∪ · · · ∪ Am = ∪m
i =1 Ai = {x : x ∈ Ai for some Ai }

A1 ∩ A2 ∩ · · · ∩ Am = ∩m
i =1 Ai = {x : x ∈ Ai for every Ai }

Now let A be any collection of sets. The union and the intersection of
these sets are denoted and defined, respectively, by

∪(A : A ∈ A) = {x : x ∈ A for some A ∈ A}

∩(A : A ∈ A) = {x : x ∈ A for every A ∈ A}.

October 10, 2024 18 / 1


SUBSETS

October 10, 2024 19 / 1


SUBSETS

Let A and B be sets. We say that A is a subset of B, and we write


A ⊆ B, when every element of A is an element of B.
Definition
A ⊆ B ⇔ ∀x, (x ∈ A ⇒ x ∈ B ).

If A is not a subset of B, we write A * B

October 10, 2024 20 / 1


SUBSETS

We have then
A * B ⇔ ∃x, x ∈ A ∧ x ∈
/ B.

Example
Let A = {1, 2, 3} and B = {1, 2, 5}. Then A * B because ∃ 3 ∈ A and
3∈/ B.
When A ⊆ B but A 6= B, we say that A is a proper subset of B, and we
write A ⊂ B ).

Example
N ⊂ Z ⊂ Q ⊂ R ⊂ C.

October 10, 2024 21 / 1


SUBSETS

Theorem
Let A, B, C be sets. Then
1 A ⊆ B ⇔ B ⊆ A.
2 ∅ ⊆ A.
3 A = B ⇔ A ⊆ B ∧ B ⊆ A.
4 If A ⊆ B and B ⊆ C , then A ⊆ C .

October 10, 2024 22 / 1


FAMILIES OF SETS

The elements of a set can be sets themselves. We call such a collection a


family of sets and often use capital script letters to name. For example,
let
E = {{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}.
The set E has three elements :{1, 2, 3}, {2, 3, 4}, {3, 4, 5}.
Families of sets can have infinitely many elements. For example, let

F = {[n, n + 1[: n ∈ Z}.

The set Z plays the role of an index set, a set whose only purpose is to
enumerate the elements of the family. Each element of an index set is
called an index. If we let I = Z and Ai = [i, i + 1[, the family can be
written as
F = {Ai : i ∈ I }.

October 10, 2024 23 / 1


FAMILIES OF SETS

There is a natural way to construct a family of sets. Take a set A. The


collection of all subsets of A is called the power set of A and denoted by
P (A).
Definition
For any set A,
P (A) = {B : B ⊆ A}.

Example

P ({1, 2, 3}) = {∅, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}

October 10, 2024 24 / 1


CARTESIAN PRODUCTS

October 10, 2024 25 / 1


CARTESIAN PRODUCTS
Let A and B be sets. Given elements a ∈ A and b ∈ B, we call (a, b ) an
ordered pair. In this context, a and b are called coordinates.

Definition (Kuratowski, 1921)


If a ∈ A and b ∈ B,
(a, b ) = {{a}, {a, b }}
We have then

(a, b ) = (a0 , b 0 ) ⇔ a = a0 and b = b 0

Definition
The Cartesian product of A and B is

A × B = {(a, b ) : a ∈ A ∧ b ∈ B }.

The Cartesian product R2 = R × R is called the Cartesian plane.


October 10, 2024 26 / 1
CARTESIAN PRODUCTS

Example
If A = {1, 2} and B = {0, 1, 2},

A × B = {1, 2} × {0, 1, 2} = {(1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)}.

If A = {1, 2, 7} and B = {∅, {1, 5}},

A × B = {(1, ∅), (1, {1, 5}), (2, ∅), (2, {1, 5}), (7, ∅), (7, {1, 5})}.

October 10, 2024 27 / 1


CARTESIAN PRODUCTS
We generalize definition of an ordered pair by defining

(a, b, c ) = {{a}, {a, b }, {a, b, c }},

(a, b, c, d ) = {{a}, {a, b }, {a, b, c }, {a, b, c, d }},


and for n ∈ N,

(a1 , a2 , · · · , an ) = {{a1 }, {a1 , a2 }, · · · , {a1 , a2 , · · · , an }},

which is called an ordered n −tuple. Then

A × B × C = {(a, b, c ) : a ∈ A ∧ b ∈ B ∧ c ∈ C },

A × B × C × D = {(a, b, c, d ) : a ∈ A ∧ b ∈ B ∧ c ∈ C ∧ d ∈ D },
and
An = {(a1 , a2 , · · · , an ) : ai ∈ A ∧ i = 1, 2, · · · , n }.
Rn = R × R × · · · × R (n times) is the Cartesian n −space.
October 10, 2024 28 / 1
FUNCTIONS

October 10, 2024 29 / 1


Functions

Let E , F be sets. A function f : E → F assigns to each x ∈ E a unique


element f (x ) ∈ F . Functions are also called maps, mappings, or
transformations.
Definition
Let f : E → F be a function. Then E is called the domain of f and F is
called the codomain of f .
We write f : x → f (x ) to indicate that is the function that maps x to
f (x ).

October 10, 2024 30 / 1


Functions

Example
Let E = {1, 2, 3} and F = {a, b }. Then we can define a function
f : E → F by setting f (1) = f (2) = a and f (3) = b.
This can be represented by the following pictures.

Definition
Let f : E → F be a function and A ⊂ E . The restriction of f to A is the
function denoted f/A : A → F defined by f/A = f (x ), ∀x ∈ A.

October 10, 2024 31 / 1


Remarkable examples

1 The identity function on a set E is the function IdE : E → E


defined by IdE (x ), ∀x ∈ E .
2 If E ⊆ F , the inclusion map is the function i : E → F defined by
i (x ) = x, ∀x ∈ E .
3 Let E = E1 × E2 × · · · × En . Define, for each i, πi : E → Ei as
follows :
πi (x1 , x2 , · · · , xn ) = xi .
The function πi is the i th projection.
4 A constant function is a map f : E → F such that
f (x ) = c, ∀x ∈ E , where c ∈ F is fixed.

October 10, 2024 32 / 1


Remarkable examples

5 Suppose A ⊆ E . The characteristic function of A

χA : E → {0, 1}
1 if x ∈ A .
x 7 → χA (x ) =
0 if x ∈
/A

6 A boolean function is a function

f : {0, 1}n → {0, 1},

where n is a positive integer.


For n = 2, we can define the following functions :
i f (0, 0) = 0, f (1, 0) = 1, f (0, 1) = 1, f (1, 1) = 1.
ii g (0, 0) = 0, g (1, 0) = 0, g (0, 1) = 0, g (1, 1) = 1.
iii h (0, 0) = 0, g (1, 0) = 1, h (0, 1) = 1, h (1, 1) = 0.
Did you recognize these functions ?
October 10, 2024 33 / 1
Image and inverse image of a set

Definition
For a function f : E → F , A ⊆ E ,and B ⊆ F , the image of A is

f (A) = {y ∈ F : ∃x ∈ A, y = f (x )}.

The inverse image of B is

f −1 (B ) = { x ∈ E : f (x ) ∈ B }

Example
Let f : R ⇒ R, f (x ) = x 2 . Then
1 f ([−1, 1]) = [0, 1].
2 f −1 ({1}) = {−1, 1}.
3 f −1 ({−1}) = ∅.

October 10, 2024 34 / 1


Some properties

Let f : E → F be a function.
1 ∀A, B ∈ P (E ), A ⊂ B ⇒ f (A) ⊂ f (B ).
2 ∀A, B ∈ P (E ), f (A ∩ B ) ⊂ f (A) ∩ f (B ).
3 ∀A, B ∈ P (E ), f (A ∪ B ) = f (A) ∪ f (B ).
4 ∀A, B ∈ P (F ), f −1 (A ∪ B ) = f −1 (A ) ∪ f −1 (B ).
5 ∀A, B ∈ P (F ), f −1 (A ∩ B ) = f −1 (A ) ∩ f −1 (B ).

October 10, 2024 35 / 1


Equality of two functions

Definition
Two functions f : E → F and g : G → H are said to be equal if
1 E = G and F = H.
2 ∀x ∈ E , f (x ) = g (x ).

October 10, 2024 36 / 1


Injective function

Definition
A function f : E → F is injective if we have

∀x1 , x2 ∈ E , (f (x1 ) = f (x2 ) ⇒ x1 = x2 ).

An injection is also known as a one to one function.

Example
The function f : Z → Z defined by f (x ) = x 2 , ∀x ∈ Z, is not injective
since f (1) = f (−1).
The function g : N → N defined by g (x ) = x 2 , ∀x ∈ N, is injective.

October 10, 2024 37 / 1


Surjective function
Definition
A function f : E → F is surjective if we have

∀y ∈ F , ∃x ∈ E , y = f (x ).

y is called the image of x and x is called a pre-image of y .

A surjection is also known as an onto function. From the definition, f is


surjective if, and only, if f (E ) = F .
Example
f : Q → Q
The function is surjective Indeed;
x 7→ f (x ) = 2x
y y
∀y ∈ Q, ∃x = ∈ Q : f (x ) = 2 · = y .
2 2
f : Z → Z
The function is not surjective:
x 7→ f (x ) = 2x
October 10, 2024 38 / 1
Bijective function

Definition
A function that is both injective and surjective is said to be bijective.

Example
f : [0, +∞[ → [0, +∞[
is bijective
x 7 → f (x ) = x 2

October 10, 2024 39 / 1


Inverse function

Theorem
Let f : E → F be a function. Then f is bijective if and only if

∀y ∈ F , ∃!x ∈ E : f (x ) = y .

From this theorem, we obtain a unique function f −1 : F → E defined by :

f (x ) = y ⇔ x = f −1 (y ).

Definition
f −1 is called the inverse of f .

October 10, 2024 40 / 1


Inverse function

Example
f : [0, +∞[−→ [0, +∞[ defined by √ f (x ) = x 2 is bijective.
Its inverse is given by f −1 (x ) = x.

October 10, 2024 41 / 1


Composition

Definition
Let f : E −→ F and g : F −→ G be functions. The composed function
g ◦ f : E −→ G is defined by :

∀x ∈ E , g ◦ f (x ) = g (f (x )).

Example
Let f , g : R −→ R where f (x ) = x 2 and g (x ) = x + 1. Then

(g ◦ f )(x ) = g (x 2 ) = x 2 + 1,

while
(f ◦ g )(x ) = f (x + 1) = (x + 1)2 = x 2 + 2x + 1.
Therefore, in general,
g ◦ f 6= f ◦ g .
October 10, 2024 42 / 1
Composition

Theorem
Let f : E −→ F , g : F −→ G be functions. Then
1 If g ◦ f is injective, then f is injective.
2 If g ◦ f is surjective, then g is surjective.

October 10, 2024 43 / 1


Composition

Theorem
Let f : E −→ F , g : F −→ G and h : G −→ H be functions. Then we
have
h ◦ (g ◦ f ) = (h ◦ g ) ◦ f .

Theorem
Let f : E −→ F be a bijective function, then f −1 ◦ f = IdE and
f ◦ f −1 = IdF .

October 10, 2024 44 / 1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy