Definition of functions
Floor Function & Ceiling Function
Learning Objective
To understand the various types of functions
2
Definition of Functions
A function f from 𝐴 𝑡𝑜 𝐵(𝑓:𝐴→𝐵) is a mapping that assigns each
element of set A to exactly one element of set B: 𝑓(𝑎) = 𝑏.
3
One-to-One and Onto Functions
A function 𝑓 is one-to-one or an Injection ↔ {𝑓(𝑎) =𝑓(𝑏) →𝑎 = 𝑏} for
all 𝑎 and 𝑏 in the domain of 𝑓.
∀𝑎 ∀𝑏𝑓(𝑎) =𝑓(𝑏) → 𝑎 = 𝑏 𝑜𝑟 ∀𝑎 ∀𝑏 (𝑎 ≠ 𝑏 →𝑓(𝑎) ≠𝑓(𝑏).
4
One-to-One and Onto Functions
Example Determine whether the function f from {a, b, c, d} to
{1, 2, 3, 4, 5} with f (a) = 4 , f (b) = 5 , f (c) = 1, and f (d) = 3
is one-to-one.
Solution The function f is one-to-one because f takes on different
values at the four elements of its domain.
5
One-to-One and Onto Functions
A function 𝑓:𝐴→𝐵 is called onto, or a surjection ↔for every element 𝑏∈𝐵
∃ an element 𝑎∈𝐴 with 𝑓(𝑎)=𝑏.
A function 𝑓is onto if ∀𝑦 ∃𝑥 (𝑓(𝑥)=𝑦)
6
One-to-One and Onto Functions
Example Is the function f (x) = 𝑥 2 from the set of integers to
the set of integers onto?
Solution The function f is not onto because there is no integer
with 𝑥 2 = −1.
7
Bijective Function
The function f is a one-to-one correspondence , or a
bijection, if it is both one-to-one and onto. We also say that
such a function is bijective.
8
Inverse Function
Let f be a one-to-one correspondence from A to B. The inverse
function of f , denoted 𝑓 −1 , is the function from B to A defined as
𝑓 −1 (b) = a when f (a) = b.
a b=f(a)
A B
9
Composition of Functions
Let 𝑔: 𝐴 → 𝐵, 𝑓: 𝐵 → 𝐶. The composition of f and g , denoted by
f ◦g , is the function defined by
( f ◦g)(a) = f (g(a))
10
Composition of Functions
Example Let f and g be the functions from the set of integers
to the set of integers defined by f (x) = 2x + 3 and g(x) = 3x + 2.
What is the composition of f and g ? What is the composition
of g and f ?
Solution
( f ◦g)(x) = f (g(x)) = f (3x + 2) = 2(3x + 2) + 3 = 6x + 7
g◦f )(x)= g( f (x)) = g(2x + 3) = 3(2x + 3) + 2 = 6x + 11.
11
Floor Function & Ceiling Function
The floor function assigns to the real number x the largest integer
that is less than or equal to x.
The value of the floor function at x is denoted by 𝑥 .
The ceiling function assigns to the real number x the smallest
integer that is greater than or equal to x.
The value of the ceiling function at x is denoted by 𝑥 .
12
Example
Some examples of the floor functions and the ceiling
functions are
1 1 1 1
=0, =1, − = -1, − = 0,
2 2 2 2
3.1 =3, 3.1 =4, 7 =7, 7 =7
13
Summary
Injection or One-to-One: ∀𝑎∀𝑏𝑓(𝑎) =𝑓(𝑏) → 𝑎 = 𝑏
Surjection or Onto: A function 𝑓is onto if ∀𝑦∃𝑥(𝑓(𝑥)=𝑦)
Bijection: both (One-to-One and Onto)
Inverse Function: (Bijection)
Function Composition: (𝑓∘𝑔)(𝑎) =𝑓( 𝑔(𝑎)).
14 Floor Function & Ceiling Function
3
Find the value of 1.1 , , −1 and −1 .
4
Answers
3
1.1 = 1, =1, −1 = -1, −1 =-1.
4
15
Sequences and Summations
16