0% found this document useful (0 votes)
14 views

Lecture 3 Function

Uploaded by

Ayesha Shafiq
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Lecture 3 Function

Uploaded by

Ayesha Shafiq
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Function

RELATIONS, INVERSE AND COMPOSITION OF FUNCTIONS. SOME


IMPORTANT FUNCTIONS
Inverse Functions:

 An inverse function or an anti function is defined as a function, which can


reverse into another function.
 In simple words, if any function “f” takes x to y then, the inverse of “f” will take y
to x.
 If the function is denoted by ‘f’ or ‘F’, then the inverse function is denoted by f-
1
 or F-1
 Let f be a one-to-one correspondence from the set A to the set B.
 The inverse function of f is the function that assigns to an element b belonging to
B the unique element a in A such that f (a) = b. The inverse function of f is
denoted by f−1.
 Hence, f−1(b) = a when
 f (a) = b.
Invertible Functions

 Let f be the function from {a, b, c} to {1, 2, 3}


 such that f (a) = 2, f (b) = 3, and f (c) = 1. Is f invertible, and if it is, what is its
inverse?
Solution:
 The function f is invertible because it is a one-to-one correspondence.
 The inverse function f−1 reverses the correspondence given by f , so f−1(1) = c,
f−1(2) = a, and f−1(3) = b.
 Let f be the function from R to R with f (x) = x2. Is f invertible?
Solution:
 Because f (−2) = f (2) = 4, f is not one-to-one. If an inverse function were
defined,it would have to assign two elements to 4.
 Hence, f is not invertible.
How To Find Inverse?

 Find the inverse for the function f(x) = (3x+2)/(x-1)


Solution:
 First, replace f(x) with y and the function becomes,
 y = (3x+2)/(x-1)
 By replacing x with y we get,
 x = (3y+2)/(y-1)
 Now, solve y in terms of x :
 x (y – 1) = 3y + 2
 => xy – x = 3y +2
 => xy – 3y = 2 + x
 => y (x – 3) = 2 + x
 => y = (2 + x) / (x – 3)
 So, y = f-1(x) = (x+2)/(x-3)
 Find the inverse of the function f(x) = ln(x – 2)
 Solution:
 First, replace f(x) with y
 So, y = ln(x – 2)
 Replace the equation in exponential way , x – 2 = ey
 Now, solving for x,
 x = 2 + ey
 Now, replace x with y and thus, f-1(x) = y = 2 + ey
Composition of functions

 Composition form relationship between functions.


 One function can be given as input to another function.
 Let g be a function from the set A to the set B and let f be a function from the set B
to the set C. The composition of the functions f and g, denoted for all a ∈ A by f ◦
g, is defined by
 (f ◦ g)(a) = f (g(a)).
 Let f and g be the functions from the set of integers to the set of integers
defined by f (x) = 2x + 3 and g(x) = 3x + 2.
 What is the composition of f and g? What is the composition of g and f ?
Solution:
 Both the compositions f ◦ g and g ◦ f are defined.
Moreover,
 (f ◦ g)(x) = f (g(x)) = f (3x + 2) = 2(3x + 2) + 3 = 6x + 7
 And (g ◦ f )(x) = g(f (x)) = g(2x + 3) = 3(2x + 3) + 2 = 6x + 11.
Composition of function doesn’t hold
commutative law
 Remark: Note that even though f ◦ g and g ◦ f are defined for the functions f and g
in
 Example 23, f ◦ g and g ◦ f are not equal. In other words, the commutative law
does not hold for the composition of functions.
Some Important Functions
floor and ceiling
 Let x be a real number.
 The floor function rounds x down to the closest integer less than or equal to x
 The ceiling function rounds x up to the closest integer greater than or equal to x.
Applications of floor and ceiling
function In CS
 The floor and ceiling functions are useful in a wide variety of applications,
including those involving data storage and data transmission.
 Data stored on a computer disk or transmitted over a data network are usually
represented as a string of bytes.
 Each byte is made up of 8 bits. How many bytes are required to encode 100 bits
of data?
 Solution:
 To determine the number of bytes needed, we determine the smallest integer that
is at least as large as the quotient when 100 is divided by 8, the number of bits in a
byte. Consequently,
 100/8 = 12.5 = 13 bytes are required.
Partial Functions

 A program designed to evaluate a function may not produce the correct value of
the function for all elements in the domain of this function.
 For example, a program may not produce a correct value because evaluating the
function may lead to an infinite loop or an overflow.
 Similarly, in abstract mathematics, we often want to discuss functions that are
defined only for a subset of the real numbers, such as 1/x, √x, and arcsin (x).
Example of partial function

 The function f :
Z → R where f (n) = √n is a partial function from Z to R where the domain of
definition is the set of nonnegative integers.
 Note that f is undefined for negative integers.
Assignment 2

 Do questions of exercise( 2.3 page no 153 ) related to all the topic you study in
lecture

You might also like