0% found this document useful (0 votes)
25 views25 pages

Relations and Functions: 3/28/2023 Instructor: Shazmina Gull COSC-1103 IUB RYK Campus 3

The document discusses various concepts related to functions including defining functions, types of functions such as injective, surjective and bijective functions. It provides examples and diagrams to illustrate the concepts. Key topics covered include domain and co-domain of a function, range of a function, constant and identity functions.

Uploaded by

Muhammad Akhtar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views25 pages

Relations and Functions: 3/28/2023 Instructor: Shazmina Gull COSC-1103 IUB RYK Campus 3

The document discusses various concepts related to functions including defining functions, types of functions such as injective, surjective and bijective functions. It provides examples and diagrams to illustrate the concepts. Key topics covered include domain and co-domain of a function, range of a function, constant and identity functions.

Uploaded by

Muhammad Akhtar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

RELATIONS AND FUNCTIONS

• EXERCISE:
Which of the relations define functions from X = {2,4,5} to Y={1,2,4,6}.
a. R1 = {(2,4), (4,1)}
b. R2 = {(2,4), (4,1), (4,2), (5,6)}
c. R3 = {(2,4), (4,1), (5,6)}
• SOLUTION :
a. R1 is not a function, because 5 ∈X does not appear as the first element in any ordered pair in R1.
b. R2 is not a function, because the ordered pairs (4,1) and (4,2) have the same first element but
different second elements.
c. R3 defines a function because it satisfy both the conditions of the function that is every element of
X is the first element of some order pair and there is no pair which has the same first order pair but
different second order pair.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 3


FUNCTION
• A function f from a set X to a set Y is a relationship between elements of X and elements of Y such that each
element of X is related to a unique element of Y, and is denoted f : X →Y. The set X is called the domain of f
and Y is called the co-domain of f.

NOTE: The unique element y of Y that is related to x by f is denoted f(x) and is called f of x, or the value of f at
x, or the image of x under f

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 4


ARROW DIAGRAM OF A FUNCTION
• The definition of a function implies that the arrow diagram for a function f has the following two properties:
1. Every element of X has an arrow coming out of it
2. No two elements of X has two arrows coming out of it that point to two different elements of Y.
• EXAMPLE:
• Let X = {a, b, c} and Y={1,2,3,4}.
• Define a function f from X to Y by the arrow diagram.

• You can easily note that the above diagram satisfy the two conditions of a function hence a graph of the
function.
• Note that f(a) = 2, f(b) = 4,and f(c) = 2

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 5


FUNCTIONS AND NONFUNCTIONS
• Which of the arrow diagrams define functions from X = {2,4,5}to Y = {1,2,4,6}.

• The relation given in the diagram (a) is Not a function because there is no arrow coming out of 5∈X to any
element of Y.
• The relation in the diagram (b) is Not a function, because there are two arrows coming out of 4∈X. i.e.,4∈X
is not related to a unique element of Y.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 6


RANGE OF A FUNCTION
• Let f: X→Y. The range of f consists of those elements of Y that are image of elements of X.
• Symbolically, Range of f = {y ∈Y| y = f(x), for some x ∈X}
• NOTE:
1. The range of a function f is always a subset of the co-domain of f.
2. The range of f: X →Y is also called the image of X under f.
3. When y = f(x), then x is called the pre-image of y.
4. The set of all elements of X, that are related to some y ∈Y is called the inverse image of y.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 7


GRAPH OF A FUNCTION
• Let f be a real-valued function of a real variable. i.e. f:R →R. The graph of f is the set of all points (x,y) in the
Cartesian coordinate plane with the property that x is in the domain of f and y = f(x).
• EXAMPLE:
• We have to draw the graph of the function f given by the relation y=x2 in order to draw the graph of the
function we will first take some elements from the domain will see the image of them and then plot then on
the graph as follows
• Graph of y = x2

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 8


FUNCTIONS NOT WELL DEFINED
• Determine whether f is a function from Z to R if

• SOLUTION:
a. f is not well defined since each integer n has two images +n and -n
b. f is not well defined since f(2) and f(-2) are not defined.
c. f is not defined for n < 0 since f then results in imaginary values (not real)
d. f is well defined because each integer has unique (one and only one) image in Runder f.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 9


TYPES OF FUNCTIONS
• Injective or one-to-one function
• Surjective function or onto function
• Bijective function or one-to-one correspondence

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 15


INJECTIVE or ONE-TO-ONE FUNCTION

• Let f: X →Y be a function. f is injective or one-to-one if, and only if, ∀ x1, x2 ∈X,
• If x1 ≠ x2 then f(x1) ≠ f(x2)That is, f is one-to-one if it maps distinct points of the domain into the distinct
points of the co-domain.

• A one-to-one function separates points.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 16


FUNCTION NOT ONE-TO-ONE
• A function f: X →Y is not one-to-one if there exist elements x1 and x2 in such that x1 ≠ x2 but f(x1) =
f(x2).That is, if distinct elements x1 and x2 can found in domain of f that have the same function value.

• A function that is not one-to-one collapses points together

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 17


EXAMPLE
• Which of the arrow diagrams define one-to-one functions?

• SOLUTION:
• f is clearly one-to-one function, because no two different elements of X are mapped onto the same element of
Y.
• g is not one-to-one because the elements a and c are mapped onto the same element 2 of Y.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 18


GRAPH OF ONE-TO-ONE FUNCTION
• A graph of a function f is one-to-one iff every horizontal line intersects the graph in at
• most one point.
• EXAMPLE:

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 19


SURJECTIVE FUNCTION or ONTO FUNCTION
• Let f: X→Y be a function. f is surjective or onto if, and only if, "∀ y∈Y, ∃ x∈X such that
f(x) = y.
• That is, f is onto if every element of its co-domain is the image of some element(s) of its domain i.e., co-
domain of f = range of f

• Each element y in Y equals f(x) for at least one x in X

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 20


FUNCTION NOT ONTO
• A function f:X→Y is not onto iff there exists yε Y such that ∀x εX, f(x) ≠y.
• That is, there is some element in Y that is not the image of any element in X.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 21


EXAMPLE
• Which of the arrow diagrams define onto functions?

• SOLUTION:
• f is not onto because 3 ≠ f(x) for any x in X. g is clearly onto because each element of Y equals g(x) for some
x in X. as 1 = g(c);,2 = g(d);3 = g(a) = g(b)

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 22


GRAPH OF ONTO FUNCTION
• A graph of a function f is onto if every horizontal line intersects the graph in at least one
• point.
• EXAMPLE:

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 23


BIJECTIVE FUNCTION
or
ONE-TO-ONE CORRESPONDENCE
• A function f: X→Y that is both one-to-one (injective) and onto (surjective) is called a bijective function or a
one-to-one correspondence.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 24


EXAMPLE
• The function f: X→Y defined by the arrow diagram is both one-to-one and onto; hence a bijective function.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 25


GRAPH OF BIJECTIVE FUNCTION
• A graph of a function f is bijective if every horizontal line intersects the graph at exactly one point.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 26


IDENTITY FUNCTION ON A SET

• Given a set X, define a function 𝒊𝒙 from X to X by ix(x) = x from all x ∈X.


• The function ix is called the identity function on X because it sends each element of X to itself.
• EXAMPLE:
• Let X = {1,2,3,4}. The identity function ix on X is represented by the arrow diagram

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 27


CONSTANT FUNCTION
• A function f:X→Y is a constant function if it maps (sends) all elements of X to one element of Y i.e. ∀ x ∈X,
f(x) = c, for some c ∈ Y
• EXAMPLE:
• The function f defined by the arrow diagram is constant.

• REMARK:
• 1. A constant function is one-to-one iff its domain is a singleton.
• 2. A constant function is onto iff its co-domain is a singleton.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 28


INVERSE OF A FUNCTION
• A function accepts values, performs operations on these values and generates an output. The inverse function
agrees with the resultant, operates and reaches back to the original function.
• Inverse function is represented by f-1 with regards to the original function f and the domain of the original
function becomes the range of inverse function and the range of the given function becomes the domain of the
inverse function. The graph of the inverse function is obtained by swapping (x, y) with (y, x) with reference to
the line y = x.
• If you consider functions, f and g are inverse, f(g(x)) = g(f(x)) = x. A function that consists of its inverse
fetches the original value.
• Example: f(x) = 2x + 5 = y Then, g(y) = (y-5)/2 = x is the inverse of f(x).
• If the inverse of a function is itself, then it is known as inverse function, denoted by f-1(x).
• A function f : A→B is said to be invertible function if its inverse relation, f-1 is also a function.

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 29


ORDER OF GROWTH CLASSIFICATION

• Constant (1)
• Logarithmic (lg n)
• Linear (n)
• Linearithmic (n lg n)
• Quadratic (n)
• Cubic (n )
• Exponential (2 )

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 30


TYPICAL GROWTH RATE

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 31


TYPICAL GROWTH RATE

3/28/2023 Instructor: Shazmina Gull; COSC-1103; IUB RYK Campus 32

You might also like