Functions
If f:AB, we say that A is the domain of f and B is the
co domain of f.
If f(x) = y, we say that y is the image of x and x is the pre-image
of y. The range of f:AB is the set of all images of elements of
A.
We say that f:AB maps A to B.
20 EL 7
Correspondence
EL 20 8
Function
7.A function is a rule that maps a number to another
unique number.The input to the function is called the
independent variable, and is also called the argument
of the function. The output of the function is called
the dependent variable.
A Swiss mathematician Leon-Hard Euler invented a
symbolic way to write statement y is function of x as
y = f(x) read as y is equal to f of x where y is called
dependent and x is called independent variable
Example:
y = x + 1
9
Functions
Function: for every x there is exactly one y.
•Domain= the set of x values
•Range = the set of y values
10
Representation of Function
EL 20 11
Representation of Function
EL 20 12
Representation of Function
EL 20 13
Types of Functions
•A function f:AB is said to be one-to-one (or injective),
if and only if
•x, y A (f(x) = f(y) x = y)
•In other words: f is one-to-one if and only if it does not
map two distinct elements of A onto the same element of
B. or
•Distinct elements of A have distinct images
•Different pre images have different images
14
Types of Functions
•Example:
•f(Ali) = Sukkur
•f(Munir) = Karachi
•f(Nek) = Hyderabad
•f(Kaleem) = Karachi
•Is f one-to-one?
•No, Muneer and Kaleem
are mapped onto the
same element of the
image.
15
g(Ali) = Sukkur
g(Munir) = Karachi
g(Nek) = Hyderabad
g(Kaleem) =Rohri
Is g one-to-one?
Yes, each element is
assigned a unique
element of the image.
Types of Functions
•How can we prove that a function f is one-to-one?
•Whenever you want to prove something, first take a look
at the relevant definition(s):
x, yA (f(x) = f(y) x = y)
•Example:
f:RR
f(x) = x
2
Disproof by counterexample:
f(3) = f(-3), but 3 -3, so f is not one-to-one.
16
Types of Functions
•A function f:AB is called onto, or surjective, iff for every
element y B there is an element x A with f(x) = y
f is onto if and only if its rangeis its entire co domain. e.g.
•A function f: AB is a one-to-one correspondence, or a
bijection, if and only if it is both one-to-one and onto.
173
yx
Types of functions
EL 20 18
Inversion
•An interesting property of bijection is that they have
an inverse function.
•The inverse functionof the bijection f:AB is the
function f
-1
:BA with
•f
-1
(y) = x whenever f(x) = y.
19
Inversion
20
Example:
f(Ali) = Karachi
f(Ahmed) = Hyderabad
f(Kamran) = N.Shah
f(Parvez) = Sukkur
f(Haleem) = Larkana
Clearly, f is bijective.
The inverse function f
-1
is given by:
f
-1
(Karachi) = Ali
f
-1
(Hyderabad) = Ahmed
f
-1
(N.shah) = Kamran
f
-1
(Sukkur) = Parveez
f
-1
(Larkana) = Haleem
Inversion is only possible
for bijections(= invertible
functions)
Types of Function
•Constant Function:
Let A and B be any two nonempty sets, then a
function f from A to B is called Constant Function
if and only if range of f is a singleton.
•If f is constant then f(x) = C
•Algebraic Function: The function defined by
algebraic expression are called algebraic function.
21
Functions
•a
nis called the leading coefficient
•nis the degree of the polynomial
•a
0is called the constant term
Polynomial Function
A polynomial function of degree nin the variable xis
a function defined by
where each a
iis real, a
n0, and n is a whole number.01
1
1)( axaxaxaxP
n
n
n
n
Polynomial Functions
Polynomial
Function in
General Form
Degree
Name of
Function
1 Linear
2 Quadratic
3 Cubic
4 Quartic
The largest exponent within the polynomial determines
the degree of the polynomial.edxcxbxaxy
234 dcxbxaxy
23 cbxaxy
2 baxy
Even and Odd Functions
A function is y = f(x) is evenif, for each x in the
domain of f, f(-x) = f(x)
A function is y = f(x) is oddif, for each x in the
domain of f,
f(-x) = -f(x)
An even function is symmetric about the y-axis.
An odd function is symmetric about the origin.
Ex. g(x) = x
3
-x
g(-x) = (-x)
3
–(-x) = -x
3
+ x =-(x
3
–x)
Therefore, g(x) is odd because f(-x) = -f(x)
Ex. h(x) = x
2
+ 1
h(-x) = (-x)
2
+ 1 = x
2
+ 1
h(x) is even because f(-x) = f(x)
Composition
•The compositionof two functions g:AB and
f:BC, denoted by fg, is defined by
•(fg)(a) = f(g(a))
•This means that
•first, function g is applied to element aA,
mapping it onto an element of B,
•then, function f is applied to this element of
B, mapping it onto an element of C.
•Therefore, the composite function maps
from A to C.
26
Composition
•Composition of a function and its inverse:
•(f
-1
f)(x) = f
-1
(f(x)) = x
•The composition of a function and its inverse is the
identity functioni(x) = x.
28
Square root function
•Composition of a function and its inverse:
•(f
-1
f)(x) = f
-1
(f(x)) = x
•The composition of a function and its inverse is the
identity functioni(x) = x.
29
Floor and Ceiling Functions
•The floorand ceilingfunctions map the real numbers
onto the integers (RZ).
•The floorfunction assigns to rRthe largest zZwith z
r, denoted by r.it is also called greatest integer.
•Examples:2.3= 2, 2= 2, 0.5= 0, -3.5= -4
•The ceilingfunction assigns to rRthe smallest zZ
with z r, denoted by r.it is also called least integer.
•Examples:2.3= 3, 2= 2, 0.5= 1, -3.5= -3
30