L5 Functions
L5 Functions
L5 Functions
Dept. of ECE
School of Engineering and Physical Sciences
Lecture Outline
2.3 Functions
• Definition of Function
• Domain, Codomain, Range, Image, Preimage,
• One-to-one function
• Onto function
• One-to-one correspondence
• Inverse Functions
• Compositions of Functions
• Floor function
• Ceiling Function
3
Functions
Functions
Functions
• A function f: A® B can also be defined in terms of a
relation from A to B. [we will cover Relation in final
term]
• A relation from A to B is just a subset of A X B.
• A relation from A to B that contains one, and only one,
ordered pair (a, b) for every element aÎ A, defines a
function f from A to B. This function is defined by the
assignment f(a)=b, where ( a, b) is the unique ordered
pair in the relation that has a as its first element.
7
Function is a kind of
mapping where every
element has a unique
image
8
Example 1
• What are the domain, codomain, and range of the function that assigns
grades to students of Discrete Math class as follows?
13
Solution of Example 1
§ Solution:
• Let G be the function that assigns grade to a student of
Discrete Mathematics class.
• The domain of G is the set { Adams, Chou, Goodfriend,
Rodriguez, Stevens}
• The codomain of G is the set { A, B, C, D, F}
• The range of G is the set { A, B, C, F}
• Because each grade except D is assigned to some student
14
Example 2
• Let R be the relation consisting of ordered pairs (Abdul, 22), (Brenda,24),
(Carla,21), (Desire,22), (Eddie,24), and (Felicia,22), where each pair consists of
a graduate student and the age of this student. What is the function that this
relation determines?
• Solution: This relation defines the function f, where with f(Abdul)= 22,
f(Brenda)=24, f(Carla)=21, f(Desire)=22, f(Eddie)= 24, and f(Felicia)=22.
• Here, domain is the set { Abdul, Brenda, Carla, Desire, Eddie, Felicia }
• To define the function f, we need to specify a codomain. Here, we can take the
codomain to be the set of positive integers
• Range is the set {21,22,24}
15
Functions
Example 6
(f1f2)(x) = x2(x- x2 ) = x3 – x4
17
Functions
Example 7
• Let A = {a, b, c, d, e} and B = {1, 2, 3, 4} with f(a) = 2,
f(b) = 1, f(c) = 4, f(d) = 1, f(e) = 1.
What is the image of the subset S = {b, c, d}?
• Solution:
• The image of the subset S = {b, c, d} is the set
f(S) = {1, 4}
19
One-to-One Functions
Example 8
Example 9
Class Work
Example 10
Onto Function
Example 11
Example 12
Class Work