Chapter 2
Chapter 2
Functions
Some Function Terminology
Types of Function
Function Addition/Multiplication
Inverse of a Function
Function Composition
Some important functions
1
Functions
• Definition : A function is a relation in which each element of the domain
corresponds with exactly one element of the range.
• let A,B : sets
A function f : A → B is an assignment of exactly one element of B to each
element of A.
We write f(a) = b if b is the unique element of B assigned by f to a ∈ A.
• Example:
A B A B
α 1 α 1
β 2 β
γ 2
γ 3
3
Function Terminology (cont.)
Example:
• f(a) = Z
• the image of d is Z
• the domain of f is A = {a, b, c, d} A B
a
• the codomain is B = {X, Y, Z}
X
• f(A) = {Y, Z} b
c Y
• the preimage of Y is b
Z
• the preimages of Z are a, c and d d
• f({c,d}) = {Z}
4
Types of Function
Injections, Surjections and Bijections
Let f be a function from A to B.
Definition: f is one-to-one (denoted 1-1) or injective if
preimages are unique.
Note: this means that if a b then f(a) f(b).
5
Types of Function (cont.)
Examples:
• • • • • • • •
• • • • • • • •
• • • •
• • • •
• • • • •
• • •
• • • •
Onto Not Onto
One-to-one Not one-to-one (but not 1-1) (or 1-1)
•
• • • •
• • • •
• • • •
• • • •
Both 1-1 1-1 but 6
let f,g:RR:
(f g):RR, where (f g)(x) = f(x) g(x)
(f × g):RR, where (f × g)(x) = f(x) × g(x)
7
Inverse of a Function
Definition:
Let f be a bijection from A to B. Then the inverse of f,
denoted f-1, is the function from B to A defined as
f-1(y) = x iff f(x) = y
Example: Let f be defined by the diagram:
A f B A f-1 B
a a
V V
b b
W W
c c
X X
d d
Y Y
f g(x) = f(g(x))
Examples:
A g B f C A fg C
a a
V h h
b W b
i i
c c
X j j
d d
Y
9
Some important functions
Definition:
The floor function, denoted f ( x) = x or
f(x) = floor(x), is the largest integer less than or equal to x.
The ceiling function, denoted f ( x) = x or f(x) =
ceiling(x), is the smallest integer greater than or equal to x.
Examples: 3.5 = 3, 3.5 = 4.
10
Thank You
11