SlideShare a Scribd company logo
1 of 26
1
Functions
Rosen 6th ed., §2.3
2
Definition of Functions
• Given any sets A, B, a function f from (or
“mapping”) A to B (f:AB) is an
assignment of exactly one element f(x)B
to each element xA.
3
Graphical Representations
• Functions can be represented graphically in
several ways:
• •
A
B
a b
f
f
•
•
•
•
•
•
•
•
• x
y
Plot
Graph
Like Venn diagrams
A B
4
Definition of Functions (cont’d)
• Formally: given f:AB
“x is a function” : (x,y: x=y  f(x)  f(y)) or
“x is a function” : ( x,y: (x=y)  (f(x)  f(y))) or
“x is a function” : ( x,y: (x=y)  (f(x) = f(y))) or
“x is a function” : ( x,y: (x=y)  (f(x) = f(y))) or
“x is a function” : ( x,y: (f(x)  f(y))  (x  y))
5
Some Function Terminology
• If f:AB, and f(a)=b (where aA & bB),
then:
– A is the domain of f.
– B is the codomain of f.
– b is the image of a under f.
– a is a pre-image of b under f.
• In general, b may have more than one pre-image.
– The range RB of f is {b | a f(a)=b }.
6
Range vs. Codomain - Example
• Suppose that: “f is a function mapping
students in this class to the set of grades
{A,B,C,D,E}.”
• At this point, you know f’s codomain is:
__________, and its range is ________.
• Suppose the grades turn out all As and Bs.
• Then the range of f is _________, but its
codomain is __________________.
{A,B,C,D,E} unknown!
{A,B}
still {A,B,C,D,E}!
7
Function Addition/Multiplication
• We can add and multiply functions
f,g:RR:
– (f  g):RR, where (f  g)(x) = f(x)  g(x)
– (f × g):RR, where (f × g)(x) = f(x) × g(x)
8
Function Composition
• For functions g:AB and f:BC, there is a
special operator called compose (“○”).
– It composes (i.e., creates) a new function out of f,g by
applying f to the result of g.
(f○g):AC, where (f○g)(a) = f(g(a)).
– Note g(a)B, so f(g(a)) is defined and C.
– The range of g must be a subset of f’s domain!!
– Note that ○ (like Cartesian , but unlike +,,) is non-
commuting. (In general, f○g  g○f.)
9
Function Composition
10
Images of Sets under Functions
• Given f:AB, and SA,
• The image of S under f is simply the set of
all images (under f) of the elements of S.
f(S) : {f(s) | sS}
: {b |  sS: f(s)=b}.
• Note the range of f can be defined as simply
the image (under f) of f’s domain!
11
One-to-One Functions
• A function is one-to-one (1-1), or injective,
or an injection, iff every element of its
range has only one pre-image.
• Only one element of the domain is mapped
to any given one element of the range.
– Domain & range have same cardinality. What
about codomain?
12
One-to-One Functions (cont’d)
• Formally: given f:AB
“x is injective” : (x,y: xy  f(x)f(y)) or
“x is injective” : ( x,y: (xy)  (f(x)f(y))) or
“x is injective” : ( x,y: (xy)  (f(x)  f(y))) or
“x is injective” : ( x,y: (xy)  (f(x)  f(y))) or
“x is injective” : ( x,y: (f(x)=f(y))  (x =y))
13
One-to-One Illustration
• Graph representations of functions that are
(or not) one-to-one:
•
•
•
•
•
•
•
•
•
One-to-one
•
•
•
•
•
•
•
•
•
Not one-to-one
•
•
•
•
•
•
•
•
•
Not even a
function!
14
Sufficient Conditions for 1-1ness
• Definitions (for functions f over numbers):
– f is strictly (or monotonically) increasing iff
x>y  f(x)>f(y) for all x,y in domain;
– f is strictly (or monotonically) decreasing iff
x>y  f(x)<f(y) for all x,y in domain;
• If f is either strictly increasing or strictly
decreasing, then f is one-to-one.
– e.g. f(x)=x3
15
Onto (Surjective) Functions
• A function f:AB is onto or surjective or a
surjection iff its range is equal to its
codomain (bB, aA: f(a)=b).
• An onto function maps the set A onto (over,
covering) the entirety of the set B, not just
over a piece of it.
– e.g., for domain & codomain R, x3 is onto,
whereas x2 isn’t. (Why not?)
16
Illustration of Onto
• Some functions that are or are not onto their
codomains:
Onto
(but not 1-1)
•
•
•
•
•
•
•
•
•
Not Onto
(or 1-1)
•
•
•
•
•
•
•
•
•
Both 1-1
and onto
•
•
•
•
•
•
•
•
1-1 but
not onto
•
•
•
•
•
•
•
•
•
17
Bijections
• A function f is a one-to-one
correspondence, or a bijection, or
reversible, or invertible, iff it is both one-
to-one and onto.
18
Inverse of a Function
• For bijections f:AB, there exists an
inverse of f, written f 1:BA, which is the
unique function such that:
I
f
f 


1
19
Inverse of a function (cont’d)
20
The Identity Function
• For any domain A, the identity function
I:AA (variously written, IA, 1, 1A) is the
unique function such that aA: I(a)=a.
• Some identity functions you’ve seen:
– ing with T, ing with F, ing with , ing
with U.
• Note that the identity function is both one-
to-one and onto (bijective).
21
• The identity function:
Identity Function Illustrations
•
•
•
•
•
•
•
•
•
Domain and range x
y
22
Graphs of Functions
• We can represent a function f:AB as a set
of ordered pairs {(a,f(a)) | aA}.
• Note that a, there is only one pair (a, f(a)).
• For functions over numbers, we can
represent an ordered pair (x,y) as a point on
a plane. A function is then drawn as a curve
(set of points) with only one y for each x.
23
Graphs of Functions
24
A Couple of Key Functions
• In discrete math, we frequently use the
following functions over real numbers:
– x (“floor of x”) is the largest integer  x.
– x (“ceiling of x”) is the smallest integer  x.
25
Visualizing Floor & Ceiling
• Real numbers “fall to their floor” or “rise to
their ceiling.”
• Note that if xZ,
x   x &
x   x
• Note that if xZ,
x = x = x.
0
1
1
2
3
2
3
.
.
.
.
.
.
. . .
1.6
1.6=2
1.4= 2
1.4
1.4= 1
1.6=1
3
3=3= 3
26
Plots with floor/ceiling: Example
• Plot of graph of function f(x) = x/3:
x
f(x)
Set of points (x, f(x))
+3
2
+2
3

More Related Content

Similar to Functions.ppt

Similar to Functions.ppt (20)

functions.pdf
functions.pdffunctions.pdf
functions.pdf
 
01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf01. Functions-Theory & Solved Examples Module-4.pdf
01. Functions-Theory & Solved Examples Module-4.pdf
 
Functions
FunctionsFunctions
Functions
 
Math for 800 09 functions
Math for 800   09 functionsMath for 800   09 functions
Math for 800 09 functions
 
Pre-Cal 40S March 3, 2009
Pre-Cal 40S March 3, 2009Pre-Cal 40S March 3, 2009
Pre-Cal 40S March 3, 2009
 
Functions.pptx
Functions.pptxFunctions.pptx
Functions.pptx
 
Chpt 2-functions-seqs v.5
Chpt 2-functions-seqs v.5Chpt 2-functions-seqs v.5
Chpt 2-functions-seqs v.5
 
Functions 1 - Math Academy - JC H2 maths A levels
Functions 1 - Math Academy - JC H2 maths A levelsFunctions 1 - Math Academy - JC H2 maths A levels
Functions 1 - Math Academy - JC H2 maths A levels
 
Functions and graphs
Functions and graphsFunctions and graphs
Functions and graphs
 
Calculus- Basics
Calculus- BasicsCalculus- Basics
Calculus- Basics
 
Inverse Functions
Inverse FunctionsInverse Functions
Inverse Functions
 
First Partial Review
First Partial ReviewFirst Partial Review
First Partial Review
 
Graph a function
Graph a functionGraph a function
Graph a function
 
Per4 function2
Per4 function2Per4 function2
Per4 function2
 
Functions
FunctionsFunctions
Functions
 
Quadratic functions
Quadratic functionsQuadratic functions
Quadratic functions
 
L2 graphs piecewise, absolute,and greatest integer
L2 graphs  piecewise, absolute,and greatest integerL2 graphs  piecewise, absolute,and greatest integer
L2 graphs piecewise, absolute,and greatest integer
 
Funções 4
Funções 4Funções 4
Funções 4
 
9-Functions.pptx
9-Functions.pptx9-Functions.pptx
9-Functions.pptx
 
CMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions RepresentationsCMSC 56 | Lecture 9: Functions Representations
CMSC 56 | Lecture 9: Functions Representations
 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 

Functions.ppt

  • 2. 2 Definition of Functions • Given any sets A, B, a function f from (or “mapping”) A to B (f:AB) is an assignment of exactly one element f(x)B to each element xA.
  • 3. 3 Graphical Representations • Functions can be represented graphically in several ways: • • A B a b f f • • • • • • • • • x y Plot Graph Like Venn diagrams A B
  • 4. 4 Definition of Functions (cont’d) • Formally: given f:AB “x is a function” : (x,y: x=y  f(x)  f(y)) or “x is a function” : ( x,y: (x=y)  (f(x)  f(y))) or “x is a function” : ( x,y: (x=y)  (f(x) = f(y))) or “x is a function” : ( x,y: (x=y)  (f(x) = f(y))) or “x is a function” : ( x,y: (f(x)  f(y))  (x  y))
  • 5. 5 Some Function Terminology • If f:AB, and f(a)=b (where aA & bB), then: – A is the domain of f. – B is the codomain of f. – b is the image of a under f. – a is a pre-image of b under f. • In general, b may have more than one pre-image. – The range RB of f is {b | a f(a)=b }.
  • 6. 6 Range vs. Codomain - Example • Suppose that: “f is a function mapping students in this class to the set of grades {A,B,C,D,E}.” • At this point, you know f’s codomain is: __________, and its range is ________. • Suppose the grades turn out all As and Bs. • Then the range of f is _________, but its codomain is __________________. {A,B,C,D,E} unknown! {A,B} still {A,B,C,D,E}!
  • 7. 7 Function Addition/Multiplication • We can add and multiply functions f,g:RR: – (f  g):RR, where (f  g)(x) = f(x)  g(x) – (f × g):RR, where (f × g)(x) = f(x) × g(x)
  • 8. 8 Function Composition • For functions g:AB and f:BC, there is a special operator called compose (“○”). – It composes (i.e., creates) a new function out of f,g by applying f to the result of g. (f○g):AC, where (f○g)(a) = f(g(a)). – Note g(a)B, so f(g(a)) is defined and C. – The range of g must be a subset of f’s domain!! – Note that ○ (like Cartesian , but unlike +,,) is non- commuting. (In general, f○g  g○f.)
  • 10. 10 Images of Sets under Functions • Given f:AB, and SA, • The image of S under f is simply the set of all images (under f) of the elements of S. f(S) : {f(s) | sS} : {b |  sS: f(s)=b}. • Note the range of f can be defined as simply the image (under f) of f’s domain!
  • 11. 11 One-to-One Functions • A function is one-to-one (1-1), or injective, or an injection, iff every element of its range has only one pre-image. • Only one element of the domain is mapped to any given one element of the range. – Domain & range have same cardinality. What about codomain?
  • 12. 12 One-to-One Functions (cont’d) • Formally: given f:AB “x is injective” : (x,y: xy  f(x)f(y)) or “x is injective” : ( x,y: (xy)  (f(x)f(y))) or “x is injective” : ( x,y: (xy)  (f(x)  f(y))) or “x is injective” : ( x,y: (xy)  (f(x)  f(y))) or “x is injective” : ( x,y: (f(x)=f(y))  (x =y))
  • 13. 13 One-to-One Illustration • Graph representations of functions that are (or not) one-to-one: • • • • • • • • • One-to-one • • • • • • • • • Not one-to-one • • • • • • • • • Not even a function!
  • 14. 14 Sufficient Conditions for 1-1ness • Definitions (for functions f over numbers): – f is strictly (or monotonically) increasing iff x>y  f(x)>f(y) for all x,y in domain; – f is strictly (or monotonically) decreasing iff x>y  f(x)<f(y) for all x,y in domain; • If f is either strictly increasing or strictly decreasing, then f is one-to-one. – e.g. f(x)=x3
  • 15. 15 Onto (Surjective) Functions • A function f:AB is onto or surjective or a surjection iff its range is equal to its codomain (bB, aA: f(a)=b). • An onto function maps the set A onto (over, covering) the entirety of the set B, not just over a piece of it. – e.g., for domain & codomain R, x3 is onto, whereas x2 isn’t. (Why not?)
  • 16. 16 Illustration of Onto • Some functions that are or are not onto their codomains: Onto (but not 1-1) • • • • • • • • • Not Onto (or 1-1) • • • • • • • • • Both 1-1 and onto • • • • • • • • 1-1 but not onto • • • • • • • • •
  • 17. 17 Bijections • A function f is a one-to-one correspondence, or a bijection, or reversible, or invertible, iff it is both one- to-one and onto.
  • 18. 18 Inverse of a Function • For bijections f:AB, there exists an inverse of f, written f 1:BA, which is the unique function such that: I f f    1
  • 19. 19 Inverse of a function (cont’d)
  • 20. 20 The Identity Function • For any domain A, the identity function I:AA (variously written, IA, 1, 1A) is the unique function such that aA: I(a)=a. • Some identity functions you’ve seen: – ing with T, ing with F, ing with , ing with U. • Note that the identity function is both one- to-one and onto (bijective).
  • 21. 21 • The identity function: Identity Function Illustrations • • • • • • • • • Domain and range x y
  • 22. 22 Graphs of Functions • We can represent a function f:AB as a set of ordered pairs {(a,f(a)) | aA}. • Note that a, there is only one pair (a, f(a)). • For functions over numbers, we can represent an ordered pair (x,y) as a point on a plane. A function is then drawn as a curve (set of points) with only one y for each x.
  • 24. 24 A Couple of Key Functions • In discrete math, we frequently use the following functions over real numbers: – x (“floor of x”) is the largest integer  x. – x (“ceiling of x”) is the smallest integer  x.
  • 25. 25 Visualizing Floor & Ceiling • Real numbers “fall to their floor” or “rise to their ceiling.” • Note that if xZ, x   x & x   x • Note that if xZ, x = x = x. 0 1 1 2 3 2 3 . . . . . . . . . 1.6 1.6=2 1.4= 2 1.4 1.4= 1 1.6=1 3 3=3= 3
  • 26. 26 Plots with floor/ceiling: Example • Plot of graph of function f(x) = x/3: x f(x) Set of points (x, f(x)) +3 2 +2 3