RELATIONS AND
FUNCTIONS
Introduction
In this Chapter, we will learn how to link pairs of objects from two sets and then
introduce relations between the two objects in the pair. Finally, we will learn
about special relations which will qualify to be functions.
Cartesian Products of Sets
Given two non-empty sets P and Q. The cartesian product P × Q is the set of all
ordered pairs of elements from P and Q, i.e.,
P × Q = { (p,q) : p P, q Q}
If either P or Q is the null set, then P × Q will also be empty set, i.e., P × Q = φ
Example
The two sets A= {a1 , a2 } and B = {b1 , b2 , b3 , b4 }
A × B = {( a1 , b1 ), (a1 , b2 ), (a1 , b3 ), (a1 , b4 ), (a2 , b1 ),
(a2 , b2 ), (a2 , b3 ), (a2 , b4 )}.,
REMARK
(i) Two ordered pairs are equal, if and only if the corresponding first elements
are equal and the second elements are also equal.
(ii) If there are p elements in A and q elements in B, then there will be pq
elements in A × B, i.e., if n(A) = p and n(B) = q, then n(A × B) = pq.
(iii) If A and B are non-empty sets and either A or B is an infinite set, then so
is A × B.
(iv) A × A × A = {(a, b, c) : a, b, c A}. Here (a, b, c) is called an ordered triplet.
QUESTION:
If P = {a, b, c} and Q = {r}, form the sets P × Q and Q × P. Are these two products
equal?
Solution
By the definition of the cartesian product,
P × Q = {(a, r), (b, r), (c, r)} and Q × P = {(r, a), (r, b), (r, c)}
Since, by the definition of equality of ordered pairs, the pair (a, r) is not equal to
the pair (r, a), we conclude that P × Q ≠ Q × P. However, the number of elements in
each set will be the same.
QUESTION:
If R is the set of all real numbers, what do the cartesian products R × R and
R × R × R represent?
Solution
The Cartesian product R × R represents the set R × R={(x, y) : x, y R} which
represents the coordinates of all the points in two dimensional space and the
cartesian product R × R × R represents the set R × R × R ={(x, y, z) : x, y, z R}
which represents the coordinates of all the points in three-dimensional space.
RELATIONS
A relation R from a non-empty set A to a non-empty set B is a subset of the
cartesian product A × B.
Image:
The subset is derived by describing a relationship between the first element and
the second element of the ordered pairs in A × B. The second element is called the
image of the first element.
Domain:
The set of all first elements of the ordered pairs in a relation R from a set A to a
set B is called the domain of the relation R.
Range:
The set of all second elements in a relation R from a set A to a set B is called the
range of the relation R.
Codomain:
The whole set B is called the codomain of the relation R. Note that
range codomain.
REMARK
(i) A relation may be represented algebraically either by the Roster method or by
the Set-builder method.
(ii) An arrow diagram is a visual representation of a relation.
NOTE
The total number of relations that can be defined from a set A to a set B is the
number of possible subsets of A × B. If n(A ) = p and n(B) = q, then n (A × B) = pq
pq
and the total number of relations is 2.
FUNCTIONS
A function f is a relation from a non-empty set A to a non-empty set B such that
the domain of f is A and no two distinct ordered pairs in f have the same first
element.
If f is a function from A to B and (a, b) f, then f (a) = b, where b is called the
image of a under f and a is called the preimage of b under f.
QUESTION:
Let N be the set of natural numbers and the relation R be defined on N such that
R = {(x, y) : y = 2x, x, y N}.
What is the domain, codomain and range of R? Is this relation a function?
Solution
The domain of R is the set of natural numbers N. The codomain is also N. The
range is the set of even natural numbers. Since every natural number n has
one and only one image, this relation is a function.
Real valued function.
A function which has either R or one of its subsets as its range is called a real
valued function. Further, if its domain is also either R or a subset of R, it is called a
real function.
Some functions and their graphs
Identity function
Let R be the set of real numbers. Define the real valued function f : R → R by y =
f(x) = x for each x R. Such a function is called the identity function. Here the
domain and range of f are R. The graph is a straight line . It passes through the
origin.
Y
X’ X
O
Y’
Constant function
X’ X
O
Y’
The graph is a line parallel to x-axis.
Polynomial function
A function f : R → R is said to be polynomial function if for each x in R, y = f (x)
= a0 + a1 x + a2 x2 + ...+ an xn, where n is a non-negative integer and a0 , a1 , a2
,...,an R.
Rational functions
Functions of the type (f(x)) / (g(x)) , where f(x) and g(x) are polynomial
functions of x defined in a domain, where g(x) ≠ 0.
The Modulus function
The function f: R→R defined by f(x) = |x| for each x R is called modulus
function. For each non-negative value of x, f(x) is equal to x. But for negative
values of x, the value of f(x) is the negative of the value of x, i.e.,
f (x) =
{ X,X
-X,X < 0
0
Signum function
{
The function f:R→R defined by
1, if X>0
f (x) = 0, if X=0
-1, if X<0
is called the signum function. The domain of the signum function is R and the
range is the set {–1, 0, 1}.
Greatest integer function
The function f: R → R defined by f(x) = [x], x R assumes the value of the greatest
integer, less than or equal to x. Such a function is called the greatest integer
function.
From the definition of [x], we can see that
[x] = –1 for –1 x<0
[x] = 0 for 0 x<1
[x] = 1 for 1 x<2
[x] = 2 for 2 x < 3 and so on.
Algebra of real functions
Addition of two real functions
Let f : X → R and g : X → R be any two real functions, where X R. Then, we
define (f + g): X → R by (f + g) (x) = f (x) + g (x), for all x X.
Subtraction of a real function from another
Let f : X → R and g: X → R be any two real functions, where X R. Then, we
define (f – g) : X→R by (f–g) (x) = f(x) –g(x), for all x X.
Multiplication by a scalar
Let f : X→R be a real valued function and α be a scalar. Here by scalar, we
mean a real number. Then the product α f is a function from X to R defined
by (α f ) (x) = α f (x), x X.
Multiplication of two real functions
The product (or multiplication) of two real functions f:X→R and g:X→R is a
function fg:X→R defined by (fg) (x) = f(x) g(x), for all x X.
This is also called pointwise multiplication.
Quotient of two real functions
Let f and g be two real functions defined from X→R, where X R. The quotient
of f by g denoted by _f is a function defined by ,
g
( _
( _f
g
(x) =
f(x) , provided g(x) ≠ 0, x
g(x)
X
QUESTION:
If (x + 1, y – 2) = (3,1), find the values of x and y.
Solution:
Since the ordered pairs are equal, the corresponding elements are equal.
Therefore x + 1 = 3 and y – 2 = 1.
Solving we get x = 2 and y = 3
QUESTION:
Let A = {1,2,3}, B = {3,4} and C = {4,5,6}. Find
(i) A × (B C) (ii) (A × B) (A × C)
(iii)A × (B C) (iv) (A × B) (A × C)
Solution:
(i) By the definition of the intersection of two sets, (B C) = {4}.
Therefore, A × (B C) = {(1,4), (2,4), (3,4)}.
(ii) Now (A × B) = {(1,3), (1,4), (2,3), (2,4), (3,3), (3,4)} and (A × C) = {(1,4), (1,5), (1,6),
(2,4), (2,5), (2,6), (3,4), (3,5), (3,6)}
Therefore, (A × B) (A × C) = {(1, 4), (2, 4), (3, 4)}.
(iii) Since, (B C) = {3, 4, 5, 6}, we have A × (B C) = {(1,3), (1,4), (1,5), (1,6), (2,3),
(2,4), (2,5), (2,6), (3,3), (3,4), (3,5), (3,6)}.
(iv) Using the sets A × B and A × C from part (ii) above, we obtain
(A × B) (A × C) = {(1,3), (1,4), (1,5), (1,6), (2,3), (2,4), (2,5), (2,6), (3,3), (3,4), (3,5),
(3,6)}.
QUESTION:
Let A = {1, 2} and B = {3, 4}. Find the number of relations from A to B.
Solution:
We have, A × B = {(1, 3), (1, 4), (2, 3), (2, 4)}. Since n (A×B ) = 4, the number of
4
subsets of A×B is 24. Therefore, the number of relations from A into B will be 2
QUESTION:
Let N be the set of natural numbers and the relation R be defined on N
such that R = {(x, y) : y = 2x, x, y N}. What is the domain, codomain and
range of R? Is this relation a function?
Solution:
The domain of R is the set of natural numbers N. The codomain is also N.
The range is the set of even natural numbers. Since every natural number n
has one and only one image, this relation is a function.
QUESTION:
Examine each of the following relations given below and state in each case,
giving reasons whether it is a function or not?
(i) R = {(2,1),(3,1), (4,2)},
(ii) R = {(2,2),(2,4),(3,3), (4,4)}
(iii) R = {(1,2),(2,3),(3,4), (4,5), (5,6), (6,7)}
Solution:
(i) Since 2, 3, 4 are the elements of domain of R having their unique images,
this relation R is a function.
(ii) Since the same first element 2 corresponds to two different images 2 and 4,
this relation is not a function.
(iii) Since every element has one and only one image, this relation is a function.