Lesson 5
Lesson 5
Department of Mathematics
BSc Electronics and Computer Science Degree Programme.
Lesson 5 – Unit 3: Functions
3.1 Definition: Let 𝑋 and 𝑌 be two non-empty sets. Then a rule correspondence 𝑓 which
associates to each element 𝑥 ∈ 𝑋, a unique element denoted by 𝑓(𝑥) of 𝑌 , is called a function
or a mapping from 𝑋 to 𝑌 and we write 𝒇:𝑿 → 𝒀.
The element 𝑓(𝑥) of 𝑌, associate with the element 𝑥 ∈ 𝑋 is called the f-image or simply the
image of x, while x is called the pre-image of 𝑓(𝑥).
The sets 𝑋 and 𝑌 are respectively, known as the domain and co-domain of 𝑓, while the set
𝑓(𝑋) = {𝑓(𝑥): 𝑥 ∈ 𝑋} consist of all possible images of elements of X is called the Range of
the mapping f.
Remarks: (i). If 𝑓: 𝑋 → 𝑌, then a single element in X cannot have more than one images in
Y. However, two or more than two elements in X may have the same image in Y.
(ii). Every element in X must have its image in Y, but every element in Y may not have its
pre-image in X.
(iii). Sometimes, a function is described only by a formula and the domain of the function is
not explicitly stated. In all such cases, the domain of the function is the set of all those
elements for which the formula is meaningful.
1
(iv). Sometimes, a function f can be expressed by different formulas in different parts of the
domain.
Example 3.1:
i. 𝑓: ℝ → ℝ, with 𝑓(𝑥) = 𝑦 = 3𝑥 + 5 is a function from real numbers to real numbers.
For each real 𝑥, there is exactly one real 𝑦, given by 3𝑥 + 5. ∎
ii. Similarly, for 𝑋 = {1,2} and 𝑌 = {3,5,7}, 𝑓: 𝑋 → 𝑌 with 𝑓(1) = 3 and 𝑓(2) = 7 is
also a function.
In example (ii) above, 𝑋 = {1,2}, 𝑌 = {3,5,7} and 𝑓(𝑋) = {3,7} is the range of f,
i.e.
2
3.2 Different Types of Mappings
3.2.1 Many-one Mappings
A mapping 𝑓: 𝐴 → 𝐵 defined in such a way that two or more than two different
elements in A have the same image in B, is known as a Many-one mapping from
A to B.
3
3.2.3. Surjective Functions (onto functions)
Definition 3.2.2: A function 𝑓: 𝑋 → 𝑌 is surjective (onto) if, for each 𝑦 value,
there is a 𝑥 value such that 𝑦 = 𝑓(𝑥). This means that 𝑓(𝑋) = 𝑌; the co-domain and
the range are identical. i.e. f is onto ⟺ 𝑅𝑎𝑛𝑔𝑒(𝑓) = 𝑌.
Definition 3.2.3 : A function that is both one-to-one and onto is called a bijection
Example 3.2.3: The function f = {(1, a), (2, c), (3, b)} from X = {1, 2, 3} to Y = {a, b, c} is
one-to-one and onto Y. This is a bijection
3.3. Inverse of a function:
An inverse function, which is denoted by 𝑓 −1 (𝑥) is defined as the inverse function of 𝑓(𝑥) if
it consistently reverses the 𝑓(𝑥) process. That is, if 𝑓(𝑥) turns 𝑎 into 𝑏, then 𝑓 −1 (𝑥) must
turn 𝑏 into 𝑎. More concisely and formally, 𝑓 −1 (𝑥) is the inverse function of 𝑓(𝑥) if:
𝑓(𝑓 −1 (𝑥)) = 𝑥
4
Steps to find inverse:
Given the function f(x) we want to find the inverse function, 𝑓−1 (𝑥).
1. First, replace 𝑓(𝑥) with 𝑦. This is done to make the rest of the process easier.
2. Replace every 𝑥 with a 𝑦 and replace every 𝑦 with an 𝑥.
3. Solve the equation from Step 2 for 𝑦. This is the step where mistakes are most often
made so be careful with this step.
4. Replace y with 𝑓−1 (𝑥).
5. Verify your work by checking that (𝑓 ∘ 𝑓 −1 )(𝑥) = 𝑥 and (𝑓 −1 ∘ 𝑓)(𝑥) = 𝑥 are both true
𝑥+4
(1) 𝑓(𝑥) = 3𝑥 − 2 (2) 𝑔(𝑥) = √𝑥 − 3 (3) ℎ(𝑥) = 2𝑥−5
Given two functions 𝑓(𝑥) and 𝑔(𝑥) we have the following notation and operations.
Example 3.3.2
5
Remark: The range set of a constant function is a singleton set.
3.5 Identity Functions
For any set A, the function 𝐼𝐴 defined by: 𝐼𝐴: 𝐴 → 𝐴: 𝐼𝐴 (𝑥) = 𝑥, ∀𝑥 ∈ 𝐴 is called an Identity
function. Clearly, the domain as well as range of 𝐼𝐴 is A and 𝐼𝐴 is a bijective (i.e. one-one and
onto) function.
3.6 Equal Functions
Two mappings 𝑓 and 𝑔 are said to be equal, if they have the same domain and they satisfy the
condition, 𝑓(𝑥) = 𝑔(𝑥),∀𝑥. If f and g are equal mappings, we write, 𝑓 = 𝑔
3.7 Function as a Relation
Let 𝑋 and 𝑌 be two non-empty sets. Then a relation 𝑓 from 𝑋 to 𝑌 (i.e. a subset of 𝑋 × 𝑌 ) with
domain 𝑋, is called a function, if no two different ordered pairs in f have the same first co-
ordinate.
Remark: The set of all first coordinates of ordered pairs in f forms the domain of f, while the
set of all second coordinates of elements of f constitute the range of f.
Example 3.7.1: Let 𝑋 = {0,1,4,9} and 𝑌 = {0,1,2, −2,3}. Let 𝑓 = {(0,0), (1,1), (4,2), (4, −2),
(9,3)}. Clearly, two different ordered pairs, namely (4,2) and (4,-2) have the same first
coordinates and therefore f is a relation but not a function.
Example 3.7.2: If S and T are non-empty sets. Prove that there exists a one-one correspondence
(bijective) between 𝑆 × 𝑇 and 𝑇 × 𝑆.
The process of combining functions so that the output of one function becomes the input of
another is known as a composition of functions. The resulting function is known as
a composite function. We represent this combination by the following notation:
We read the left-hand side as “𝑓“ composed with 𝑔 at 𝑥, and the right-hand side
as “𝑓 of 𝑔 of 𝑥.”
In general, (𝑓 ∘ 𝑔) and (𝑔 ∘ 𝑓) are different functions. In other words, in many
cases 𝑓(𝑔(𝑥)) ≠ 𝑔(𝑓(𝑥)) for all 𝑥.
6
Example 3.5.1 :
Theorem 3.5.1
7
8