You are on page 1of 171

Discrete Mathematics 1

Chapter 2: Basic Structures: Sets, Functions, Sequences and Sums

Department of Mathematics
The FPT university

TrungDT (FUHN) MAD111 Chapter 2 1/1


2.1 Sets

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.
An object of a set is called an element, or a member, of that set.

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.
An object of a set is called an element, or a member, of that set.
The cardinality of the set A is the number of distinct elements of A,
denoted by |A|.

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.
An object of a set is called an element, or a member, of that set.
The cardinality of the set A is the number of distinct elements of A,
denoted by |A|.
The empty set, denoted by Ø, is the set whose cardinality is 0.

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.
An object of a set is called an element, or a member, of that set.
The cardinality of the set A is the number of distinct elements of A,
denoted by |A|.
The empty set, denoted by Ø, is the set whose cardinality is 0.

Example.

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.
An object of a set is called an element, or a member, of that set.
The cardinality of the set A is the number of distinct elements of A,
denoted by |A|.
The empty set, denoted by Ø, is the set whose cardinality is 0.

Example.

The set {a, cat, catches, a, mouse} has

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.
An object of a set is called an element, or a member, of that set.
The cardinality of the set A is the number of distinct elements of A,
denoted by |A|.
The empty set, denoted by Ø, is the set whose cardinality is 0.

Example.

The set {a, cat, catches, a, mouse} has 4 elements.

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.
An object of a set is called an element, or a member, of that set.
The cardinality of the set A is the number of distinct elements of A,
denoted by |A|.
The empty set, denoted by Ø, is the set whose cardinality is 0.

Example.

The set {a, cat, catches, a, mouse} has 4 elements.


The set {a, b, {a, b}, c, {a, b, c, },Ø} has

TrungDT (FUHN) MAD111 Chapter 2 2/1


2.1 Sets

Definition
A set is an unordered collection of objects.
An object of a set is called an element, or a member, of that set.
The cardinality of the set A is the number of distinct elements of A,
denoted by |A|.
The empty set, denoted by Ø, is the set whose cardinality is 0.

Example.

The set {a, cat, catches, a, mouse} has 4 elements.


The set {a, b, {a, b}, c, {a, b, c, },Ø} has 6 elements

TrungDT (FUHN) MAD111 Chapter 2 2/1


TrungDT (FUHN) MAD111 Chapter 2 3/1
If x is an element of A we write x ∈ A.

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x}

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T)
x ⊆ {x}

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T)
x ⊆ {x} (F)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T)
x ⊆ {x} (F)
{a, b} ⊆ {a, b, {a, b}, c}

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T)
x ⊆ {x} (F)
{a, b} ⊆ {a, b, {a, b}, c} (T)
{a, b} ∈ {a, b, {a, b}, c}

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T)
x ⊆ {x} (F)
{a, b} ⊆ {a, b, {a, b}, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø}
x ⊆ {x} (F)
{a, b} ⊆ {a, b, {a, b}, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø} (T)
x ⊆ {x} (F)
{a, b} ⊆ {a, b, {a, b}, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø} (T)
x ⊆ {x} (F) Ø ∈ {Ø}
{a, b} ⊆ {a, b, {a, b}, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø} (T)
x ⊆ {x} (F) Ø ∈ {Ø} (T)
{a, b} ⊆ {a, b, {a, b}, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø} (T)
x ⊆ {x} (F) Ø ∈ {Ø} (T)
{a, b} ⊆ {a, b, {a, b}, c} (T) {a, b, c} ⊆ {a, b, c}
{a, b} ∈ {a, b, {a, b}, c} (T)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø} (T)
x ⊆ {x} (F) Ø ∈ {Ø} (T)
{a, b} ⊆ {a, b, {a, b}, c} (T) {a, b, c} ⊆ {a, b, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø} (T)
x ⊆ {x} (F) Ø ∈ {Ø} (T)
{a, b} ⊆ {a, b, {a, b}, c} (T) {a, b, c} ⊆ {a, b, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T) {a, b, c} ∈ {a, b, c}

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø} (T)
x ⊆ {x} (F) Ø ∈ {Ø} (T)
{a, b} ⊆ {a, b, {a, b}, c} (T) {a, b, c} ⊆ {a, b, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T) {a, b, c} ∈ {a, b, c} (F)

TrungDT (FUHN) MAD111 Chapter 2 3/1


If x is an element of A we write x ∈ A. If x is not an element of A we
write x 6∈ A.
If all elements of A are also elements of B we write A ⊆ B, and A is
called a subset of B.
If A is a proper subset of B, meaning A ⊆ B and A 6= B, we write
A ⊂ B.
The empty set Ø is a subset of any set.

Example. Which statements are true?


x ∈ {x} (T) Ø ⊆ {Ø} (T)
x ⊆ {x} (F) Ø ∈ {Ø} (T)
{a, b} ⊆ {a, b, {a, b}, c} (T) {a, b, c} ⊆ {a, b, c} (T)
{a, b} ∈ {a, b, {a, b}, c} (T) {a, b, c} ∈ {a, b, c} (F)

TrungDT (FUHN) MAD111 Chapter 2 3/1


TrungDT (FUHN) MAD111 Chapter 2 4/1
Definitions

TrungDT (FUHN) MAD111 Chapter 2 4/1


Definitions
The Cartesian product of two sets A and B, denoted by A × B, is the
set of all ordered pairs (a, b) where a ∈ A and b ∈ B.

TrungDT (FUHN) MAD111 Chapter 2 4/1


Definitions
The Cartesian product of two sets A and B, denoted by A × B, is the
set of all ordered pairs (a, b) where a ∈ A and b ∈ B.
The power set of the set A, denoted by P(A), is the set of all subsets
of A.

TrungDT (FUHN) MAD111 Chapter 2 4/1


Definitions
The Cartesian product of two sets A and B, denoted by A × B, is the
set of all ordered pairs (a, b) where a ∈ A and b ∈ B.
The power set of the set A, denoted by P(A), is the set of all subsets
of A.

Note.

TrungDT (FUHN) MAD111 Chapter 2 4/1


Definitions
The Cartesian product of two sets A and B, denoted by A × B, is the
set of all ordered pairs (a, b) where a ∈ A and b ∈ B.
The power set of the set A, denoted by P(A), is the set of all subsets
of A.

Note.

If |A| = m and |B| = n then |A × B| = mn.

TrungDT (FUHN) MAD111 Chapter 2 4/1


Definitions
The Cartesian product of two sets A and B, denoted by A × B, is the
set of all ordered pairs (a, b) where a ∈ A and b ∈ B.
The power set of the set A, denoted by P(A), is the set of all subsets
of A.

Note.

If |A| = m and |B| = n then |A × B| = mn.

If |A| = n then |P(A)| = 2n .

TrungDT (FUHN) MAD111 Chapter 2 4/1


2.2 Set Operations

TrungDT (FUHN) MAD111 Chapter 2 5/1


2.2 Set Operations

Let A and B be two sets.

TrungDT (FUHN) MAD111 Chapter 2 5/1


2.2 Set Operations

Let A and B be two sets.

Union of A and B: A ∪ B = {x| (x ∈ A) ∨ (x ∈ B)}

TrungDT (FUHN) MAD111 Chapter 2 5/1


2.2 Set Operations

Let A and B be two sets.

Union of A and B: A ∪ B = {x| (x ∈ A) ∨ (x ∈ B)}


Intersection of A and B: A ∩ B = {x| (x ∈ A) ∧ (x ∈ B)}

TrungDT (FUHN) MAD111 Chapter 2 5/1


2.2 Set Operations

Let A and B be two sets.

Union of A and B: A ∪ B = {x| (x ∈ A) ∨ (x ∈ B)}


Intersection of A and B: A ∩ B = {x| (x ∈ A) ∧ (x ∈ B)}
Difference of A and B: A − B = {x| (x ∈ A) ∧ (x 6∈ B)}

TrungDT (FUHN) MAD111 Chapter 2 5/1


2.2 Set Operations

Let A and B be two sets.

Union of A and B: A ∪ B = {x| (x ∈ A) ∨ (x ∈ B)}


Intersection of A and B: A ∩ B = {x| (x ∈ A) ∧ (x ∈ B)}
Difference of A and B: A − B = {x| (x ∈ A) ∧ (x 6∈ B)}
Symmetric difference of A and B: A ⊕ B = {x| (x ∈ A) ⊕ (x ∈ B)}

TrungDT (FUHN) MAD111 Chapter 2 5/1


2.2 Set Operations

Let A and B be two sets.

Union of A and B: A ∪ B = {x| (x ∈ A) ∨ (x ∈ B)}


Intersection of A and B: A ∩ B = {x| (x ∈ A) ∧ (x ∈ B)}
Difference of A and B: A − B = {x| (x ∈ A) ∧ (x 6∈ B)}
Symmetric difference of A and B: A ⊕ B = {x| (x ∈ A) ⊕ (x ∈ B)}
Complement of A with respect to the universal set U: A = U − A

TrungDT (FUHN) MAD111 Chapter 2 5/1


Set Identities

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A
Identity laws A ∪ Ø = A, A ∩ U = A

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A
Identity laws A ∪ Ø = A, A ∩ U = A
Domination laws A ∪ U = U, A ∩ Ø = Ø

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A
Identity laws A ∪ Ø = A, A ∩ U = A
Domination laws A ∪ U = U, A ∩ Ø = Ø
Complement laws A ∪ A = U, A ∩ A = Ø

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A
Identity laws A ∪ Ø = A, A∩U =A
Domination laws A ∪ U = U, A∩Ø=Ø
Complement laws A ∪ A = U, A∩A=Ø
Idempotent laws A ∪ A = A, A∩A=A

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A
Identity laws A ∪ Ø = A, A ∩ U = A
Domination laws A ∪ U = U, A ∩ Ø = Ø
Complement laws A ∪ A = U, A ∩ A = Ø
Idempotent laws A ∪ A = A, A ∩ A = A
Commutative laws A ∪ B = B ∪ A, A ∩ B = B ∩ A

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A
Identity laws A ∪ Ø = A, A ∩ U = A
Domination laws A ∪ U = U, A ∩ Ø = Ø
Complement laws A ∪ A = U, A ∩ A = Ø
Idempotent laws A ∪ A = A, A ∩ A = A
Commutative laws A ∪ B = B ∪ A, A ∩ B = B ∩ A
Associative laws (A ∪ B) ∪ C = A ∪ (B ∪ C )
(A ∩ B) ∩ C = A ∩ (B ∩ C )

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A
Identity laws A ∪ Ø = A, A ∩ U = A
Domination laws A ∪ U = U, A ∩ Ø = Ø
Complement laws A ∪ A = U, A ∩ A = Ø
Idempotent laws A ∪ A = A, A ∩ A = A
Commutative laws A ∪ B = B ∪ A, A ∩ B = B ∩ A
Associative laws (A ∪ B) ∪ C = A ∪ (B ∪ C )
(A ∩ B) ∩ C = A ∩ (B ∩ C )
Distributive laws A ∪ (B ∩ C ) = (A ∪ B) ∩ (A ∪ C )
A ∩ (B ∪ C ) = (A ∩ B) ∪ (A ∩ C )

TrungDT (FUHN) MAD111 Chapter 2 6/1


Set Identities

Name Identity
Complementation law (A) = A
Identity laws A ∪ Ø = A, A ∩ U = A
Domination laws A ∪ U = U, A ∩ Ø = Ø
Complement laws A ∪ A = U, A ∩ A = Ø
Idempotent laws A ∪ A = A, A ∩ A = A
Commutative laws A ∪ B = B ∪ A, A ∩ B = B ∩ A
Associative laws (A ∪ B) ∪ C = A ∪ (B ∪ C )
(A ∩ B) ∩ C = A ∩ (B ∩ C )
Distributive laws A ∪ (B ∩ C ) = (A ∪ B) ∩ (A ∪ C )
A ∩ (B ∪ C ) = (A ∩ B) ∪ (A ∩ C )

De Morgan’s laws A∪B =A∩B


A∩B =A∪B

TrungDT (FUHN) MAD111 Chapter 2 6/1


Two methods to show the equality of two sets.

TrungDT (FUHN) MAD111 Chapter 2 7/1


Two methods to show the equality of two sets.

Show that each set is a subset of the other.

TrungDT (FUHN) MAD111 Chapter 2 7/1


Two methods to show the equality of two sets.

Show that each set is a subset of the other.


Use Membership table, similar to the method of using truth table to
establish propositional equivalences.

TrungDT (FUHN) MAD111 Chapter 2 7/1


Computer Representation of Sets

TrungDT (FUHN) MAD111 Chapter 2 8/1


Computer Representation of Sets

Let U be a universal set. Fix an ordering of elements of U as a1 , a2 , . . . , an .

TrungDT (FUHN) MAD111 Chapter 2 8/1


Computer Representation of Sets

Let U be a universal set. Fix an ordering of elements of U as a1 , a2 , . . . , an .

If A is a subset of U, represent A with a bit string of length n, where the


ith bit is 1 if ai is in A, and is 0 if ai is not in A.

TrungDT (FUHN) MAD111 Chapter 2 8/1


Computer Representation of Sets

Let U be a universal set. Fix an ordering of elements of U as a1 , a2 , . . . , an .

If A is a subset of U, represent A with a bit string of length n, where the


ith bit is 1 if ai is in A, and is 0 if ai is not in A.

Example.

TrungDT (FUHN) MAD111 Chapter 2 8/1


Computer Representation of Sets

Let U be a universal set. Fix an ordering of elements of U as a1 , a2 , . . . , an .

If A is a subset of U, represent A with a bit string of length n, where the


ith bit is 1 if ai is in A, and is 0 if ai is not in A.

Example. Let U = {1, 2, 3, 4, 5, 6, 7, 8}.

TrungDT (FUHN) MAD111 Chapter 2 8/1


Computer Representation of Sets

Let U be a universal set. Fix an ordering of elements of U as a1 , a2 , . . . , an .

If A is a subset of U, represent A with a bit string of length n, where the


ith bit is 1 if ai is in A, and is 0 if ai is not in A.

Example. Let U = {1, 2, 3, 4, 5, 6, 7, 8}. Then the subset A = {1, 3, 4, 6}


is represented as the bit string 10110100.

TrungDT (FUHN) MAD111 Chapter 2 8/1


2.3 Functions

TrungDT (FUHN) MAD111 Chapter 2 9/1


2.3 Functions

TrungDT (FUHN) MAD111 Chapter 2 9/1


2.3 Functions

TrungDT (FUHN) MAD111 Chapter 2 9/1


2.3 Functions

TrungDT (FUHN) MAD111 Chapter 2 9/1


2.3 Functions

The set A is called domain


and B is called codomain of f .

TrungDT (FUHN) MAD111 Chapter 2 9/1


2.3 Functions

The set A is called domain


and B is called codomain of f .
If f (a) = b we say b is the image of a
and a is a preimage of b.

TrungDT (FUHN) MAD111 Chapter 2 9/1


2.3 Functions

The set A is called domain


and B is called codomain of f .
If f (a) = b we say b is the image of a
and a is a preimage of b.

Let S be a subset of A. The set

f (S) = {b ∈ B|∃a ∈ A(f (a) = b)}

is called the image of S,

TrungDT (FUHN) MAD111 Chapter 2 9/1


2.3 Functions

The set A is called domain


and B is called codomain of f .
If f (a) = b we say b is the image of a
and a is a preimage of b.

Let S be a subset of A. The set

f (S) = {b ∈ B|∃a ∈ A(f (a) = b)}

is called the image of S, and the set

f −1 (S) = {a ∈ A|f (a) ∈ S}

is called the preimage of S.

TrungDT (FUHN) MAD111 Chapter 2 9/1


2.3 Functions

The set A is called domain


and B is called codomain of f .
If f (a) = b we say b is the image of a
and a is a preimage of b.

Let S be a subset of A. The set

f (S) = {b ∈ B|∃a ∈ A(f (a) = b)}

is called the image of S, and the set

f −1 (S) = {a ∈ A|f (a) ∈ S}

is called the preimage of S. The set f (A) is called the range of f .

TrungDT (FUHN) MAD111 Chapter 2 9/1


Some Important Functions

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe = the smallest integer that is not smaller than x.

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe = the smallest integer that is not smaller than x.

Note. For all real numbers x we have

x − 1 < bxc ≤ x ≤ dxe < x + 1

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe = the smallest integer that is not smaller than x.

Note. For all real numbers x we have

x − 1 < bxc ≤ x ≤ dxe < x + 1

Example. Which statements are true for all real numbers x, y and all
integers n?

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe = the smallest integer that is not smaller than x.

Note. For all real numbers x we have

x − 1 < bxc ≤ x ≤ dxe < x + 1

Example. Which statements are true for all real numbers x, y and all
integers n?
dx + y e = dxe + dy e

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe = the smallest integer that is not smaller than x.

Note. For all real numbers x we have

x − 1 < bxc ≤ x ≤ dxe < x + 1

Example. Which statements are true for all real numbers x, y and all
integers n?
dx + y e = dxe + dy e
bx + y c = bxc + by c

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe = the smallest integer that is not smaller than x.

Note. For all real numbers x we have

x − 1 < bxc ≤ x ≤ dxe < x + 1

Example. Which statements are true for all real numbers x, y and all
integers n?
dx + y e = dxe + dy e dx + ne = dxe + n
bx + y c = bxc + by c

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe = the smallest integer that is not smaller than x.

Note. For all real numbers x we have

x − 1 < bxc ≤ x ≤ dxe < x + 1

Example. Which statements are true for all real numbers x, y and all
integers n?
dx + y e = dxe + dy e dx + ne = dxe + n
bx + y c = bxc + by c bx + nc = bxc + n

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


Some Important Functions

Floor function: bxc = the greatest integer that is not greater than x.
Ceiling function: dxe = the smallest integer that is not smaller than x.

Note. For all real numbers x we have

x − 1 < bxc ≤ x ≤ dxe < x + 1

Example. Which statements are true for all real numbers x, y and all
integers n?
dx + y e = dxe + dy e dx + ne = dxe + n
bx + y c = bxc + by c bx + nc = bxc + n

TrungDT (FUHN) MAD111 Chapter 2 10 / 1


One-to-One, Onto, and Bijection

TrungDT (FUHN) MAD111 Chapter 2 11 / 1


One-to-One, Onto, and Bijection

The function f : A → B is one-to-one if f (a1 ) 6= f (a2 ) for all a1 6= a2 in A.

TrungDT (FUHN) MAD111 Chapter 2 11 / 1


One-to-One, Onto, and Bijection

The function f : A → B is one-to-one if f (a1 ) 6= f (a2 ) for all a1 6= a2 in A.

TrungDT (FUHN) MAD111 Chapter 2 11 / 1


TrungDT (FUHN) MAD111 Chapter 2 12 / 1
Example. Which functions are one-to-one?

TrungDT (FUHN) MAD111 Chapter 2 12 / 1


Example. Which functions are one-to-one?

(a) f : R → R; f (x) = x 2

TrungDT (FUHN) MAD111 Chapter 2 12 / 1


Example. Which functions are one-to-one?

(a) f : R → R; f (x) = x 2
(b) f : R+ → R; f (x) = x 2

TrungDT (FUHN) MAD111 Chapter 2 12 / 1


Example. Which functions are one-to-one?

(a) f : R → R; f (x) = x 2
(b) f : R+ → R; f (x) = x 2
n+1
(c) f : Z → Z; f (n) = b c
2

TrungDT (FUHN) MAD111 Chapter 2 12 / 1


Example. Which functions are one-to-one?

(a) f : R → R; f (x) = x 2
(b) f : R+ → R; f (x) = x 2
n+1
(c) f : Z → Z; f (n) = b c
2
(d) f : Z × Z → Z; f (m, n) = m + n

TrungDT (FUHN) MAD111 Chapter 2 12 / 1


TrungDT (FUHN) MAD111 Chapter 2 13 / 1
The function f : A → B is onto if for each b in B there is a in A such that
f (a) = b.

TrungDT (FUHN) MAD111 Chapter 2 13 / 1


The function f : A → B is onto if for each b in B there is a in A such that
f (a) = b. In other words, the function f : A → B is onto if f (A) = B.

TrungDT (FUHN) MAD111 Chapter 2 13 / 1


The function f : A → B is onto if for each b in B there is a in A such that
f (a) = b. In other words, the function f : A → B is onto if f (A) = B.

TrungDT (FUHN) MAD111 Chapter 2 13 / 1


TrungDT (FUHN) MAD111 Chapter 2 14 / 1
Example. Which functions are onto:

TrungDT (FUHN) MAD111 Chapter 2 14 / 1


Example. Which functions are onto:

(a) f : R → R; f (x) = x 2

TrungDT (FUHN) MAD111 Chapter 2 14 / 1


Example. Which functions are onto:

(a) f : R → R; f (x) = x 2
(b) f : R → R; f (x) = x 3

TrungDT (FUHN) MAD111 Chapter 2 14 / 1


Example. Which functions are onto:

(a) f : R → R; f (x) = x 2
(b) f : R → R; f (x) = x 3
(c) f : R → Z; f (x) = 2bxc

TrungDT (FUHN) MAD111 Chapter 2 14 / 1


Example. Which functions are onto:

(a) f : R → R; f (x) = x 2
(b) f : R → R; f (x) = x 3
(c) f : R → Z; f (x) = 2bxc
(d) f : R → Z; f (x) = b2xc

TrungDT (FUHN) MAD111 Chapter 2 14 / 1


Example. Which functions are onto:

(a) f : R → R; f (x) = x 2
(b) f : R → R; f (x) = x 3
(c) f : R → Z; f (x) = 2bxc
(d) f : R → Z; f (x) = b2xc
(e) f : Z × Z → Z; f (m, n) = m + n

TrungDT (FUHN) MAD111 Chapter 2 14 / 1


TrungDT (FUHN) MAD111 Chapter 2 15 / 1
The function f : A → B is a bijection (or one-to-one correspondence) if it
is both one-to-one and onto.

TrungDT (FUHN) MAD111 Chapter 2 15 / 1


The function f : A → B is a bijection (or one-to-one correspondence) if it
is both one-to-one and onto.

TrungDT (FUHN) MAD111 Chapter 2 15 / 1


The function f : A → B is a bijection (or one-to-one correspondence) if it
is both one-to-one and onto.

TrungDT (FUHN) MAD111 Chapter 2 15 / 1


TrungDT (FUHN) MAD111 Chapter 2 16 / 1
Example 1. Which functions are bijection:

TrungDT (FUHN) MAD111 Chapter 2 16 / 1


Example 1. Which functions are bijection:

(a) f : R → R; f (x) = x 2

TrungDT (FUHN) MAD111 Chapter 2 16 / 1


Example 1. Which functions are bijection:

(a) f : R → R; f (x) = x 2
(b) f : R → R; f (x) = x 3

TrungDT (FUHN) MAD111 Chapter 2 16 / 1


Example 1. Which functions are bijection:

(a) f : R → R; f (x) = x 2
(b) f : R → R; f (x) = x 3
(c) f : R → Z; f (x) = b2xc

TrungDT (FUHN) MAD111 Chapter 2 16 / 1


Example 1. Which functions are bijection:

(a) f : R → R; f (x) = x 2
(b) f : R → R; f (x) = x 3
(c) f : R → Z; f (x) = b2xc
(d) f : Z × Z → Z; f (m, n) = m + n

TrungDT (FUHN) MAD111 Chapter 2 16 / 1


Example 1. Which functions are bijection:

(a) f : R → R; f (x) = x 2
(b) f : R → R; f (x) = x 3
(c) f : R → Z; f (x) = b2xc
(d) f : Z × Z → Z; f (m, n) = m + n
(e) f : Z × Z → Z × Z; f (m, n) = (m, m + n)

TrungDT (FUHN) MAD111 Chapter 2 16 / 1


TrungDT (FUHN) MAD111 Chapter 2 17 / 1
Example 2. Does there exist:

TrungDT (FUHN) MAD111 Chapter 2 17 / 1


Example 2. Does there exist:

(a) A bijection /one-to-one/onto function from a set of 7 elements to a


set of 5 elements?

TrungDT (FUHN) MAD111 Chapter 2 17 / 1


Example 2. Does there exist:

(a) A bijection /one-to-one/onto function from a set of 7 elements to a


set of 5 elements? From a set of 5 elements to a set of 7 elements?

TrungDT (FUHN) MAD111 Chapter 2 17 / 1


Example 2. Does there exist:

(a) A bijection /one-to-one/onto function from a set of 7 elements to a


set of 5 elements? From a set of 5 elements to a set of 7 elements?
(b) A bijection from the set of even integers to the set of odd integers?

TrungDT (FUHN) MAD111 Chapter 2 17 / 1


Example 2. Does there exist:

(a) A bijection /one-to-one/onto function from a set of 7 elements to a


set of 5 elements? From a set of 5 elements to a set of 7 elements?
(b) A bijection from the set of even integers to the set of odd integers?
(c) A bijection from the set of odd integers to the set of all integers?

TrungDT (FUHN) MAD111 Chapter 2 17 / 1


Example 2. Does there exist:

(a) A bijection /one-to-one/onto function from a set of 7 elements to a


set of 5 elements? From a set of 5 elements to a set of 7 elements?
(b) A bijection from the set of even integers to the set of odd integers?
(c) A bijection from the set of odd integers to the set of all integers?
(d) A bijection from the set of all real numbers to the set of positive real
numbers?

TrungDT (FUHN) MAD111 Chapter 2 17 / 1


Compositions and Inverses

TrungDT (FUHN) MAD111 Chapter 2 18 / 1


Compositions and Inverses

Composition

TrungDT (FUHN) MAD111 Chapter 2 18 / 1


Compositions and Inverses

Composition

TrungDT (FUHN) MAD111 Chapter 2 18 / 1


Compositions and Inverses

Composition

TrungDT (FUHN) MAD111 Chapter 2 18 / 1


TrungDT (FUHN) MAD111 Chapter 2 19 / 1
Inverse

TrungDT (FUHN) MAD111 Chapter 2 19 / 1


Inverse

TrungDT (FUHN) MAD111 Chapter 2 19 / 1


Inverse

Note.

TrungDT (FUHN) MAD111 Chapter 2 19 / 1


Inverse

Note. The function f : A → B has an inverse if and only if f is a bijection.

TrungDT (FUHN) MAD111 Chapter 2 19 / 1


2.4 Sequences and Summations

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list.

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list. It is
usually denoted as {a1 , a2 , . . .} = {an , n = 1, 2, . . .}.

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list. It is
usually denoted as {a1 , a2 , . . .} = {an , n = 1, 2, . . .}.

Example.

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list. It is
usually denoted as {a1 , a2 , . . .} = {an , n = 1, 2, . . .}.

Example. Find a general formula for an of each sequence:

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list. It is
usually denoted as {a1 , a2 , . . .} = {an , n = 1, 2, . . .}.

Example. Find a general formula for an of each sequence:

1 2 3 4
(a) ,− , ,− ,...
2 3 4 5

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list. It is
usually denoted as {a1 , a2 , . . .} = {an , n = 1, 2, . . .}.

Example. Find a general formula for an of each sequence:

1 2 3 4
(a) ,− , ,− ,...
2 3 4 5
(b) −2, 1, 4, 7, 10, . . .

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list. It is
usually denoted as {a1 , a2 , . . .} = {an , n = 1, 2, . . .}.

Example. Find a general formula for an of each sequence:

1 2 3 4
(a) ,− , ,− ,...
2 3 4 5
(b) −2, 1, 4, 7, 10, . . . (an arithmetic progression)
(c) 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, . . .

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list. It is
usually denoted as {a1 , a2 , . . .} = {an , n = 1, 2, . . .}.

Example. Find a general formula for an of each sequence:

1 2 3 4
(a) ,− , ,− ,...
2 3 4 5
(b) −2, 1, 4, 7, 10, . . . (an arithmetic progression)
(c) 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, . . .
(d) 1, 1, 2, 3, 5, 8, 13, 21, . . .

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


2.4 Sequences and Summations

Sequences
Sequence is a discrete structure used to represent an order list. It is
usually denoted as {a1 , a2 , . . .} = {an , n = 1, 2, . . .}.

Example. Find a general formula for an of each sequence:

1 2 3 4
(a) ,− , ,− ,...
2 3 4 5
(b) −2, 1, 4, 7, 10, . . . (an arithmetic progression)
(c) 1, 2, 2, 3, 3, 3, 4, 4, 4, 4, . . .
(d) 1, 1, 2, 3, 5, 8, 13, 21, . . . (Fibonacci sequence)

TrungDT (FUHN) MAD111 Chapter 2 20 / 1


Summations

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
Given a sequence {an , n = 1, 2, . . .}.

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
P
Given a sequence {an , n = 1, 2, . . .}. The summation notation, , is used
as follows:

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
P
Given a sequence {an , n = 1, 2, . . .}. The summation notation, , is used
as follows:
100
X
ai = a1 + a2 + · · · + a100
i=1

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
P
Given a sequence {an , n = 1, 2, . . .}. The summation notation, , is used
as follows:
100
X
ai = a1 + a2 + · · · + a100
i=1
100
X
a2i+1 = a3 + a5 + · · · + a201
i=1

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
P
Given a sequence {an , n = 1, 2, . . .}. The summation notation, , is used
as follows:
100
X
ai = a1 + a2 + · · · + a100
i=1
100
X
a2i+1 = a3 + a5 + · · · + a201
i=1
100
X
1 = 1 + 1 + · · · + 1 ( 100 terms )
i=1

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
P
Given a sequence {an , n = 1, 2, . . .}. The summation notation, , is used
as follows:
100
X
ai = a1 + a2 + · · · + a100
i=1
100
X
a2i+1 = a3 + a5 + · · · + a201
i=1
100
X
1 = 1 + 1 + · · · + 1 ( 100 terms )
i=1

Properties

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
P
Given a sequence {an , n = 1, 2, . . .}. The summation notation, , is used
as follows:
100
X
ai = a1 + a2 + · · · + a100
i=1
100
X
a2i+1 = a3 + a5 + · · · + a201
i=1
100
X
1 = 1 + 1 + · · · + 1 ( 100 terms )
i=1

Properties
n
X n
X n
X
(ai + bi ) = ai + bi
i=1 i=1 i=1

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
P
Given a sequence {an , n = 1, 2, . . .}. The summation notation, , is used
as follows:
100
X
ai = a1 + a2 + · · · + a100
i=1
100
X
a2i+1 = a3 + a5 + · · · + a201
i=1
100
X
1 = 1 + 1 + · · · + 1 ( 100 terms )
i=1

Properties
n
X n
X n
X n
X n
X
(ai + bi ) = ai + bi kai = k ai
i=1 i=1 i=1 i=1 i=1

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Summations
P
Given a sequence {an , n = 1, 2, . . .}. The summation notation, , is used
as follows:
100
X
ai = a1 + a2 + · · · + a100
i=1
100
X
a2i+1 = a3 + a5 + · · · + a201
i=1
100
X
1 = 1 + 1 + · · · + 1 ( 100 terms )
i=1

Properties
n
X n
X n
X n
X n
X
(ai + bi ) = ai + bi kai = k ai
i=1 i=1 i=1 i=1 i=1

TrungDT (FUHN) MAD111 Chapter 2 21 / 1


Some Important Sums

TrungDT (FUHN) MAD111 Chapter 2 22 / 1


Some Important Sums

n
X n(n + 1)
i = 1 + 2 + ··· + n =
2
i=1

TrungDT (FUHN) MAD111 Chapter 2 22 / 1


Some Important Sums

n
X n(n + 1)
i = 1 + 2 + ··· + n =
2
i=1
n
X n(n + 1)(2n + 1)
i 2 = 12 + 22 + · · · + n2 =
6
i=1

TrungDT (FUHN) MAD111 Chapter 2 22 / 1


Some Important Sums

n
X n(n + 1)
i = 1 + 2 + ··· + n =
2
i=1
n
X n(n + 1)(2n + 1)
i 2 = 12 + 22 + · · · + n2 =
6
i=1
n
n(n + 1) 2
X  
3 3 3 3
i = 1 + 2 + ··· + n =
2
i=1

TrungDT (FUHN) MAD111 Chapter 2 22 / 1


Some Important Sums

n
X n(n + 1)
i = 1 + 2 + ··· + n =
2
i=1
n
X n(n + 1)(2n + 1)
i 2 = 12 + 22 + · · · + n2 =
6
i=1
n
n(n + 1) 2
X  
3 3 3 3
i = 1 + 2 + ··· + n =
2
i=1
n
X 1 − r n+1
ri = 1 + r + r2 + · · · + rn =
1−r
i=0

TrungDT (FUHN) MAD111 Chapter 2 22 / 1


TrungDT (FUHN) MAD111 Chapter 2 23 / 1
Example 1.

TrungDT (FUHN) MAD111 Chapter 2 23 / 1


Example 1. Find:

TrungDT (FUHN) MAD111 Chapter 2 23 / 1


Example 1. Find:

100
X 3i
(a)
4i+1
i=1

TrungDT (FUHN) MAD111 Chapter 2 23 / 1


Example 1. Find:

100
X 3i
(a)
4i+1
i=1
100
X 1
(b) (Telescoping sum)
i(i + 1)
i=1

Example 2.

TrungDT (FUHN) MAD111 Chapter 2 23 / 1


Example 1. Find:

100
X 3i
(a)
4i+1
i=1
100
X 1
(b) (Telescoping sum)
i(i + 1)
i=1

Example 2. Find double summations:

TrungDT (FUHN) MAD111 Chapter 2 23 / 1


Example 1. Find:

100
X 3i
(a)
4i+1
i=1
100
X 1
(b) (Telescoping sum)
i(i + 1)
i=1

Example 2. Find double summations:

2 X
X 2
(a) (i + 2j)
i=1 j=0

TrungDT (FUHN) MAD111 Chapter 2 23 / 1


Example 1. Find:

100
X 3i
(a)
4i+1
i=1
100
X 1
(b) (Telescoping sum)
i(i + 1)
i=1

Example 2. Find double summations:

2 X
X 2
(a) (i + 2j)
i=1 j=0
10 X
X 100
(b) ij
i=1 j=1

TrungDT (FUHN) MAD111 Chapter 2 23 / 1

You might also like