SlideShare a Scribd company logo
1 of 37
Download to read offline
Discrete Mathematics
Functions
Ordered tuples and Cartesian Product
Function and Representations
Types of Functions
Composition and Inverse of Function
Numeric Functions
Imdadullah Khan
Imdadullah Khan (LUMS) Functions 1 / 17
Types of functions: Review
A function f : X 7→ Y is one-to-one (or injective) iff
∀ x1, x2 ∈ X (f (x1) = f (x2) → x1 = x2)
A function f : X 7→ Y is onto (or surjective) iff
for every element y ∈ Y there is an element x ∈ X with f (x) = y
A function f : X 7→ Y is one-to-one correspondence (or bijective) iff
it is both one-to-one and onto
Imdadullah Khan (LUMS) Functions 2 / 17
Inverse of a function
If f : X 7→ Y is a bijection, then if we reverse the arrows we get a
bijection too
x1
x2
x3
x4
A
B
C
F
bijection
onto
one-to-one
x1
x2
x3
x4
A
B
C
F
Imdadullah Khan (LUMS) Functions 3 / 17
Inverse of a function
If f : X 7→ Y is a bijection, then if we reverse the arrows we get a
bijection too
ICP 5-24 Can we say this when f is not one-to-one? a) Yes b) No
x1
x2
x3
x4
x5
A
B
C
F
Not bijection
onto
not one-to-one
x1
x2
x3
x4
x5
A
B
C
F
Imdadullah Khan (LUMS) Functions 4 / 17
Inverse of a function
If f : X 7→ Y is a bijection, then if we reverse the arrows we get a
bijection too
ICP 5-25 Can we say this when f is not onto? a) Yes b) No
x1
x2
x3
x4
A
B
C
F
D
Not bijection
not onto
one-to-one
x1
x2
x3
x4
A
B
C
F
D
Imdadullah Khan (LUMS) Functions 5 / 17
Inverse of a function
If f : X 7→ Y is a bijection, then if we reverse the arrows we get a
bijection too
ICP 5-26 Can we say this when f is neither? a) Yes b) No
x1
x2
x3
x4
x5
A
B
C
F
Not bijection
not onto
not one-to-one
x1
x2
x3
x4
x5
A
B
C
F
Imdadullah Khan (LUMS) Functions 6 / 17
Inverse of function
If f : X 7→ Y is a bijection, then if we reverse the arrows we get a
bijection too
Imdadullah Khan (LUMS) Functions 7 / 17
Inverse of function
If f : X 7→ Y is a bijection, then if we reverse the arrows we get a
bijection too
If f : X 7→ Y is a bijection, f −1 : Y 7→ X is the inverse function such that
f −1(b) = a, when f (a) = b
If an inverse exists, then
f (a) = b ↔ f −1
(b) = a
Imdadullah Khan (LUMS) Functions 7 / 17
Inverse of function
Let f : R 7→ R be f (x) = 2x − 3
Is f a bijection? What is f −1?
Imdadullah Khan (LUMS) Functions 8 / 17
Inverse of function
Let f : R 7→ R be f (x) = 2x − 3
Is f a bijection? What is f −1?
For any y ∈ R, since y+3/2 ∈ R and f (y+3/2) = y
so f is onto
Imdadullah Khan (LUMS) Functions 8 / 17
Inverse of function
Let f : R 7→ R be f (x) = 2x − 3
Is f a bijection? What is f −1?
For any y ∈ R, since y+3/2 ∈ R and f (y+3/2) = y
so f is onto
f (x1) = f (x2) → 2(x1) − 3 = 2(x2) − 3 → x1 = x2
so f is one-to-one
Hence, f is a bijection
Imdadullah Khan (LUMS) Functions 8 / 17
Inverse of function
Let f : R 7→ R be f (x) = 2x − 3
Is f a bijection? What is f −1?
For any y ∈ R, since y+3/2 ∈ R and f (y+3/2) = y
so f is onto
f (x1) = f (x2) → 2(x1) − 3 = 2(x2) − 3 → x1 = x2
so f is one-to-one
Hence, f is a bijection
Let f −1(y) = x
Let y = 2x − 3 and solve for x
f −1(y) = y+3/2
Imdadullah Khan (LUMS) Functions 8 / 17
Inverse of function
Let f : R− 7→ R+ be f (x) = x2
Is f a bijection? What is f −1?
R− = {x ∈ R | x ≤ 0} and R+ = {x ∈ R | x ≥ 0}
Imdadullah Khan (LUMS) Functions 9 / 17
Inverse of function
Let f : R− 7→ R+ be f (x) = x2
Is f a bijection? What is f −1?
R− = {x ∈ R | x ≤ 0} and R+ = {x ∈ R | x ≥ 0}
f −1(y) = −
√
y
Imdadullah Khan (LUMS) Functions 9 / 17
Composing functions
The output of one function can be used as input to another function
Restriction on range and domain
Imdadullah Khan (LUMS) Functions 10 / 17
Composing functions
The output of one function can be used as input to another function
Restriction on range and domain
Let g : A 7→ B and let f : B 7→ C
The composition of the functions f and g is a function, (f ◦ g) : A 7→ C is
(f ◦ g)(a) = f (g(a))
The output of g is input to f
Range of g (actual outputs) must be a subset of domain of f
Imdadullah Khan (LUMS) Functions 10 / 17
Composition
Let f : R 7→ R be f (x) := x3
Let g : Z 7→ Z be g(x) := x2
Imdadullah Khan (LUMS) Functions 11 / 17
Composition
Let f : R 7→ R be f (x) := x3
Let g : Z 7→ Z be g(x) := x2
(f ◦ g)(x) : Z 7→ R
Imdadullah Khan (LUMS) Functions 11 / 17
Composition
Let f : R 7→ R be f (x) := x3
Let g : Z 7→ Z be g(x) := x2
(f ◦ g)(x) : Z 7→ R
(f ◦ g)(x) = f (g(x)) = f (x2) = (x2)3 = x6
What will be (g ◦ f ) ?
Imdadullah Khan (LUMS) Functions 11 / 17
Composition
Let f : Z 7→ Z be f (x) := x3
Let g : Z 7→ Z be g(x) := x2
Imdadullah Khan (LUMS) Functions 12 / 17
Composition
Let f : Z 7→ Z be f (x) := x3
Let g : Z 7→ Z be g(x) := x2
(f ◦ g)(x) : Z 7→ Z
Imdadullah Khan (LUMS) Functions 12 / 17
Composition
Let f : Z 7→ Z be f (x) := x3
Let g : Z 7→ Z be g(x) := x2
(f ◦ g)(x) : Z 7→ Z
(f ◦ g)(x) = f (g(x)) = f (x2) = (x2)3 = x6
Imdadullah Khan (LUMS) Functions 12 / 17
Composition
Let f : Z 7→ Z be f (x) := x3
Let g : Z 7→ Z be g(x) := x2
(f ◦ g)(x) : Z 7→ Z
(f ◦ g)(x) = f (g(x)) = f (x2) = (x2)3 = x6
(g ◦ f )(x) : Z 7→ Z
(g ◦ f )(x) = g(f (x)) = g(x3) = (x3)2 = x6
Imdadullah Khan (LUMS) Functions 12 / 17
Composition
Let f : Z 7→ Z be f (x) := x2
Let g : Z 7→ Z be g(x) := 2x
Imdadullah Khan (LUMS) Functions 13 / 17
Composition
Let f : Z 7→ Z be f (x) := x2
Let g : Z 7→ Z be g(x) := 2x
(f ◦ g)(x) : Z 7→ Z
(f ◦ g)(x) = f (g(x)) = f (2x) = (2x)2 = 4x2
Imdadullah Khan (LUMS) Functions 13 / 17
Composition
Let f : Z 7→ Z be f (x) := x2
Let g : Z 7→ Z be g(x) := 2x
(f ◦ g)(x) : Z 7→ Z
(f ◦ g)(x) = f (g(x)) = f (2x) = (2x)2 = 4x2
(g ◦ f )(x) : Z 7→ Z
(g ◦ f )(x) = g(f (x)) = g(x2) = 2(x2) = 2x2
Imdadullah Khan (LUMS) Functions 13 / 17
Composition
Let f : Z 7→ Z be f (x) := x2
Let g : Z 7→ Z be g(x) := 2x
(f ◦ g)(x) : Z 7→ Z
(f ◦ g)(x) = f (g(x)) = f (2x) = (2x)2 = 4x2
(g ◦ f )(x) : Z 7→ Z
(g ◦ f )(x) = g(f (x)) = g(x2) = 2(x2) = 2x2
(f ◦ g)(·) is not necessarily the same as (g ◦ f )(·)
Sometimes, the other side of composition may not even be possible
Imdadullah Khan (LUMS) Functions 13 / 17
Composing function with itself
A function can be composed with itself
Imdadullah Khan (LUMS) Functions 14 / 17
Composing function with itself
A function can be composed with itself
f : Z 7→ Z be f (x) = x + 1
(f ◦ f )(x) = f (f (x)) = f (x + 1) = (x + 1) + 1 = x + 2
Imdadullah Khan (LUMS) Functions 14 / 17
Composing function with itself repeatedly
A function can be composed with itself multiple times
Imdadullah Khan (LUMS) Functions 15 / 17
Composing function with itself repeatedly
A function can be composed with itself multiple times
f : Z 7→ Z be f (x) = x + 1
(f ◦ (f ◦ f ))(x) = f (f (f (x))) = f (f (x + 1)) = f ((x + 2) = x + 3
Imdadullah Khan (LUMS) Functions 15 / 17
Composing function with itself repeatedly
A function can be composed with itself multiple times
f : Z 7→ Z be f (x) = x + 1
(f ◦ (f ◦ f ))(x) = f (f (f (x))) = f (f (x + 1)) = f ((x + 2) = x + 3
father(father(father(x))) = great grand father of x
Imdadullah Khan (LUMS) Functions 15 / 17
Composing function with it’s inverse
When a function is invertible (when it’s a bijection), then it can be
composed with it’s inverse
Imdadullah Khan (LUMS) Functions 16 / 17
Composing function with it’s inverse
When a function is invertible (when it’s a bijection), then it can be
composed with it’s inverse
If f = g−1
, then (f ◦ g)(x) = f (g(x)) = g−1
(g(x)) = x
Imdadullah Khan (LUMS) Functions 16 / 17
Composing function with it’s inverse
When a function is invertible (when it’s a bijection), then it can be
composed with it’s inverse
If f = g−1
, then (f ◦ g)(x) = f (g(x)) = g−1
(g(x)) = x
f : Z 7→ Z be f (x) = x + 1
Let g : Z 7→ Z be g(x) = x − 1
f = g−1
Imdadullah Khan (LUMS) Functions 16 / 17
Composing function with it’s inverse
When a function is invertible (when it’s a bijection), then it can be
composed with it’s inverse
If f = g−1
, then (f ◦ g)(x) = f (g(x)) = g−1
(g(x)) = x
f : Z 7→ Z be f (x) = x + 1
Let g : Z 7→ Z be g(x) = x − 1
f = g−1
f ◦ g(x) = f (g(x)) = f (x − 1) = (x − 1) + 1 = x
Imdadullah Khan (LUMS) Functions 16 / 17
Function inverse and composition: Summary
If f : X 7→ Y is a bijection, then if we reverse the arrows we get a
bijection too
If f : X 7→ Y is a bijection, f −1 : Y 7→ X is the inverse function such
that f −1(b) = a, when f (a) = b
Let g : A 7→ B and let f : B 7→ C. The composition of the functions
f and g is a function, (f ◦ g) : A 7→ C is (f ◦ g)(a) = f (g(a))
Function can be composed with itself (multiple times) and with it’s
inverse
Imdadullah Khan (LUMS) Functions 17 / 17

More Related Content

Similar to CS210-slides-05-04-Functions-Inverse-and-Composition.pdf

Function presentation
Function presentationFunction presentation
Function presentationjamil sadiq
 
Convex Analysis and Duality (based on "Functional Analysis and Optimization" ...
Convex Analysis and Duality (based on "Functional Analysis and Optimization" ...Convex Analysis and Duality (based on "Functional Analysis and Optimization" ...
Convex Analysis and Duality (based on "Functional Analysis and Optimization" ...Katsuya Ito
 
29 inverse functions x
29 inverse functions  x29 inverse functions  x
29 inverse functions xmath260
 
Notes chapter 1
Notes chapter 1 Notes chapter 1
Notes chapter 1 Swati Seth
 
2 integration and the substitution methods x
2 integration and the substitution methods x2 integration and the substitution methods x
2 integration and the substitution methods xmath266
 
1.6 inverse function (optional)
1.6 inverse function (optional)1.6 inverse function (optional)
1.6 inverse function (optional)math123c
 
7. inverse trig functions and linear trig equations-x
7. inverse trig functions and  linear trig equations-x7. inverse trig functions and  linear trig equations-x
7. inverse trig functions and linear trig equations-xharbormath240
 
Pre-Cal 40S Slides February 29, 2008
Pre-Cal 40S Slides February 29, 2008Pre-Cal 40S Slides February 29, 2008
Pre-Cal 40S Slides February 29, 2008Darren Kuropatwa
 
Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphsSujata Tapare
 
14 inverse trig functions and linear trig equations-x
14 inverse trig functions and linear trig equations-x14 inverse trig functions and linear trig equations-x
14 inverse trig functions and linear trig equations-xmath260
 
4.1 inverse functions
4.1 inverse functions4.1 inverse functions
4.1 inverse functionsmath260
 
Benginning Calculus Lecture notes 1 - functions
Benginning Calculus Lecture notes 1 - functionsBenginning Calculus Lecture notes 1 - functions
Benginning Calculus Lecture notes 1 - functionsbasyirstar
 
53 inverse function (optional)
53 inverse function (optional)53 inverse function (optional)
53 inverse function (optional)math126
 
Function in Mathematics
Function in MathematicsFunction in Mathematics
Function in Mathematicsghhgj jhgh
 

Similar to CS210-slides-05-04-Functions-Inverse-and-Composition.pdf (20)

Function presentation
Function presentationFunction presentation
Function presentation
 
Convex Analysis and Duality (based on "Functional Analysis and Optimization" ...
Convex Analysis and Duality (based on "Functional Analysis and Optimization" ...Convex Analysis and Duality (based on "Functional Analysis and Optimization" ...
Convex Analysis and Duality (based on "Functional Analysis and Optimization" ...
 
29 inverse functions x
29 inverse functions  x29 inverse functions  x
29 inverse functions x
 
Notes chapter 1
Notes chapter 1 Notes chapter 1
Notes chapter 1
 
2 integration and the substitution methods x
2 integration and the substitution methods x2 integration and the substitution methods x
2 integration and the substitution methods x
 
1.6 inverse function (optional)
1.6 inverse function (optional)1.6 inverse function (optional)
1.6 inverse function (optional)
 
7. inverse trig functions and linear trig equations-x
7. inverse trig functions and  linear trig equations-x7. inverse trig functions and  linear trig equations-x
7. inverse trig functions and linear trig equations-x
 
Complex analysis
Complex analysisComplex analysis
Complex analysis
 
Pre-Cal 40S Slides February 29, 2008
Pre-Cal 40S Slides February 29, 2008Pre-Cal 40S Slides February 29, 2008
Pre-Cal 40S Slides February 29, 2008
 
boyd 3.1
boyd 3.1boyd 3.1
boyd 3.1
 
Functions
FunctionsFunctions
Functions
 
Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphs
 
14 inverse trig functions and linear trig equations-x
14 inverse trig functions and linear trig equations-x14 inverse trig functions and linear trig equations-x
14 inverse trig functions and linear trig equations-x
 
4.1 inverse functions
4.1 inverse functions4.1 inverse functions
4.1 inverse functions
 
Inverse function
Inverse function Inverse function
Inverse function
 
Benginning Calculus Lecture notes 1 - functions
Benginning Calculus Lecture notes 1 - functionsBenginning Calculus Lecture notes 1 - functions
Benginning Calculus Lecture notes 1 - functions
 
Comp inverse
Comp inverseComp inverse
Comp inverse
 
53 inverse function (optional)
53 inverse function (optional)53 inverse function (optional)
53 inverse function (optional)
 
Function in Mathematics
Function in MathematicsFunction in Mathematics
Function in Mathematics
 
Inverse Functions
Inverse FunctionsInverse Functions
Inverse Functions
 

Recently uploaded

How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................MirzaAbrarBaig5
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportDenish Jangid
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...EduSkills OECD
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital ManagementMBA Assignment Experts
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnershipsexpandedwebsite
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文中 央社
 

Recently uploaded (20)

How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
male presentation...pdf.................
male presentation...pdf.................male presentation...pdf.................
male presentation...pdf.................
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management8 Tips for Effective Working Capital Management
8 Tips for Effective Working Capital Management
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community PartnershipsSpring gala 2024 photo slideshow - Celebrating School-Community Partnerships
Spring gala 2024 photo slideshow - Celebrating School-Community Partnerships
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 

CS210-slides-05-04-Functions-Inverse-and-Composition.pdf

  • 1. Discrete Mathematics Functions Ordered tuples and Cartesian Product Function and Representations Types of Functions Composition and Inverse of Function Numeric Functions Imdadullah Khan Imdadullah Khan (LUMS) Functions 1 / 17
  • 2. Types of functions: Review A function f : X 7→ Y is one-to-one (or injective) iff ∀ x1, x2 ∈ X (f (x1) = f (x2) → x1 = x2) A function f : X 7→ Y is onto (or surjective) iff for every element y ∈ Y there is an element x ∈ X with f (x) = y A function f : X 7→ Y is one-to-one correspondence (or bijective) iff it is both one-to-one and onto Imdadullah Khan (LUMS) Functions 2 / 17
  • 3. Inverse of a function If f : X 7→ Y is a bijection, then if we reverse the arrows we get a bijection too x1 x2 x3 x4 A B C F bijection onto one-to-one x1 x2 x3 x4 A B C F Imdadullah Khan (LUMS) Functions 3 / 17
  • 4. Inverse of a function If f : X 7→ Y is a bijection, then if we reverse the arrows we get a bijection too ICP 5-24 Can we say this when f is not one-to-one? a) Yes b) No x1 x2 x3 x4 x5 A B C F Not bijection onto not one-to-one x1 x2 x3 x4 x5 A B C F Imdadullah Khan (LUMS) Functions 4 / 17
  • 5. Inverse of a function If f : X 7→ Y is a bijection, then if we reverse the arrows we get a bijection too ICP 5-25 Can we say this when f is not onto? a) Yes b) No x1 x2 x3 x4 A B C F D Not bijection not onto one-to-one x1 x2 x3 x4 A B C F D Imdadullah Khan (LUMS) Functions 5 / 17
  • 6. Inverse of a function If f : X 7→ Y is a bijection, then if we reverse the arrows we get a bijection too ICP 5-26 Can we say this when f is neither? a) Yes b) No x1 x2 x3 x4 x5 A B C F Not bijection not onto not one-to-one x1 x2 x3 x4 x5 A B C F Imdadullah Khan (LUMS) Functions 6 / 17
  • 7. Inverse of function If f : X 7→ Y is a bijection, then if we reverse the arrows we get a bijection too Imdadullah Khan (LUMS) Functions 7 / 17
  • 8. Inverse of function If f : X 7→ Y is a bijection, then if we reverse the arrows we get a bijection too If f : X 7→ Y is a bijection, f −1 : Y 7→ X is the inverse function such that f −1(b) = a, when f (a) = b If an inverse exists, then f (a) = b ↔ f −1 (b) = a Imdadullah Khan (LUMS) Functions 7 / 17
  • 9. Inverse of function Let f : R 7→ R be f (x) = 2x − 3 Is f a bijection? What is f −1? Imdadullah Khan (LUMS) Functions 8 / 17
  • 10. Inverse of function Let f : R 7→ R be f (x) = 2x − 3 Is f a bijection? What is f −1? For any y ∈ R, since y+3/2 ∈ R and f (y+3/2) = y so f is onto Imdadullah Khan (LUMS) Functions 8 / 17
  • 11. Inverse of function Let f : R 7→ R be f (x) = 2x − 3 Is f a bijection? What is f −1? For any y ∈ R, since y+3/2 ∈ R and f (y+3/2) = y so f is onto f (x1) = f (x2) → 2(x1) − 3 = 2(x2) − 3 → x1 = x2 so f is one-to-one Hence, f is a bijection Imdadullah Khan (LUMS) Functions 8 / 17
  • 12. Inverse of function Let f : R 7→ R be f (x) = 2x − 3 Is f a bijection? What is f −1? For any y ∈ R, since y+3/2 ∈ R and f (y+3/2) = y so f is onto f (x1) = f (x2) → 2(x1) − 3 = 2(x2) − 3 → x1 = x2 so f is one-to-one Hence, f is a bijection Let f −1(y) = x Let y = 2x − 3 and solve for x f −1(y) = y+3/2 Imdadullah Khan (LUMS) Functions 8 / 17
  • 13. Inverse of function Let f : R− 7→ R+ be f (x) = x2 Is f a bijection? What is f −1? R− = {x ∈ R | x ≤ 0} and R+ = {x ∈ R | x ≥ 0} Imdadullah Khan (LUMS) Functions 9 / 17
  • 14. Inverse of function Let f : R− 7→ R+ be f (x) = x2 Is f a bijection? What is f −1? R− = {x ∈ R | x ≤ 0} and R+ = {x ∈ R | x ≥ 0} f −1(y) = − √ y Imdadullah Khan (LUMS) Functions 9 / 17
  • 15. Composing functions The output of one function can be used as input to another function Restriction on range and domain Imdadullah Khan (LUMS) Functions 10 / 17
  • 16. Composing functions The output of one function can be used as input to another function Restriction on range and domain Let g : A 7→ B and let f : B 7→ C The composition of the functions f and g is a function, (f ◦ g) : A 7→ C is (f ◦ g)(a) = f (g(a)) The output of g is input to f Range of g (actual outputs) must be a subset of domain of f Imdadullah Khan (LUMS) Functions 10 / 17
  • 17. Composition Let f : R 7→ R be f (x) := x3 Let g : Z 7→ Z be g(x) := x2 Imdadullah Khan (LUMS) Functions 11 / 17
  • 18. Composition Let f : R 7→ R be f (x) := x3 Let g : Z 7→ Z be g(x) := x2 (f ◦ g)(x) : Z 7→ R Imdadullah Khan (LUMS) Functions 11 / 17
  • 19. Composition Let f : R 7→ R be f (x) := x3 Let g : Z 7→ Z be g(x) := x2 (f ◦ g)(x) : Z 7→ R (f ◦ g)(x) = f (g(x)) = f (x2) = (x2)3 = x6 What will be (g ◦ f ) ? Imdadullah Khan (LUMS) Functions 11 / 17
  • 20. Composition Let f : Z 7→ Z be f (x) := x3 Let g : Z 7→ Z be g(x) := x2 Imdadullah Khan (LUMS) Functions 12 / 17
  • 21. Composition Let f : Z 7→ Z be f (x) := x3 Let g : Z 7→ Z be g(x) := x2 (f ◦ g)(x) : Z 7→ Z Imdadullah Khan (LUMS) Functions 12 / 17
  • 22. Composition Let f : Z 7→ Z be f (x) := x3 Let g : Z 7→ Z be g(x) := x2 (f ◦ g)(x) : Z 7→ Z (f ◦ g)(x) = f (g(x)) = f (x2) = (x2)3 = x6 Imdadullah Khan (LUMS) Functions 12 / 17
  • 23. Composition Let f : Z 7→ Z be f (x) := x3 Let g : Z 7→ Z be g(x) := x2 (f ◦ g)(x) : Z 7→ Z (f ◦ g)(x) = f (g(x)) = f (x2) = (x2)3 = x6 (g ◦ f )(x) : Z 7→ Z (g ◦ f )(x) = g(f (x)) = g(x3) = (x3)2 = x6 Imdadullah Khan (LUMS) Functions 12 / 17
  • 24. Composition Let f : Z 7→ Z be f (x) := x2 Let g : Z 7→ Z be g(x) := 2x Imdadullah Khan (LUMS) Functions 13 / 17
  • 25. Composition Let f : Z 7→ Z be f (x) := x2 Let g : Z 7→ Z be g(x) := 2x (f ◦ g)(x) : Z 7→ Z (f ◦ g)(x) = f (g(x)) = f (2x) = (2x)2 = 4x2 Imdadullah Khan (LUMS) Functions 13 / 17
  • 26. Composition Let f : Z 7→ Z be f (x) := x2 Let g : Z 7→ Z be g(x) := 2x (f ◦ g)(x) : Z 7→ Z (f ◦ g)(x) = f (g(x)) = f (2x) = (2x)2 = 4x2 (g ◦ f )(x) : Z 7→ Z (g ◦ f )(x) = g(f (x)) = g(x2) = 2(x2) = 2x2 Imdadullah Khan (LUMS) Functions 13 / 17
  • 27. Composition Let f : Z 7→ Z be f (x) := x2 Let g : Z 7→ Z be g(x) := 2x (f ◦ g)(x) : Z 7→ Z (f ◦ g)(x) = f (g(x)) = f (2x) = (2x)2 = 4x2 (g ◦ f )(x) : Z 7→ Z (g ◦ f )(x) = g(f (x)) = g(x2) = 2(x2) = 2x2 (f ◦ g)(·) is not necessarily the same as (g ◦ f )(·) Sometimes, the other side of composition may not even be possible Imdadullah Khan (LUMS) Functions 13 / 17
  • 28. Composing function with itself A function can be composed with itself Imdadullah Khan (LUMS) Functions 14 / 17
  • 29. Composing function with itself A function can be composed with itself f : Z 7→ Z be f (x) = x + 1 (f ◦ f )(x) = f (f (x)) = f (x + 1) = (x + 1) + 1 = x + 2 Imdadullah Khan (LUMS) Functions 14 / 17
  • 30. Composing function with itself repeatedly A function can be composed with itself multiple times Imdadullah Khan (LUMS) Functions 15 / 17
  • 31. Composing function with itself repeatedly A function can be composed with itself multiple times f : Z 7→ Z be f (x) = x + 1 (f ◦ (f ◦ f ))(x) = f (f (f (x))) = f (f (x + 1)) = f ((x + 2) = x + 3 Imdadullah Khan (LUMS) Functions 15 / 17
  • 32. Composing function with itself repeatedly A function can be composed with itself multiple times f : Z 7→ Z be f (x) = x + 1 (f ◦ (f ◦ f ))(x) = f (f (f (x))) = f (f (x + 1)) = f ((x + 2) = x + 3 father(father(father(x))) = great grand father of x Imdadullah Khan (LUMS) Functions 15 / 17
  • 33. Composing function with it’s inverse When a function is invertible (when it’s a bijection), then it can be composed with it’s inverse Imdadullah Khan (LUMS) Functions 16 / 17
  • 34. Composing function with it’s inverse When a function is invertible (when it’s a bijection), then it can be composed with it’s inverse If f = g−1 , then (f ◦ g)(x) = f (g(x)) = g−1 (g(x)) = x Imdadullah Khan (LUMS) Functions 16 / 17
  • 35. Composing function with it’s inverse When a function is invertible (when it’s a bijection), then it can be composed with it’s inverse If f = g−1 , then (f ◦ g)(x) = f (g(x)) = g−1 (g(x)) = x f : Z 7→ Z be f (x) = x + 1 Let g : Z 7→ Z be g(x) = x − 1 f = g−1 Imdadullah Khan (LUMS) Functions 16 / 17
  • 36. Composing function with it’s inverse When a function is invertible (when it’s a bijection), then it can be composed with it’s inverse If f = g−1 , then (f ◦ g)(x) = f (g(x)) = g−1 (g(x)) = x f : Z 7→ Z be f (x) = x + 1 Let g : Z 7→ Z be g(x) = x − 1 f = g−1 f ◦ g(x) = f (g(x)) = f (x − 1) = (x − 1) + 1 = x Imdadullah Khan (LUMS) Functions 16 / 17
  • 37. Function inverse and composition: Summary If f : X 7→ Y is a bijection, then if we reverse the arrows we get a bijection too If f : X 7→ Y is a bijection, f −1 : Y 7→ X is the inverse function such that f −1(b) = a, when f (a) = b Let g : A 7→ B and let f : B 7→ C. The composition of the functions f and g is a function, (f ◦ g) : A 7→ C is (f ◦ g)(a) = f (g(a)) Function can be composed with itself (multiple times) and with it’s inverse Imdadullah Khan (LUMS) Functions 17 / 17