Chapter 2
RELATIONS AND FUNCTIONS
$\diamond$ Mathematics is the indispensable instrument of all physical research. – BERTHELOT $\diamond$
2.1 Introduction
A significant aspect of mathematical inquiry centers on the discovery of patterns – discernible connections among variables. Our everyday experiences frequently present various patterns that define relationships, such as those between siblings, parents and children, or instructors and learners. Similarly, within mathematics, numerous relationships are encountered, examples include the relationship where number $m$ is less than number $n$, line $l$ is parallel to line $m$, or set A is a subset of set B. Across all these instances, it is evident that a relationship necessitates ordered pairings of elements. This chapter will explore methods for associating elements from distinct sets, subsequently introducing the concept of relations between these paired elements. Ultimately, we will delve into specific types of relations that meet the criteria to be classified as functions. The notion of a function holds considerable importance in mathematics due to its capacity to represent a mathematically exact correspondence between one quantity and another.
G. W. Leibniz (1646–1716)
2.2 Cartesian Products of Sets
Let us consider set A, comprising two distinct colours, and set B, consisting of three specific items. Specifically,
$ \mathbf{A} = {\text{red}, \text{blue}} \text{ and } \mathbf{B} = {b, c, s}, $
where $b$ denotes a bag, $c$ a coat, and $s$ a shirt. The question arises: how many unique combinations of coloured items can be formed from these two sets? By systematically enumerating the possibilities, we identify 6 unique ordered pairs, as follows:
$ (\text{red}, b), (\text{red}, c), (\text{red}, s), (\text{blue}, b), (\text{blue}, c), (\text{blue}, s). $
This process yields 6 unique resultant entities (Fig 2.1).
It is pertinent to recall from prior instruction that an ordered pair, formed from elements originating from any two sets, denoted as $\mathbf{P}$ and $\mathbf{Q}$, constitutes a grouping of elements enclosed within parentheses and arranged in a specific sequence. This is typically represented as $(p,q)$, where $p \in \mathrm{P}$ and $q \in \mathrm{Q}$. This foundational concept naturally leads to the subsequent formal definition:
Fig 2.1
Definition 1 Consider two sets, $\mathrm{P}$ and $\mathrm{Q}$, neither of which is empty. The Cartesian product, denoted as $\mathrm{P} \times \mathrm{Q}$, is defined as the collection of all possible ordered pairs where the first element is drawn from $\mathrm{P}$ and the second from $\mathrm{Q}$. Formally, this is expressed as:
$ \mathrm {P} \times \mathrm {Q} = \left{\left(p, q\right): p \in \mathrm {P}, q \in \mathrm {Q} \right} $
It is important to note that should either set $\mathrm{P}$ or set $\mathrm{Q}$ be the empty set (null set), their Cartesian product, $\mathrm{P} \times \mathrm{Q}$, will consequently also be an empty set; i.e., $\mathrm{P} \times \mathrm{Q} = \phi$.
Referencing the preceding illustration, we observe that the Cartesian product of A and B is:
$ \mathrm {A} \times \mathrm {B} = \left{\left(\operatorname {r e d}, b\right), \left(\operatorname {r e d}, c\right), \left(\operatorname {r e d}, s\right), \left(\operatorname {b l u e}, b\right), \left(\operatorname {b l u e}, c\right), \left(\operatorname {b l u e}, s\right) \right}. $
Let us now examine a further example involving two sets:
Set $\mathrm{A} = {\mathrm{DL}, \mathrm{MP}, \mathrm{KA}}$, where DL, MP, and KA denote the Indian states of Delhi, Madhya Pradesh, and Karnataka, respectively. Set $\mathrm{B} = {01, 02, 03}$ contains numerical codes associated with vehicle licence plates issued by these states.
Supposing these three states — Delhi, Madhya Pradesh, and Karnataka — were to generate licence plate codes under the constraint that each code must commence with an element from set A, what are the possible ordered pairs that can be formed from these sets, and what is their total count (Fig 2.2)?
Fig 2.2
The resultant ordered pairs are: (DL,01), (DL,02), (DL,03), (MP,01), (MP,02), (MP,03), (KA,01), (KA,02), (KA,03). The Cartesian product of set A and set B is consequently defined as:
$ \mathrm {A} \times \mathrm {B} = \left{\left(\mathrm {D L}, 0 1\right), \left(\mathrm {D L}, 0 2\right), \left(\mathrm {D L}, 0 3\right), \left(\mathrm {M P}, 0 1\right), \left(\mathrm {M P}, 0 2\right), \left(\mathrm {M P}, 0 3\right), \left(\mathrm {K A}, 0 1\right), \left(\mathrm {K A}, 0 2\right), \left(\mathrm {K A}, 0 3\right) \right}. $
When considering a Cartesian product involving two sets, each containing three distinct elements, it becomes evident that nine ordered pairs will be generated. These nine pairs can function as unique codes. A critical aspect to observe is the non-commutative nature of these pairings; that is, the sequence in which elements are combined is determinative. For instance, the ordered pair (DL, 01) is fundamentally distinct from (01, DL).
To provide a conclusive example, let us examine two sets: $\mathrm{A} = {a_1, a_2}$ and
$ \mathrm {B} = \left{b _ {1}, b _ {2}, b _ {3}, b _ {4} \right} (\text{Fig 2.3}). $
$ \mathrm {A} \times \mathrm {B} = \left{\left(a _ {1}, b _ {1}\right), \left(a _ {1}, b _ {2}\right), \left(a _ {1}, b _ {3}\right), \left(a _ {1}, b _ {4}\right), \left(a _ {2}, b _ {1}\right), \left(a _ {2}, b _ {2}\right), (a _ {2}, b _ {3}), (a _ {2}, b _ {4}) \right}. $
These resultant eight ordered pairs possess the capacity to denote specific planar coordinates, contingent upon sets A and B being subsets of the real numbers. It is self-evident that a point located at $(a_{1},b_{2})$ is unequivocally distinguishable from a point situated at $(b_{2},a_{1})$.
Fig 2.3
Remarks
(i) The equivalence of two ordered pairs is contingent upon the equality of their respective first components and, similarly, their second components.
(ii) Should set A contain $p$ elements and set B contain $q$ elements, their Cartesian product, $A \times B$, will comprise $pq$ elements. Formally, if $n(A) = p$ and $n(B) = q$, then $n(A \times B) = pq$. (iii) For any two non-empty sets A and B, if either A or B possesses an infinite number of elements, then their Cartesian product $A \times B$ will also be infinite. (iv) The triple Cartesian product $A \times A \times A$ is defined as the set of all ordered triplets $(a, b, c)$ where each component $a, b, c$ is an element of set A. An element of this form, $(a, b, c)$, is referred to as an ordered triplet.
Example 1 If $(x + 1, y - 2) = (3, 1)$, find the values of $x$ and $y$.
Solution Given the equality of the ordered pairs, it follows that their corresponding components must be equivalent.
Therefore $x + 1 = 3$ and $y - 2 = 1$.
Solving we get $x = 2$ and $y = 3$.
Example 2 If $P = {a, b, c}$ and $Q = {r}$, form the sets $P \times Q$ and $Q \times P$.
Are these two products equal?
Solution In accordance with the definition of the Cartesian product, we derive:
$ P \times Q = {(a, r), (b, r), (c, r) } \text{ and } Q \times P = {(r, a), (r, b), (r, c)} $
As per the established definition for the equality of ordered pairs, the pair $(a, r)$ is distinct from $(r, a)$. Consequently, it is deduced that $P \times Q \neq Q \times P$.
Nevertheless, the cardinality of both resulting sets remains identical.
Example 3 Let $A = {1,2,3}$, $B = {3,4}$ and $C = {4,5,6}$. Find
(i) $A \times (B \cap C)$ (ii) $(A \times B) \cap (A \times C)$ (iii) $A \times (B \cup C)$ (iv) $(A \times B) \cup (A \times C)$
Solution (i) Applying the definition of set intersection, we find that $(B \cap C)$ evaluates to ${4}$.
Therefore, $A \times (B \cap C) = {(1,4), (2,4), (3,4)}$.
(ii) Initially, we determine the Cartesian products: $(A \times B) = {(1,3), (1,4), (2,3), (2,4), (3,3), (3,4)}$
and $(A \times C) = {(1,4), (1,5), (1,6), (2,4), (2,5), (2,6), (3,4), (3,5), (3,6)}$
Therefore, $(A \times B) \cap (A \times C) = {(1, 4), (2, 4), (3, 4)}$.
(iii) Given that the union $(B \cup C)$ yields ${3, 4, 5, 6}$, we proceed to calculate:
$ \begin{array}{l} A \times (B \cup 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)}. \end{array} $
(iv) Utilizing the previously computed sets $A \times B$ and $A \times C$ from subpart (ii), we arrive at:
$ \begin{array}{l} (A \times B) \cup (A \times 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)}. \end{array}
$
Example 4 If $\mathrm{P} = {1,2}$, form the set $\mathrm{P} \times \mathrm{P} \times \mathrm{P}$.
Solution The triple Cartesian product is determined as: $\mathrm{P} \times \mathrm{P} \times \mathrm{P} = {(1,1,1), (1,1,2), (1,2,1), (1,2,2), (2,1,1), (2,1,2), (2,2,1), (2,2,2)}$.
Example 5 If $\mathbf{R}$ is the set of all real numbers, what do the Cartesian products $\mathbf{R} \times \mathbf{R}$ and $\mathbf{R} \times \mathbf{R} \times \mathbf{R}$ represent?
Solution The Cartesian product $\mathbf{R} \times \mathbf{R}$ is defined as the set $\mathbf{R} \times \mathbf{R} = {(x, y) : x, y \in \mathbf{R}}$, which geometrically corresponds to the coordinates of all points within a two-dimensional plane. Similarly, the Cartesian product $\mathbf{R} \times \mathbf{R} \times \mathbf{R}$ is expressed as $\mathbf{R} \times \mathbf{R} \times \mathbf{R} = {(x, y, z) : x, y, z \in \mathbf{R}}$, representing the coordinates of all points in a three-dimensional space.
Example 6 Given that $\mathrm{A} \times \mathrm{B} = {(p, q), (p, r), (m, q), (m, r)}$, determine sets A and B.
Solution Set A represents the collection of all first coordinates: $\mathrm{A} = {p, m}$. Set B represents the collection of all second coordinates: $\mathrm{B} = {q, r}$.
EXERCISE 2.1
Determine the values of $x$ and $y$ given the equality $\left(\frac{x}{3} + 1, y - \frac{2}{3}\right) = \left(\frac{5}{3}, \frac{1}{3}\right)$.
Given that set A contains 3 elements and set $\mathrm{B} = {3, 4, 5}$, ascertain the cardinality of the Cartesian product $(\mathrm{A} \times \mathrm{B})$.
For the sets $\mathrm{G} = {7, 8}$ and $\mathrm{H} = {5, 4, 2}$, compute both $\mathrm{G} \times \mathrm{H}$ and $\mathrm{H} \times \mathrm{G}$.
For each of the subsequent assertions, indicate whether it is true or false. Should a statement be false, reformulate it accurately.
(i) Assuming $\mathrm{P} = {m, n}$ and $\mathrm{Q} = {n, m}$, then $\mathrm{P} \times \mathrm{Q} = {(m, n), (n, m)}$.
(ii) In the event that A and B are non-empty sets, it follows that $\mathrm{A} \times \mathrm{B}$ constitutes a non-empty collection of ordered pairs $(x, y)$ where $x \in \mathrm{A}$ and $y \in \mathrm{B}$.
(iii) Given $\mathrm{A} = {1, 2}$ and $\mathrm{B} = {3, 4}$, the Cartesian product $\mathrm{A} \times (\mathrm{B} \cap \phi)$ equals $\phi$.
For the set $\mathrm{A} = {-1, 1}$, determine the triple Cartesian product $\mathrm{A} \times \mathrm{A} \times \mathrm{A}$.
Given $\mathrm{A} \times \mathrm{B} = {(a, x), (a, y), (b, x), (b, y)}$, identify sets A and B.
Consider the sets $\mathrm{A} = {1, 2}$, $\mathrm{B} = {1, 2, 3, 4}$, $\mathrm{C} = {5, 6}$, and $\mathrm{D} = {5, 6, 7, 8}$. Demonstrate the validity of the following:
(i) $\mathrm{A} \times (\mathrm{B} \cap \mathrm{C}) = (\mathrm{A} \times \mathrm{B}) \cap (\mathrm{A} \times \mathrm{C})$.
(ii) $\mathrm{A} \times \mathrm{C} \subseteq \mathrm{B} \times \mathrm{D}$.
Given $\mathrm{A} = {1, 2}$ and $\mathrm{B} = {3, 4}$, enumerate the elements of $\mathrm{A} \times \mathrm{B}$. Subsequently, determine the total number of subsets for $\mathrm{A} \times \mathrm{B}$ and provide a complete listing of these subsets.
Suppose A and B are two sets where $n(\mathrm{A}) = 3$ and $n(\mathrm{B}) = 2$. If $(x, 1), (y, 2), (z, 1)$ are members of $\mathrm{A} \times \mathrm{B}$, identify sets A and B, given that $x, y,$ and $z$ are distinct elements.
The Cartesian product $\mathrm{A} \times \mathrm{A}$ contains 9 elements, including $(-1, 0)$ and $(0, 1)$. Determine set $\mathrm{A}$ and all other elements belonging to $\mathrm{A} \times \mathrm{A}$.
2.3 Relations
Let's examine two distinct sets, $\mathrm{P} = {a, b, c}$ and $\mathrm{Q} = {\mathrm{Ali}, \mathrm{Bhanu}, \mathrm{Binoy}, \mathrm{Chandra}, \mathrm{Divya}}$.
The Cartesian product of P and Q comprises fifteen ordered pairs, expressible as $\mathrm{P} \times \mathrm{Q} = {(a, \mathrm{Ali}), (a, \mathrm{Bhanu}), (a, \mathrm{Binoy}), \dots, (c, \mathrm{Divya})}$.
A subset of $\mathrm{P} \times \mathrm{Q}$ can be formed by defining a relation $\mathbf{R}$ that connects the initial element $x$ with the subsequent element $y$ within each ordered pair $(x, y)$, as follows:
$\mathrm{R} = {(x,y): x \text{ is the first letter of the name } y, x \in \mathrm{P}, y \in \mathrm{Q}}$.
Then $\mathrm{R} = {(a, \mathrm{Ali}), (b, \mathrm{Bhanu}), (b, \mathrm{Binoy}), (c, \mathrm{Chandra})}$
Figure 2.4 illustrates this relation $\mathbf{R}$ visually through an arrow diagram.
Fig 2.4
Definition 2 A relation $\mathbf{R}$, mapping from a non-empty set $\mathbf{A}$ to a non-empty set $\mathbf{B}$, constitutes a subset of the Cartesian product $\mathbf{A} \times \mathbf{B}$. This specific subset is formed by establishing a correspondence between the initial and terminal elements of the ordered pairs within $\mathbf{A} \times \mathbf{B}$. The latter element is referred to as the image of the former.
Definition 3 The domain of a relation $\mathbf{R}$, which maps from set $\mathbf{A}$ to set $\mathbf{B}$, is defined as the collection of all first elements found in the ordered pairs comprising $\mathbf{R}$.
Definition 4 For a relation $\mathbf{R}$ extending from set $\mathbf{A}$ to set $\mathbf{B}$, its range is defined as the aggregate of all second elements present in its ordered pairs. The entire set $\mathbf{B}$ is designated as the codomain of relation $\mathbf{R}$. It is important to note that the range is a subset of the codomain (range $\subset$ codomain).
Remarks
(i) Relations can be expressed algebraically using either the Roster method or the Set-builder method. (ii) An arrow diagram serves as a graphical depiction of a relation.
Example 7 Consider set $\mathrm{A} = {1,2,3,4,5,6}$. Establish a relation $\mathbf{R}$ from $\mathbf{A}$ to $\mathbf{A}$ such that $\mathrm{R} = {(x,y):y = x + 1}$.
(i) Depict this relation using an arrow diagram. (ii) Write down the domain, codomain and range of $\mathbf{R}$.
Solution
(i) According to the stipulated definition of the relation,
$ \mathbf {R} = {(1, 2), (2, 3), (3, 4), (4, 5), (5, 6) }.
$
Figure 2.5 presents the corresponding arrow diagram.
(ii) It is evident that the domain is given by ${1,2,3,4,5,6}$. Likewise, the range is ${2, 3, 4, 5, 6}$, and the codomain is ${1, 2, 3, 4, 5, 6}$.
Fig 2.5
Example 8 Figure 2.6 illustrates a relation established between sets P and Q. Express this relation (i) in set-builder notation and (ii) in roster form. Furthermore, identify its domain and range.
The given solution establishes that the relation R is defined by the condition "x is the square of y".
(i) Expressed in set-builder notation, the relation is: $\mathrm{R} = {(x,y):x$ is the square of $y,x\in \mathrm{P},y\in \mathbf{Q}}$ (ii) When enumerated in roster form, the relation is: $\mathrm{R} = {(9,3), (9,-3), (4,2), (4,-2), (25,5), (25,-5)}$
The collection of all first components, representing the domain of this relation, is ${4,9,25}$.
The collection of all second components, forming the range of this relation, is ${-2, 2, -3, 3, -5, 5}$.
It should be observed that the element 1 from set $\mathbf{P}$ does not correspond to any element within the defined relation.
The entirety of set $\mathbf{Q}$ serves as the codomain for this relation.
Fig 2.6
Principle: The aggregate count of distinct relations that can be formulated from a set A to a set B corresponds precisely to the number of potential subsets derivable from the Cartesian product $\mathrm{A} \times \mathrm{B}$. Should the cardinality of set A be $p$ (i.e., $n(\mathrm{A}) = p$) and the cardinality of set B be $q$ (i.e., $n(\mathrm{B}) = q$), then the cardinality of their Cartesian product $n(\mathrm{A} \times \mathrm{B})$ will be $pq$, resulting in a total of $2^{pq}$ possible relations.
Example 9: Consider sets $\mathrm{A} = {1,2}$ and $\mathrm{B} = {3,4}$. Determine the total quantity of relations mapping from A to B.
Solution: We first establish the Cartesian product of the two sets:
$ \mathrm {A} \times \mathrm {B} = {(1, 3), (1, 4), (2, 3), (2, 4) }. $
Given that the cardinality of the Cartesian product $n(\mathrm{A} \times \mathrm{B})$ is 4, the number of distinct subsets that can be formed from $\mathrm{A} \times \mathrm{B}$ is $2^4$. Consequently, the total number of relations possible from set A to set B will be $2^4$.
Commentary: A relation R that maps from set A to itself (i.e., from A to A) is conventionally referred to as a relation on A.
EXERCISE 2.2
Consider the set $\mathrm{A} = {1, 2, 3, \dots, 14}$. A binary relation $\mathrm{R}$ is established from $\mathrm{A}$ to $\mathrm{A}$, defined as $\mathrm{R} = {(x, y) : 3x - y = 0 \text{, where } x, y \in \mathrm{A}}$. Identify its domain, codomain, and range.
On the set $\mathbf{N}$ of natural numbers, define a relation $\mathbf{R}$ as $\mathbf{R} = {(x, y) : y = x + 5, x \text{ is a natural number less than } 4; x, y \in \mathbf{N}}$. Express this relation in roster form. State its domain and range.
Given the sets $\mathrm{A} = {1, 2, 3, 5}$ and $\mathrm{B} = {4, 6, 9}$, establish a relation $\mathrm{R}$ from $\mathrm{A}$ to $\mathrm{B}$ such that $\mathrm{R} = {(x, y) : \text{the difference between } x \text{ and } y \text{ is odd; } x \in \mathrm{A}, y \in \mathrm{B}}$. Present $\mathrm{R}$ in roster notation.
Figure 2.7 illustrates a correspondence between sets P and Q. Express this relation:
(i) in set-builder notation (ii) in roster notation. Furthermore, identify its domain and range.
Fig 2.7
Given the set $\mathrm{A} = {1, 2, 3, 4, 6}$, consider the relation $\mathrm{R}$ defined on $\mathrm{A}$ as follows:
${(a,b)\colon a,b\in \mathrm{A},b$ is exactly divisible by $a}$
(i) Enumerate the elements of R in roster form. (ii) Determine the domain of $\mathbf{R}$. (iii) Ascertain the range of $\mathbf{R}$.
For the relation $\mathbf{R}$ specified by $\mathrm{R} = {(x, x + 5) : x \in {0, 1, 2, 3, 4, 5}}$, identify its domain and range.
Express the relation $\mathrm{R} = {(x, x^3) : x \text{ is a prime number less than } 10}$ using roster notation.
Given sets $\mathrm{A} = {x, y, z}$ and $\mathrm{B} = {1, 2}$, calculate the total count of possible relations from $\mathrm{A}$ to $\mathrm{B}$.
Consider the relation $\mathbf{R}$ on the set of integers $\mathbf{Z}$, defined as $\mathrm{R} = {(a, b) : a, b \in \mathbf{Z}, a - b \text{ is an integer}}$. Determine the domain and range of $\mathbf{R}$.
2.4 Functions
This section is dedicated to the exploration of a particular class of relations known as functions, which stand as a cornerstone in mathematical theory. A function can be conceptualized as an operational rule that generates novel elements from a set of initial inputs. Alternative terminologies, such as 'map' or 'mapping,' are frequently employed to refer to a function.
Definition 5 A relation $f$ connecting a set $A$ to a set $B$ qualifies as a function if and only if each constituent element within set $A$ is uniquely associated with precisely one image element within set $B$.
Alternatively, a function $f$ constitutes a relation originating from a non-empty set $A$ and terminating in a non-empty set $B$, characterized by the condition that its domain is precisely $A$, and no two disparate ordered pairs within $f$ share an identical initial component.
When $f$ represents a function mapping from $A$ to $B$, and the ordered pair $(a, b) \in f$, it follows that $f(a) = b$. In this context, $b$ is designated as the image of $a$ under $f$, while $a$ is referred to as the preimage of $b$ under $f$.
The notation $f: \mathrm{A} \to \mathrm{B}$ is employed to signify a function $f$ that maps elements from set A to set B.
Referencing the preceding examples, it becomes evident that the relation presented in Example 7 does not satisfy the criteria for a function, given that the element 6 lacks a corresponding image.
Furthermore, the relation illustrated in Example 8 fails to qualify as a function due to certain domain elements being associated with multiple images. Likewise, the relation in Example 9 is also not a function. (Can you explain why?) The subsequent examples will showcase a variety of relations, distinguishing those that fulfill the definition of a function from those that do not.
Example 10 Consider $\mathbf{N}$ as the collection of natural numbers, and let the relation $\mathbf{R}$ be established over $\mathbf{N}$ such that $\mathbf{R}$ comprises all ordered pairs $(x, y)$ where $y = 2x$, with both $x$ and $y$ belonging to $\mathbf{N}$.
What is the domain, codomain and range of R? Is this relation a function?
Solution The domain for R is the complete set of natural numbers, denoted by N. The codomain similarly corresponds to N. The range encompasses all even natural numbers.
Given that each natural number $n$ possesses a singular, unique image, this relation consequently satisfies the criteria for a function.
Example 11 Examine each of the following relations given below and state in each case, giving reasons whether it is a function or not?
(i) $\mathrm{R} = {(2,1),(3,1),(4,2)}$,
(ii) $\mathrm{R} = {(2,2),(2,4),(3,3),(4,4)}$
(iii) $\mathrm{R} = {(1,2),(2,3),(3,4),(4,5),(5,6),(6,7)}$
Solution (i) Because the elements 2, 3, and 4, which constitute the domain of R, each possess a distinct and singular image, this relation R is affirmed as a function. (ii) Given that the identical initial element, 2, is associated with two disparate images, namely 2 and 4, this relation does not meet the requirements of a function. (iii) As each element is mapped to precisely one image, this relation is indeed a function.
Definition 6 A function whose range is either the set of real numbers R or a proper subset thereof is termed a real-valued function. Moreover, if its domain similarly consists of R or a subset of R, it is then classified as a real function.
Example 12 Let $\mathbf{N}$ represent the collection of natural numbers. Establish a real-valued function $f: \mathbf{N} \to \mathbf{N}$ defined by the rule $f(x) = 2x + 1$. Utilizing this definition, populate the following table.
| x | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| y | f(1) = ... | f(2) = ... | f(3) = ... | f(4) = ... | f(5) = ... | f(6) = ... | f(7) = ... |
Solution The completed table is given by
| x | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| y | f(1) = 3 | f(2) = 5 | f(3) = 7 | f(4) = 9 | f(5) = 11 | f(6) = 13 | f(7) = 15 |
2.4.1 Some functions and their graphs
(i) Identity function Consider $\mathbf{R}$ to be the collection of all real numbers. A real-valued function $f\colon \mathbf{R} \to \mathbf{R}$ defined by the rule $y = f(x) = x$ for every $x \in \mathbf{R}$ is known as the identity function. Both the domain and the range of this function $f$ are $\mathbf{R}$. Its graphical representation is a straight line, depicted in Fig 2.8, which traverses through the origin.
Fig 2.8
(ii) Constant function A function $f \colon \mathbf{R} \to \mathbf{R}$ is characterized by $y = f(x) = c$ for all $x \in \mathbf{R}$, where $c$ represents a fixed constant. In this instance, the domain of $f$ is $\mathbf{R}$, while its range is the singleton set ${c}$.
Fig 2.9
The graphical representation of such a function is a straight line that runs parallel to the $x$-axis. For illustration, if $f(x) = 3$ for every $x \in \mathbf{R}$, its graph will appear as a line depicted in Fig 2.9.
(iii) Polynomial function A function $f \colon \mathbf{R} \to \mathbf{R}$ qualifies as a polynomial function if, for every $x$ within $\mathbf{R}$, its output $y$ can be expressed as $f(x) = a_0 + a_1x + a_2x^2 + \ldots + a_nx^n$. Here, $n$ must be a non-negative integer, and the coefficients $a_0, a_1, a_2, \ldots, a_n$ must all belong to $\mathbf{R}$.
Functions such as $f(x) = x^3 - x^2 + 2$ and $g(x) = x^4 + \sqrt{2} x$ serve as illustrations of polynomial functions. Conversely, the function $h$ defined by $h(x) = x^{\frac{2}{3}} + 2x$ does not constitute a polynomial function. (Can you explain why?)
Example 13 Let's define the function $f \colon \mathbf{R} \to \mathbf{R}$ using the rule $y = f(x) = x^2$ for all $x \in \mathbf{R}$. Using this definition, populate the provided table. Identify the domain and range of this function, and subsequently sketch its graph.
| x | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|---|---|---|---|
| y=f(x)=x2 |
Solution The table, once completed, is presented below:
| x | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|---|---|---|---|
| y=f(x)=x2 | 16 | 9 | 4 | 1 | 0 | 1 | 4 | 9 | 16 |
The domain of $f$ is specified as ${x : x \in \mathbf{R}}$. The range of $f$ is expressed as ${x^2 : x \in \mathbf{R}}$. Figure 2.10 illustrates the graph of $f$.

Example 14 Construct the graph for the function $f: \mathbf{R} \to \mathbf{R}$, which is defined by the rule $f(x) = x^3$ for all $x \in \mathbf{R}$.
Solution Our calculations yield the following values:
$f(0) = 0, f(1) = 1, f(-1) = -1, f(2) = 8, f(-2) = -8, f(3) = 27; f(-3) = -27$, and so forth.
Consequently, the function $f$ can be represented as the set of ordered pairs $f = {(x,x^3):x\in \mathbf{R}}$.
Figure 2.11 displays the graphical representation of $f$.
Fig 2.11
(iv) Functions classified as rational are those expressible in the form $\frac{f(x)}{g(x)}$, provided that $f(x)$ and $g(x)$ are polynomial functions of $x$ and that $g(x)$ is non-zero within the specified domain.
Example 15 Consider the real-valued function $f \colon \mathbf{R} - {0} \to \mathbf{R}$ specified by the rule $f(x) = \frac{1}{x}$, for $x \in \mathbf{R} - {0}$. Using this definition, populate the table provided below. Determine the domain and range of this particular function.
| x | -2 | -1.5 | -1 | -0.5 | 0.25 | 0.5 | 1 | 1.5 | 2 |
|---|---|---|---|---|---|---|---|---|---|
| y = 1/x | ... | ... | ... | ... | ... | ... | ... | ... | ... |
Solution The table, once completed, is presented as follows:
| x | -2 | -1.5 | -1 | -0.5 | 0.25 | 0.5 | 1 | 1.5 | 2 |
|---|---|---|---|---|---|---|---|---|---|
| y = 1/x | -0.5 | -0.67 | -1 | -2 | 4 | 2 | 1 | 0.67 | 0.5 |
This function's domain encompasses all real numbers excluding zero, and similarly, its range comprises all real numbers except zero. Figure 2.12 illustrates the graph of $f$.
Fig 2.12
(v) The Modulus Function The modulus function is defined as $f\colon \mathbf{R}\to \mathbf{R}$ by $f(x) = |x|$ for all $x\in \mathbf{R}$. When $x$ is non-negative, $f(x)$ takes the value of $x$. However, if $x$ is negative, $f(x)$ assumes the value of the negative of $x$; specifically:
$ f (x) = \left{ \begin{array}{l} x, x \geq 0 \ - x, x < 0 \end{array} \right. $
The graphical representation of the modulus function can be observed in Figure 2.13.
Fig 2.13
(vi) Signum Function The function $f: \mathbf{R} \to \mathbf{R}$ is characterized by the following definition:
$ f (x) = \left{ \begin{array}{l} 1, \text { if } x > 0 \ 0, \text { if } x = 0 \ - 1, \text { if } x < 0 \end{array} \right.
$
This is referred to as the signum function. Its domain spans all real numbers ($\mathbf{R}$), while its range is explicitly the set ${-1, 0, 1}$. Figure 2.14 depicts the graph of the signum function.
Fig 2.14
(vii) Greatest Integer Function The function $f\colon \mathbf{R}\to \mathbf{R}$, defined as $f(x) = [x]$ for any $x\in \mathbf{R}$, yields the largest integer that is less than or equal to $x$. This type of function is known as the greatest integer function.
Based on the definition of $[x]$, it can be observed that:
$ [ x ] = - 1 \text { for } - 1 \leq x < 0 $
$ [ x ] = 0 \text { for } 0 \leq x < 1 $
$ [ x ] = 1 \text { for } 1 \leq x < 2 $
$ [ x ] = 2 \text { for } 2 \leq x < 3 \text { and } $
and so forth.
The corresponding graph for this function is presented in Figure 2.15.
Fig 2.15
2.4.2 Algebra of real functions
This section is dedicated to exploring the fundamental algebraic operations applicable to real functions. Specifically, we will examine the processes of combining two real functions through addition, performing subtraction of one real function from another, scaling a real function by a scalar quantity (understood as a real number), executing the multiplication of two real functions, and determining the quotient of one real function by another.
(i) Summation of two real functions Consider two arbitrary real functions, $f \colon \mathrm{X} \to \mathbf{R}$ and $g \colon \mathrm{X} \to \mathbf{R}$, where $\mathrm{X}$ is a subset of $\mathbf{R}$. The addition of these functions, denoted as $(f + g) \colon \mathrm{X} \to \mathbf{R}$, is formally defined by the expression:
$ (f + g) (x) = f (x) + g (x), \text {for all} x \in \mathrm {X}. $
(ii) Subtraction of one real function from another Given two real functions, $f \colon X \to \mathbf{R}$ and $g \colon X \to \mathbf{R}$, both defined on a domain $X \subset \mathbf{R}$, their difference, $(f - g) : X \to \mathbf{R}$, is established through the relation $(f - g)(x) = f(x) - g(x)$, applicable for all $x \in X$.
(iii) Scalar Multiplication Let $f \colon X \to \mathbf{R}$ represent a real-valued function, and let $\alpha$ denote a scalar, which in this context signifies a real number. The resultant product, $\alpha f$, constitutes a function mapping from $X$ to $\mathbf{R}$, formulated as $(\alpha f)(x) = \alpha f(x)$, for any $x \in X$.
(iv) Product of two real functions The operation of multiplying two real functions, $f \colon X \to \mathbf{R}$ and $g \colon X \to \mathbf{R}$, yields a new function $fg \colon X \to \mathbf{R}$. This function is precisely defined by the expression $(fg)(x) = f(x)g(x)$, valid for all $x \in X$.
This is also called pointwise multiplication.
(v) Division of two real functions Consider $f$ and $g$ as two real functions mapping from $X \to \mathbf{R}$, with $X$ being a subset of $\mathbf{R}$. The quotient of $f$ divided by $g$, symbolized as $\frac{f}{g}$, is a function established by the formula $\left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}$, under the essential condition that $g(x) \neq 0$ for any $x \in X$.
Example 16 Given two real functions, $f(x) = x^2$ and $g(x) = 2x + 1$, determine the expressions for:
$ (f + g)(x), (f - g)(x), (fg)(x), \left(\frac{f}{g}\right)(x). $
Solution We have,
$ (f + g)(x) = x^2 + 2x + 1, \quad (f - g)(x) = x^2 - 2x - 1, $
$ (fg)(x) = x^2(2x + 1) = 2x^3 + x^2, \quad \left(\frac{f}{g}\right)(x) = \frac{x^2}{2x + 1}, \quad x \neq -\frac{1}{2} $
Example 17 For two functions, $f(x) = \sqrt{x}$ and $g(x) = x$, both specified for the domain of non-negative real numbers, compute the following expressions: $(f + g)(x), (f - g)(x), (fg)(x)$ and $\left(\frac{f}{g}\right)(x)$.
Solution We have
$ (f + g)(x) = \sqrt{x} + x, \quad (f - g)(x) = \sqrt{x} - x, $
$ (fg)(x) = \sqrt{x}(x) = x^{\frac{3}{2}} \quad \text{and} \quad \left(\frac{f}{g}\right)(x) = \frac{\sqrt{x}}{x} = x^{-\frac{1}{2}}, \quad x \neq 0 $
EXERCISE 2.3
For each of the subsequent relations, identify whether it constitutes a function. Justify your determination. Should a relation be classified as a function, delineate its domain and range.
(i) ${(2,1),(5,1),(8,1),(11,1),(14,1),(17,1)}$ (ii) ${(2,1),(4,2),(6,3),(8,4),(10,5),(12,6),(14,7)}$ (iii) ${(1,3),(1,5),(2,5)}$
Ascertain the domain and range for each of the subsequent real-valued functions:
(i) $f(x) = -\left|x\right|$
(ii) $f(x) = \sqrt{9 - x^2}$ .
Given the function $f$ defined as $f(x) = 2x - 5$, determine the values of:
(i) $f(0)$ (ii) $f(7)$ (iii) $f(-3)$ .
A function, denoted $t$, establishes a mapping from temperatures expressed in degrees Celsius to their equivalent values in degrees Fahrenheit, formally defined as $t(\mathbf{C}) = \frac{9\mathbf{C}}{5} + 32$ .
Calculate: (i) $t(0)$ (ii) $t(28)$ (iii) $t(-10)$ (iv) The specific value of $C$ for which $t(C) = 212$ .
Determine the range for each of the subsequent functions.
(i) $f(x) = 2 - 3x, x \in \mathbf{R}, x > 0.$ (ii) $f(x) = x^{2} + 2, x$ is a real number. (iii) $f(x) = x, x$ is a real number.
Miscellaneous Examples
Example 18 Consider $\mathbf{R}$ to represent the aggregate of all real numbers.
Establish the real-valued function
$ f: \mathbf {R} \rightarrow \mathbf {R} \text { by } f (x) = x + 1 0 $
and subsequently illustrate its graphical representation.
Solution For this function, we observe that $f(0) = 10, f(1) = 11, f(2) = 12, \ldots, f(10) = 20$, and so forth. Similarly, $f(-1) = 9, f(-2) = 8, \dots, f(-10) = 0$, continuing in this manner.
Consequently, the graphical representation of the specified function exhibits the configuration depicted in Figure 2.16.
Remark A function $f$ expressed in the form $f(x) = mx + c$, for $x \in \mathbf{R}$, is termed a linear function, where $m$ and $c$ are fixed constants. The function presented above serves as an instance of a linear function.
Fig 2.16
Example 19 Let $\mathbf{R}$ denote a relation established between elements of $\mathbf{Q}$ and $\mathbf{Q}$, formally specified as $\mathbf{R} = {(a,b) : a,b \in \mathbf{Q} \text{ and } a - b \in \mathbf{Z}}$. Demonstrate that:
(i) $(a,a)\in \mathbb{R}$ for all $a\in \mathbf{Q}$ (ii) $(a,b)\in \mathbb{R}$ implies that $(b,a)\in \mathbb{R}$ (iii) $(a,b)\in \mathbb{R}$ and $(b,c)\in \mathbb{R}$ implies that $(a,c)\in \mathbb{R}$
Solution (i) Given that $a - a = 0$, which is an element of $\mathbf{Z}$, it logically follows that $(a, a) \in \mathbb{R}$ . (ii) If $(a,b)\in \mathbb{R}$, this signifies that $a - b\in \mathbf{Z}$. Consequently, $b - a$ must also be an element of $\mathbf{Z}$. Hence, it can be concluded that $(b,a)\in \mathbb{R}$. (iii) The conditions $(a, b) \in \mathbb{R}$ and $(b, c) \in \mathbb{R}$ imply that $a - b \in \mathbf{Z}$ and $b - c \in \mathbf{Z}$. Thus, their sum, $a - c = (a - b) + (b - c)$, must also be an element of $\mathbf{Z}$. This leads to the conclusion that $(a, c) \in \mathbb{R}$.
Example 20 Consider $f = {(1,1), (2,3), (0, -1), (-1, -3)}$ as a linear function mapping from the set of integers $\mathbf{Z}$ to $\mathbf{Z}$. Determine the explicit form of $f(x)$.
Solution Given that $f$ is a linear function, its general form is $f(x) = mx + c$. Furthermore, because the points $(1, 1)$ and $(0, -1)$ are elements of the function's graph, we have $f(1) = m + c = 1$ and $f(0) = c = -1$. Solving these equations yields $m = 2$, thereby establishing the function as $f(x) = 2x - 1$.
Example 21 Determine the domain for the function defined by $f(x) = \frac{x^2 + 3x + 5}{x^2 - 5x + 4}$ .
Solution Given that $x^2 - 5x + 4$ can be factorized into $(x - 4)(x - 1)$, the function $f$ is defined for all real values of $x$ except those that would make this expression zero. These values are $x = 4$ and $x = 1$. Therefore, the domain of $f$ comprises all real numbers excluding the set ${1, 4}$, expressed as $\mathbf{R} - {1, 4}$.
Example 22 Consider the function $f$ defined piecewise as:
$ f (x) = \left{ \begin{array}{l} 1 - x, x < 0 \ 1, x = 0 \ x + 1, x > 0 \end{array} \right. $
Illustrate the graph of $f(x)$.
Solution For the segment where $x < 0$, the function is given by $f(x) = 1 - x$. Evaluating this for several negative integer values yields:
$f(-4) = 1 - (-4) = 5;$
$f(-3) = 1 - (-3) = 4;$
$f(-2) = 1 - (-2) = 3;$
$f(-1) = 1 - (-1) = 2$.
Similarly, for $x > 0$, the function is $f(x) = x + 1$. Evaluating this for several positive integer values yields:
$f(1) = 2;$ $f(2) = 3;$ $f(3) = 4;$ $f(4) = 5$. The value at $x=0$ is $f(0)=1$. Consequently, the graphical representation of $f$ is presented in Fig 2.17.
Fig 2.17
Miscellaneous Exercise on Chapter 2
A relation $f$ is specified by the following piecewise definition: $ f(x) = \begin{cases} x^2, & 0 \leq x \leq 3 \ 3x, & 3 \leq x \leq 10 \end{cases} $ Another relation $g$ is specified as: $ g(x) = \begin{cases} x^2, & 0 \leq x \leq 2 \ 3x, & 2 \leq x \leq 10 \end{cases} $ Demonstrate that $f$ constitutes a function, whereas $g$ does not.
Given the function $f(x) = x^2$, calculate the value of the expression $\frac{f(1.1) - f(1)}{1.1 - 1}$.
Determine the domain for the function $f(x) = \frac{x^2 + 2x + 1}{x^2 - 8x + 12}$.
Ascertain the domain and the range of the real-valued function $f$ given by $f(x) = \sqrt{x - 1}$.
Determine the domain and the range of the real-valued function $f$ specified as $f(x) = |x - 1|$.
Given $f = \left{\left(x, \frac{x^2}{1 + x^2}\right) : x \in \mathbf{R}\right}$ as a function mapping from $\mathbf{R}$ to $\mathbf{R}$, establish the range of $f$.
Let $f$ and $g$ be functions from $\mathbf{R}$ to $\mathbf{R}$, defined, respectively, as $f(x) = x + 1$ and $g(x) = 2x - 3$. Compute the functions $f + g$, $f - g$, and $\frac{f}{g}$.
Suppose $f = {(1,1), (2,3), (0,-1), (-1, -3)}$ represents a function mapping from $\mathbf{Z}$ to $\mathbf{Z}$, and it is defined by the linear form $f(x) = ax + b$, where $a$ and $b$ are integers. Identify the values of $a$ and $b$.
Consider a relation $\mathbf{R}$ established from $\mathbf{N}$ to $\mathbf{N}$, defined as $\mathbf{R} = {(a, b) : a, b \in \mathbf{N} \text{ and } a = b^2}$. Evaluate the truthfulness of the following statements:
(i) $(a, a) \in \mathbf{R}$, for all $a \in \mathbf{N}$
(ii) If $(a, b) \in \mathbf{R}$, then $(b, a) \in \mathbf{R}$
(iii) If $(a, b) \in \mathbf{R}$ and $(b, c) \in \mathbf{R}$, then $(a, c) \in \mathbf{R}$.
Provide a justification for your conclusion in each instance.
Let the sets be $A = {1,2,3,4}$ and $B = {1,5,9,11,15,16}$, and let $f = {(1,5), (2,9), (3,1), (4,5), (2,11)}$ be a collection of ordered pairs. Determine whether the following assertions are correct:
(i) $f$ constitutes a relation from A to B.
(ii) $f$ constitutes a function from A to B.
For each assertion, provide a rationale for your decision.
- Suppose $f$ is a subset of the Cartesian product $\mathbf{Z} \times \mathbf{Z}$, defined as $f = {(ab, a + b) : a, b \in \mathbf{Z}}$. Does $f$ represent a function from $\mathbf{Z}$ to $\mathbf{Z}$? Substantiate your response.
- Let the set $\mathbf{A} = {9, 10, 11, 12, 13}$ be given, and let $f: \mathbf{A} \to \mathbf{N}$ be a function where $f(n)$ is defined as the largest prime factor of $n$. Determine the range of this function $f$.
Summary
This chapter explored the concepts of relations and functions. Key aspects discussed include:
Ordered pair An ordered pair consists of two elements arranged in a specific sequence.
Cartesian product The Cartesian product, denoted as $\mathrm{A} \times \mathrm{B}$, for two sets A and B, is defined by:
$ \mathrm{A} \times \mathrm{B} = {(a, b): a \in \mathrm{A}, b \in \mathrm{B}} $
In particular $\mathbf{R} \times \mathbf{R} = {(x, y) : x, y \in \mathbf{R}}$
and $\mathbf{R} \times \mathbf{R} \times \mathbf{R} = {(x, y, z) : x, y, z \in \mathbf{R}}$
If $(a, b) = (x, y)$, then it necessarily follows that $a = x$ and $b = y$.
Given that $n(\mathbf{A}) = p$ and $n(\mathbf{B}) = q$, the cardinality of their Cartesian product, $n(\mathbf{A} \times \mathbf{B})$, is $pq$.
$\mathrm{A} \times \phi = \phi$
In general, $\mathrm{A} \times \mathrm{B} \neq \mathrm{B} \times \mathrm{A}$.
Relation A relation R, mapping from set A to set B, constitutes a subset of the Cartesian product $\mathrm{A} \times \mathrm{B}$. This subset is defined by a specific condition or rule that links the first element $x$ to the second element $y$ within the ordered pairs of $\mathrm{A} \times \mathrm{B}$.
For an element $x$ under a relation $\mathbf{R}$, its image is $y$, provided that the ordered pair $(x, y)$ is an element of $\mathbf{R}$.
The domain of a relation R encompasses all the first elements found in the ordered pairs that comprise R.
The range of a relation R comprises the collection of all second elements present in the ordered pairs forming R.
Function A function $f$, mapping from set A to set B, is characterized as a particular kind of relation where each element $x$ in set A is uniquely associated with precisely one image $y$ within set B.
We write $f: \mathrm{A} \to \mathrm{B}$, where $f(x) = y$.
In this context, A represents the domain, and B denotes the codomain of the function $f$.
The range of a function consists of the complete set of its images.
A real function is defined such that both its domain and its range are either the set of real numbers itself or a subset thereof.
Algebra of functions The algebra of functions outlines operations for functions $f: \mathbf{X} \to \mathbf{R}$ and $g: \mathbf{X} \to \mathbf{R}$ as follows:
$ (f + g)(x) = f(x) + g(x), , x \in \mathbf{X} $
$ (f - g)(x) = f(x) - g(x), , x \in \mathbf{X} $
$ (f, g)(x) = f(x) \cdot g(x), , x \in \mathbf{X} $
$ (kf)(x) = k(f(x)), , x \in \mathbf{X}, \text{ where } k \text{ is a real number.} $
$ \left(\frac{f}{g}\right)(x) = \frac{f(x)}{g(x)}, , x \in \mathbf{X}, , g(x) \neq 0 $
Historical Note
The term FUNCTION first appeared in a Latin manuscript titled “Methodus tangentium inversa, seu de fuctionibus,” penned by Gottfried Wilhelm Leibniz (1646-1716) in 1673. Leibniz initially employed the word in a non-analytical context, conceptualizing a function as a 'mathematical job' where a curve served as the 'employee'.
Subsequently, on July 5, 1698, Johann Bernoulli, through correspondence with Leibniz, first deliberately assigned a specialized analytical meaning to the term function. Leibniz acknowledged and approved this development by the end of the same month.
In English, the word function was documented in Chambers’ Cyclopaedia in 1779, where it was defined as: “The term function is used in algebra, for an analytical expression any way compounded of a variable quantity, and of numbers, or constant quantities”.