1.3 RELATIONS AND FUNCTIONS
relation Definition 1.3.1 Given sets A and B, a relation R between A and B is a subset of A B. If
.a; b/ 2 R; we write a Rb and we say a is related to b.
Example 1.3.2
Consider those points .x; y/ in the plane R2 which are related by the condition that
x 2 C y 2 D 4:
p
We note that some values of x are related to more than one value of y; e.g. 1 is related to 3
p p 2 p 2
as well as to 3; since .1/2 C 3 D 4 and .1/2 C 3 D 4. A relation where such a
situation does not occur, is called a function.
function
Definition 1.3.3 A function f : A ! B is a relation between two sets A and B with the property
that, for every a 2 A there exists one and only one element b 2 B such that .a; b/ 2 f:
If .a; b/ 2 f we write f .a/ D b and we say b is the image of a under f , or f maps a to b:
Examples 1.3.4
1. The relation R D .x; y/j x 2 C y 2 D 4; x 2 [ 2; 2]; y 2 [ 2; 2] is not a function since,
p p
as we have seen in Example 1.3.2, 1; 3 2 R and .1; 3/ 2 R:
2. The relation .x; y/j x 2 R; y 2 R; y D x 2 is a function, which we can write as
f : R ! R; f .x/ D x 2 :
domain Given a function f : A ! B, the set A is called the domain of f: The set of all b 2 B for which
there exists an a 2 A such that f .a/ D b is called the image (or the range) of f and is denoted
image by f .A/ : Thus
f .A/ D fb 2 B j f .a/ D b for some a 2 Ag :
We shall often define a function by means of a formula only (without specifying the domain). The
domain of the function is then assumed to consist of all elements for which the formula makes
sense. We denote the domain of f by D f .
, 5 MAT2615/1
Example 1.3.5
Let f be the function defined by
1
f .x/ D :
x
1
Since x
exists for every real number x except for x D 0, the domain of f is the set
Df D R f0g:
Two functions f and g are said to be equal if D f D Dg and f .x/ D g .x/ for every x 2 D f :
Suppose f and g are functions such that Dg D f and g .x/ D f .x/ for every x 2 Dg : Then we restriction
say g is a restriction of f and f is an extension of g: extension
If g is a restriction of f and Dg D A, we say g is f restricted to A and we write
g D f jA:
Consider a function f : A ! B: If the image of A under f is B, then we say that f maps A onto
B. Let us define this concept precisely.
Definition 1.3.6 A function f : A ! B is said to map A onto B if for each b 2 B there is at least onto
one a 2 A such that f .a/ D b; in other words, the equation f .x/ D b has at least one solution.
Remark 1.3.7
A function always maps its domain onto its image.
Given a function f : A ! B, it is often important to be able to determine an a such that f .a/ D b,
for a prescribed b, and to ascertain whether there is only one such value of a. If f maps A onto
B, we know there is at least one such a in A. If there is at most one such a, we say that f is
one-to-one.
Definition 1.3.8 A function f : A ! B is called one-to-one if f .x/ D f .y/ implies that x D y. one-to-one
, 6
Examples 1.3.9
1. Consider the function
f : R ! R; f .x/ D sin x:
The function f maps R into R, but it does not map R onto R since there is, for example ,
no real number x such that sin x D 2:
The image of f is the interval [ 1; 1]. Thus f maps R onto [ 1; 1].
Furthermore, f is not one-to-one, because for each b 2 [ 1; 1] the equation sin x D b has
infinitely many solutions in R:
2. Consider the function
g:[ ; ] ! [ 1; 1]; g .x/ D sin x:
2 2
The function g is a restriction of the function f given in the previous example. It maps the
interval [ 2 ; 2 ] onto the interval [ 1; 1]: Moreover, g is one-to-one, because if
b 2 [1; 1]; the equation sin x D b has one and only one solution in the interval [ 2 ; 2 ];
(namely x D sin 1 b).
It is often useful to compose two functions f and g by first applying g and then applying f to the
output of g.
f g Definition 1.3.10 The composition of two functions f and g (in that order) is the function f g
defined by
. f g/ .x/ D f .g.x//:
The domain of f g consists of all x in the domain of g for which . f g/ .x/ is meaningful.
Remarks 1.3.11
1. If g maps the set A onto the set B and f maps B onto the set C, then f g maps A onto C.
The diagram below illustrates this situation.
g f
A B C
f g
2. For f .g.x// to be defined, g.x/ has to be defined, so x has to be in the domain of g:
Furthermore, f .g.x// has to be defined, so g.x/ has to be in the domain of f:
, 7 MAT2615/1
3. The function g f is usually not the same as the function f g:
Example 1.3.12
Consider the functions f and g given by
p
f .x/ D x and g.x/ D x 2 :
Now
p
.f g/ .x/ D f .g.x// D f x 2 D x 2 D jxj
and
p p 2
.g f / .x/ D g. f .x// D g x D x D x:
Since g.x/ is defined for all x 2 R and f .x 2 / is defined for all x 2 R; the domain of f g is R:
Since f .x/ is defined only for x 0 and g. f .x// is defined for every real number x 0, the
domain of g f is fx 2 R j x 0g :
With each set A we associate a special function, called the identity map on A. This is the function
that maps every element of A to itself.
Definition 1.3.13 The identity map on a set A is the function I A : A ! A defined by identity map
I A .a/ D a for every a 2 A:
The notion of an identity map now allows us to define inverses of certain functions.
Definition 1.3.14 A function f : A ! B has an inverse g : B ! A if
inverse func-
g f D I A and f g D IB : tion
Thus the functions f : A ! B and g : B ! A are inverses of one another if
.g f / .a/ D a for all a 2 A and . f g/ .b/ D b for all b 2 B: