1. 16 CIVIL 15/07/16 1
INTRODUCTION TO FUNCTIONSINTRODUCTION TO FUNCTIONS
The term function was recognized by a GermanThe term function was recognized by a German
Mathematician LEIBNIZ .Mathematician LEIBNIZ .
Why………to describe the dependence of oneWhy………to describe the dependence of one
quantity to an other quantity.quantity to an other quantity.
DefinitionDefinition:1. A:1. A functionfunction is a relation thatis a relation that
gives agives a single outputsingle output number for every validnumber for every valid
input number (x values cannot be repeated)input number (x values cannot be repeated)
2. Function is input and out put device.2. Function is input and out put device.
3.A function is like machine that assigns a3.A function is like machine that assigns a
unique output to every allowable input.unique output to every allowable input.
2. 16 CIVIL 2
FunctionsFunctions
4.A4.A functionfunction f from a set X to a set Y is anf from a set X to a set Y is an
assignmentassignment of exactly one element of Y to eachof exactly one element of Y to each
element of X.element of X.
We writeWe write
f(x) = y or y = f(x)f(x) = y or y = f(x)
if y is the unique element of B assigned by theif y is the unique element of B assigned by the
function f to the element x of A.function f to the element x of A.
If f is a function from A to B, we writeIf f is a function from A to B, we write
f: Af: A→→BB
(note: Here, “(note: Here, “→→“ has nothing to do with if… then)“ has nothing to do with if… then)
3. 16 CIVIL 3
FunctionsFunctions
5.Function is rule to which assigns a value of5.Function is rule to which assigns a value of
independent variable which corresponds to uniqueindependent variable which corresponds to unique
value of dependent variable.value of dependent variable.
If f:AIf f:A→→B, we say that A is theB, we say that A is the domaindomain of f and Bof f and B
is theis the co domainco domain of f.of f.
If f(x) = y, we say that y is theIf f(x) = y, we say that y is the imageimage of x and x isof x and x is
thethe pre-imagepre-image of y.of y.
TheThe rangerange of f:Aof f:A→→B is the set of all images ofB is the set of all images of
elements of A.elements of A.
We say that f:AWe say that f:A→→BB mapsmaps A to B.A to B.
4. 16 CIVIL 4
FunctionFunction
A function is a rule that maps a number toA function is a rule that maps a number to
another unique number.The input to theanother unique number.The input to the
function is called the independent variable, andfunction is called the independent variable, and
is also called the argument of the function. Theis also called the argument of the function. The
output of the function is called the dependentoutput of the function is called the dependent
variable.variable.
A Swiss mathematician Leon-Hard Euler inventedA Swiss mathematician Leon-Hard Euler invented
a symbolic way to write statement y is functiona symbolic way to write statement y is function
of x as y = f(x) read as y is equal to f of xof x as y = f(x) read as y is equal to f of x
Example:Example:
y = xy = x + 1+ 1
5. Function
FunctionFunction - for every x there is exactly one y.- for every x there is exactly one y.
DomainDomain - set of x-values- set of x-values
RangeRange - set of y-values- set of y-values
6. 16 CIVIL 6
Types of FunctionsTypes of Functions
A function f:AA function f:A→→B is said to beB is said to be one-to-oneone-to-one (or(or
injectiveinjective), if and only if), if and only if
∀∀x, yx, y ∈∈ A (f(x) = f(y)A (f(x) = f(y) →→ x = y)x = y)
In other words:In other words: f is one-to-one if and only if itf is one-to-one if and only if it
does not map two distinct elements of A onto thedoes not map two distinct elements of A onto the
same element of B. orsame element of B. or
Distinct elements of A have distinct imagesDistinct elements of A have distinct images
7. 16 CIVIL 7
Types of FunctionsTypes of Functions
Example:Example:
f(Linda) = Moscowf(Linda) = Moscow
f(Max) = Bostonf(Max) = Boston
f(Kathy) = Hong Kongf(Kathy) = Hong Kong
f(Peter) = Bostonf(Peter) = Boston
Is f one-to-one?Is f one-to-one?
No, Max and Peter areNo, Max and Peter are
mapped onto the samemapped onto the same
element of the image.element of the image.
g(Linda) = Moscowg(Linda) = Moscow
g(Max) = Bostong(Max) = Boston
g(Kathy) = Hong Kongg(Kathy) = Hong Kong
g(Peter) = New Yorkg(Peter) = New York
Is g one-to-one?Is g one-to-one?
Yes, each element isYes, each element is
assigned a uniqueassigned a unique
element of the image.element of the image.
8. 16 CIVIL 8
Types of FunctionsTypes of Functions
How can we prove that a function f is one-to-one?How can we prove that a function f is one-to-one?
Whenever you want to prove something, first takeWhenever you want to prove something, first take
a look at the relevant definition(s):a look at the relevant definition(s):
∀∀x, yx, y∈∈A (f(x) = f(y)A (f(x) = f(y) →→ x = y)x = y)
Example:Example:
f:f:RR→→RR
f(x) = xf(x) = x22
Disproof by counterexample:
f(3) = f(-3), but 3f(3) = f(-3), but 3 ≠≠ -3, so f is not one-to-one.-3, so f is not one-to-one.
9. 9
Types of FunctionsTypes of Functions
A function f:AA function f:A→→B is calledB is called ontoonto, or, or surjectivesurjective, if, if
and only if for every element yand only if for every element y ∈∈ B there is anB there is an
element xelement x ∈∈ A with f(x) = yA with f(x) = y
In other words, f is onto if and only if itsIn other words, f is onto if and only if its rangerange isis
itsits entire co domainentire co domain. e.g.. e.g.
A function f: AA function f: A→→B is aB is a one-to-one correspondenceone-to-one correspondence,,
or aor a bijectionbijection, if and only if it is both one-to-one, if and only if it is both one-to-one
and onto.and onto.
Obviously, if f is a bijection and A and B are finiteObviously, if f is a bijection and A and B are finite
sets, then |A| = |B|.sets, then |A| = |B|.
3
y x=
10. 10
InversionInversion
An interesting property of bijection is thatAn interesting property of bijection is that
they have anthey have an inverse functioninverse function..
TheThe inverse functioninverse function of the bijection f:Aof the bijection f:A→→BB
is the function fis the function f-1-1
:B:B→→A withA with
ff-1-1
(y) = x whenever f(x) = y.(y) = x whenever f(x) = y.
11. 11
InversionInversion
Example:Example:
f(Linda) = Moscowf(Linda) = Moscow
f(Max) = Bostonf(Max) = Boston
f(Kathy) = Hong Kongf(Kathy) = Hong Kong
f(Peter) = Lf(Peter) = Lüübeckbeck
f(Helena) = New Yorkf(Helena) = New York
Clearly, f is bijective.Clearly, f is bijective.
The inverse functionThe inverse function
ff-1-1
is given by:is given by:
ff-1-1
(Moscow) = Linda(Moscow) = Linda
ff-1-1
(Boston) = Max(Boston) = Max
ff-1-1
(Hong Kong) = Kathy(Hong Kong) = Kathy
ff-1-1
(L(Lüübeck) = Peterbeck) = Peter
ff-1-1
(New York) = Helena(New York) = Helena
Inversion is onlyInversion is only
possible for bijectionspossible for bijections
(= invertible functions)(= invertible functions)
12. Types of FunctionTypes of Function
Constant Function:Constant Function:
Let ‘A’ and ‘B’ be any two non–emptyLet ‘A’ and ‘B’ be any two non–empty
sets, then a function ‘ff’ from ‘A’ tosets, then a function ‘ff’ from ‘A’ to
‘B’ is called Constant Function if and‘B’ is called Constant Function if and
only if range of ‘f’ is a singleton.only if range of ‘f’ is a singleton.
Algebraic Function: TheAlgebraic Function: The functionfunction
defined by algebraic expression aredefined by algebraic expression are
called algebraic function.called algebraic function.
12
13. FunctionsFunctions
aann is called theis called the leading coefficientleading coefficient
nn is theis the degreedegree of the polynomialof the polynomial
aa00 is called theis called the constant termconstant term
Polynomial FunctionPolynomial Function
AA polynomial function of degreepolynomial function of degree nn in the variablein the variable xx isis
a function defined bya function defined by
where eachwhere each aaii is real,is real, aann 0, and 0, and nn is a whole number.is a whole number.
01
1
1)( axaxaxaxP n
n
n
n ++++= −
−
14. Polynomial FunctionsPolynomial Functions
The largest exponent within theThe largest exponent within the
polynomial determines the degree of thepolynomial determines the degree of the
polynomial.polynomial.
Polynomial
Function in
General Form
Degree
Name of
Function
1 Linear
2 Quadratic
3 Cubic
4 Quarticedxcxbxaxy ++++= 234
dcxbxaxy +++= 23
cbxaxy ++= 2
baxy +=
15. Even and Odd FunctionsEven and Odd Functions
A function is y = f(x) isA function is y = f(x) is eveneven if, for each x in theif, for each x in the
domain of f,domain of f,
f(-x) = f(x)f(-x) = f(x)
A function is y = f(x) isA function is y = f(x) is oddodd if, for each x in theif, for each x in the
domain of f,domain of f,
f(-x) = -f(x)f(-x) = -f(x)
An even function is symmetric about the y-axis.An even function is symmetric about the y-axis.
An odd function is symmetric about the origin.An odd function is symmetric about the origin.
16. Ex. g(x) = xEx. g(x) = x33
- x- x
g(-x) = (-x)g(-x) = (-x)33
– (-x) = -x– (-x) = -x33
+ x =+ x =-(x-(x33
– x)– x)
Therefore, g(x) is odd because f(-x) = -f(x)Therefore, g(x) is odd because f(-x) = -f(x)
Ex. h(x) = xEx. h(x) = x22
+ 1+ 1
h(-x) = (-x)h(-x) = (-x)22
+ 1 = x+ 1 = x22
+ 1+ 1
h(x) is even because f(-x) = f(x)h(x) is even because f(-x) = f(x)
17. 17
CompositionComposition
TheThe compositioncomposition of two functions g:Aof two functions g:A→→B andB and
f:Bf:B→→C, denoted by fC, denoted by f°°g, is defined byg, is defined by
(f(f°°g)(a) = f(g(a))g)(a) = f(g(a))
This means thatThis means that
• firstfirst, function g is applied to element a, function g is applied to element a∈∈A,A,
mapping it onto an element of B,mapping it onto an element of B,
• thenthen, function f is applied to this element of, function f is applied to this element of
B, mapping it onto an element of C.B, mapping it onto an element of C.
• ThereforeTherefore, the composite function maps, the composite function maps
from A to C.from A to C.
19. 19
CompositionComposition
Composition of a function and its inverse:Composition of a function and its inverse:
(f(f-1-1
°°f)(x) = ff)(x) = f-1-1
(f(x)) = x(f(x)) = x
The composition of a function and its inverseThe composition of a function and its inverse
is theis the identity functionidentity function i(x) = x.i(x) = x.
20. 20
Floor and Ceiling FunctionsFloor and Ceiling Functions
TheThe floorfloor andand ceilingceiling functions map the realfunctions map the real
numbers onto the integers (numbers onto the integers (RR→→ZZ).).
TheThe floorfloor function assigns to rfunction assigns to r∈∈RR the largestthe largest
zz∈∈ZZ with zwith z ≤≤ r, denoted byr, denoted by rr..
Examples:Examples: 2.32.3 = 2,= 2, 22 = 2,= 2, 0.50.5 = 0,= 0, -3.5-3.5 = -4= -4
TheThe ceilingceiling function assigns to rfunction assigns to r∈∈RR the smallestthe smallest
zz∈∈ZZ with zwith z ≥≥ r, denoted byr, denoted by rr..
Examples:Examples: 2.32.3 = 3,= 3, 22 = 2,= 2, 0.50.5 = 1,= 1, -3.5-3.5 = -3= -3