RELATION AND FUNCTION
Definition
A relation is a rule that relates values from a set of values (called the domain) to a second set
of values (called the range).
A relation is a set of ordered pairs (x, y).
A function is a relation where each element in the domain is related to only one value in the
range by some rule.
A function is a set of ordered pairs (x, y) such that no two ordered pairs have the same x-value
but different y-values. Using functional notation, we can write f(x) = y, read as
“f of x is equal to y.” In particular, if (1, 2) is an ordered pair associated with the function f,
then we say that f(2) = 1.
Relations can be represented by using ordered pairs, graph, table of values,
mapping diagram and rule or equations. Determine which of the following represents
functions.
1. Ordered Pairs
Example 1. Which of the following relations are functions?
f = (1, 3), (4, 1), (2, 0), (7,2)
g = (3, 2), (4,4), (3, 3), (8, 9)
h = (1, 2), (2, 3), (3, 4), (4, 5)
Solution:
The relations f and h are functions because no two ordered pairs have the
same x-value but different y-values. Meanwhile, g is not a function because
(3,2) and (3, 3) are ordered pairs with the same x-value but different y-
values.
Relations and functions can be represented by mapping diagrams where
the elements of the domain are mapped to the elements of the range using
arrows. In this case, the relation or function is represented by the set of all
the connections represented by the arrows.
Mapping Diagrams
Example 3. Which of the following mapping diagrams represent functions?
Solution.
The relations f and g are functions because each value
in Y is unique for
a specific value of x. The relation h is not a function because there is at
least one element in X for which there is more than one corresponding y-
value. For example, x = 2 corresponds to y = 20 or 40.
A relation between two sets of numbers can be illustrated by a graph in the
Cartesian plane, and that a function passes the vertical line test.
Example 4. Which of the following can be graphs of functions?
The Vertical Line Test
A graph represents a function if and only if each vertical line intersects the graph
at most once.
Solution.
Graphs 2, 3, 4 are graphs of functions while 1 is not because it do not pass the vertical line test.
EVALUATING FUNCTIONS
Evaluating a function means replacing the variable in the function, in this
case x, with a value from the function's domain and computing for the result.
To denote that we are evaluating f at a for some a in the domain of f, we write
f(a).
Example 1. Evaluate the following functions at x = 1.5:
a. f(x) = 3x − 2
b. g(x) = 3x
2 − 4x
c. h(x) = √x + 4
d. r(x) =
2x+1
x−1
e. t(x) = ⌊x⌋ + 1 where is the greatest integer function
Solution:
a. y = 3x − 2 = 3(1.5) − 2 = 4.5 − 2 = 2.5
b. y = 3x
2 − 4x = 3(1.5)
2 − 4(1.5) = 3(2.25) − 6 = 6.75 − 6 = 0.75
c. y = √x + 4 = √1.5 + 4 = √5.5 = 2.34
d. y =
2x+1
x−1
=
2(1.5)+1
1.5−1
=
3+1
0.5
=
4
0.5
=8
e. y = ⌊x⌋ + 1 = ⌊1.5⌋ + 1 = 1 + 1 = 2
Example 2.
17
Evaluate the following functions, where f and q are as defined in
Example 1.
a) f(2x + 1) b) g(4x − 3)
Solution:
a. f(2x + 1) = 3(2x + 1) − 2 = 6x + 3 − 2 = 6x + 1
b. g(4x − 3) = 3(4x − 3)
2 − 4(4x − 3)
= 3(16x
2 − 24x + 9) − 16x + 12
= 48x
2 − 72x + 27 − 16x + 12
= 48x
2 − 88x + 39
Example 3
Evaluate f(a + b) where f(x) = 4x
2 − 3x .
Solution.
f(a + b) = 4(a + b)
2 − 3(a + b) = 4(a
2 + 2ab + b
2
) − 3a − 3b
= 4a
2 − 3a + 8ab − 3b + 4b
2
Example 4
Suppose that s (T) is the top