Functions: Bijections, Inverse and Composition
1 Function
Definition 1.1. • Let A, B two non-empty sets.
• A function f from A to B is an assignment of exactly one element
25
of B to each element of A.
20
• We denote f : A → B
al
op
• A is called domain, B is called co-domain of f .
Bh
• a is assigned to b, We denote f (a) = b.
IT
II
• b is the image of a, or a is the pre-image of b.
e-
ur
• Other names: mappings or transformations.
ct
ru
Definition 1.2. Range
St
Let f : A → B be a function.
te
re
• The range (or image) of f is the set of all images elements of A.
isc
D
• Img (f ) = {f (a) : a ∈ A}.
I:
H
• We denote f : A → B.
• Img(f ) ⊆ B.
1
H
I:
D
isc
re
te
St
ru
ct
2
ur
e-
II
IT
Bh
op
al
20
25
Figure 1.1: Functions Vs Not Functions
25
20
al
op
Bh
IT
II
e-
Figure 1.2: Functions Vs Not Functions
ur
ct
Example 1. Let f : Z → Z be defined by f (x) = x2 for x ∈ Z.
ru
St
• Domain: Z
te
re
• Co-Domain: Z
isc
D
• Range: {0, 1, 4, 9, . . . , } ⊆ Z.
I:
H
• Pre-image of 49 is 7 as f (7) = 49
• What is pre-image of -4?
• What about 2?
x
Example 2. Let f : N → R be defined by f (x) = 2
for x ∈ Z.
• Domain: N
• Co-Domain: R
• Range: { 21 , 1, 23 , 2, 52 , . . . , } ⊆ R.
• What is pre-image of 27
2
?
• What about − 15
2
?
3
Definition 1.3. Real-Valued
• A function f : A → R is called real-valued.
• Image (f ) ⊆ R.
Definition 1.4. Integer-Valued
• A function f : A → Z is called real-valued.
• Image (f ) ⊆ Z.
Example 3. Real-Valued
• f : N → R is defined by f (x) = sin x for all x ∈ N.
• Image (f ) ⊆ R.
25
• f is a real-valued function.
20
al
Example 4. • f : N → Z is defined by f (x) = ⌊ x3 ⌋ + 1.
op
Bh
• Image (f ) ⊆ Z.
IT
• f is an integer-valued function.
II
e-
Definition 1.5. Let f, g : A → B, (where B = R, N) be two functions.
ur
ct
• Addition of f and g is a function defined by
ru
St
(f + g)(x) = f (x) + g(x), ∀ x ∈ A.
e
t
re
Definition 1.6. Multiplication
isc
D
• Multiplication of f and g is a function defined by
I:
H
(f g)(x) = f (x) · g(x), ∀ x ∈ A.
Example 5. Let f, g : R → R be two functions defined by f (x) = x2 , g(x) =
x − x2 for all x ∈ R.
• Addition: (f + g)(x) = f (x) + g(x) = x2 + x − x2 = x, for all x ∈ R.
• Multiplication: (f g)(x) = f (x) · g(x) = x2 (x − x2 ) = x3 − x4 , for all
x ∈ R.
Definition 1.7. Image of Set
Let f : A → B be a function and S ⊆ A.
• The image of S is f (S) = {f (t) : t ∈ S}.
Example 6. Let f : R → R be defined by f (x) =| x | for all x ∈ R.
4
• S = Z− , the set of all negative integers.
25
20
• f (S) = N.
al
Example 7. Let f : R → R be defined by f (x) = 2x for all x ∈ R.
op
Bh
• What is f (Z)?
IT
• What is f (N)?
II
e-
• What is f (R)?
ur
ct
ru
Exercise 1.1. Find the domain of definition and range for each function.
St
√
1. f (x) = x
t e
re
2. f (x) = ln x
isc
D
x+3
3. f (x) = x−4
I:
H
4. f (x) = ln(x + 10)
√
5. f (x) = 5 − x
6. f (x) = x2 − 6x + 13
One-to-One/Injection
Definition 1.8. Let f : A → B be a function.
• f is one-to-one, or injective if a ̸= b =⇒ f (a) ̸= f (b), for all a, b ∈ A.
• In other words, f is one-to-one if f (a) = f (b) =⇒ a = b for all
a, b ∈ A.
5
Example 8. • f : N → N is defined by f (x) = x2 , x ∈ N is ono-to-one
25
(or injective).
Proof: Let f (a) = f (b). We prove a = b. As f (a) = f (b) =⇒ a2 =
20
al
b2 =⇒ a = b. Thus f is one-to-one.
op
• f : Z → Z is defined by f (x) = x2 , x ∈ Z is NOT ono-to-one (or
Bh
injective), as f (1) = f (−1) but 1 ̸= −1.
IT
II
Exercise 1.2. Are the following functions one-to-one?
e-
ur
1. f : R → R is defined by f (x) = x + 1, x ∈ R
ct
ru
2. f : Z → Z is defined by f (x) =| x |, x ∈ Z.
St
3. f : R → R is defined by f (x) = ex , x ∈ R.
e
t
re
4. f : R → R is defined by f (x) = sin x, x ∈ R.
isc
D
|x|
5. f : R → R is defined by f (x) = x
, x ∈ R.
I:
H
Onto/Surjection
Definition 1.9. Let f : A → B be a function.
1. f is called onto or subjective, if every element of B has pre-image in A
under f .
2. In other words, for each b ∈ B, there exists a ∈ A such that f (a) = b.
3. So, Range will be B, that is, f (A) = B.
Example 9. • f : R → R defined by f (x) = x2 is onto.
Proof: Let b ∈ R. We prove ∃a ∈ R such that f (a) = b. In fact, for
each b, we take a = 2b ∈ R. Then f (a) = b. Thus f is onto.
6
• f : Z → Z defined by f (x) = x + 1 is onto.
• f : N → Z defined by f (x) = x + 1 is NOT onto.
25
20
Exercise 1.3. Are the following functions onto?
al
• f : R → R defined by f (x) = ex , for x ∈ R.
op
Bh
• f : N → N defined by f (x) = x + 3 for x ∈ N.
IT
• f : Z → Z defined by f (x) = x + 1 for x ∈ Z.
II
e-
ur
• f : R → R defined by f (x) = x2 for x ∈ R.
ct
ru
• f : R → R defined by f (x) = cos x for x ∈ R.
St
t e
Bijection
re
isc
D
Definition 1.10. A function f : A → B is said to be bijection if it is
I:
H
1. One-to-One or Injection
2. Onto or Surjection.
Example 10. • The function f : R → R defined by f (x) = x + 2 is a
bijection.
Proof:
• One-to-One: Let f (a) = f (b). We need to prove that a = b. As
f (a) = f (b), we have a + 2 = b + 2 =⇒ a = b. Hence f is one-to-one.
• Onto: Let b ∈ R. We need to prove that b has a pre-image in R.
That is, there exists a ∈ R such that f (a) = b. Now, f (a) = b gives
a + 2 = b =⇒ a = b − 2, which is the required a ∈ R (as b ∈ R =⇒
a = b − 2 ∈ R). So, f is onto.
7
Example 11. • The function f : N → N defined by f (x) = x + 2 is NOT
a bijection.
25
– f is injective.
20
– f is not Surjective, as 1 does not have pre-image in N.
al
op
• The function f : R → R defined by f (x) = ex is NOT a bijection.
Bh
IT
– f is injective.
II
– f is not subjective, as 0 does not have pre-image.
e-
ur
Property: Bijection
ct
ru
St
For any two non-empty sets A, B
e
• f : A → B is a bijection if and only if | A |=| B |.
t
re
isc
• Proving | A |=| B |: Just define a bijection between them.
D
I:
Question 1.1. Can you define a bijection between A and B, where
H
• A = {1, 2, 3, 4, 5} and B = {a, b, c, d}.
• A = {1, 2, 3} and B = {a, b, c}.
Exercise 1.4. • The function f : R → R is defined by f (x) = x2 + 2 for
x ∈ R.
1. Give an example to show that f is not one-to-one.
2. Give an example to show that f is not onto.
• The function f : R → R is defined by f (x) = x2 − 6x for x ∈ R.
1. Give an example to show that f is not one-to-one.
2. Give an example to show that f is not onto.
8
Figure 1.3: Inverse Function
Exercise 1.5. Check for injection, surjection, and bijection.
25
1. The function f : R → R+ is defined by f (x) = ex for x ∈ R.
20
al
2. The function f : R → R is defined by f (x) = (x + 1)x(x − 1) for x ∈ R.
op
Bh
3. The function f : R → R is defined by f (x) = (x2 − 9)(x2 − 4) for x ∈ R.
IT
4. The function f : R → R is defined by f (x) = 3x + 4 for x ∈ R.
II
e-
5. The function f : R → R is defined by f (x) = x3 for x ∈ R.
ur
ct
Definition 1.11. Inverse Function
ru
Let f : A → B be a bijection.
St
e
• The inverse of f is a function f −1 : B → A defined by f −1 (b) = a,
t
re
whenever f (a) = b, for a ∈ A, b ∈ B.
isc
D
• f −1 is notation for inverse function.
I:
H
• f −1 is not f1 .
• Inverse can be defined only for bijection maps.
Example 12. Let f be the function from {a, b, c} to {1, 2, 3} such that f (a) =
2, f (b) = 3, and f (c) = 1.
• f is bijection.
• f −1 is a function from {1, 2, 3} to {a, b, c}.
• f −1 (1) = c, f −1 (2) = a, f −1 (3) = b.
Example 13. f : Z → Z is defined by f (x) = x + 1, x ∈ Z. Find the inverse,
if it exists.
9
• We know f is bijection (Already checked)
• f −1 : Z → Z exists.
• Now, let f (x) = y, then x + 1 = y =⇒ x = y − 1. So, f −1 (y) = x =
y − 1, for all y ∈ Z. So inverse function is
f −1 (y) = y − 1.
Exercise 1.6. Find the inverse of the following functions, if exist.
1. f : R → R defined by f (x) = x2 , for all x ∈ R.
2. f : R → R+ defined by f (x) = ex , for all x ∈ R.
3. f : R → R defined by f (x) = x3 + 1, for all x ∈ R.
25
√
4. f : R+ → R+ defined by f (x) = x, for all x ∈ R.
20
l
pa
Example 14. Prove that f : R → R defined by f (x) = x3 + 1, for all x ∈ R
o
is a bijection. Find f −1 .
Bh
• One-to-One: Let f (a) = f (b). So, a3 + 1 = b3 + 1 =⇒ a3 = b3 =⇒
IT
II
a = b. So f is one-to-one.
e-
ur
• Onto: Let b ∈ R. We find roots of λ3 + 1 = b. After solving we
ct
must have at least one real root for λ. Let the real root is a ∈ R, i.e.,
ru
a3 + 1 = b holds. So
St
f (a) = b.
te
re
Thus f is onto.
isc
√
:D
• Inverse: Let f (x) =√ y. So x3 +1 = y =⇒ x = 3
y − 1. So the inverse
HI
function is f −1 (y) = 3 y − 1
Definition 1.12. Let f : A → B be a function (need not be Bijection). Let
S ⊆ B.
• f −1 (S) = {a ∈ A : f (a) ∈ S}.
• f −1 (S) ⊆ A.
Example 15. Let f : R → R is defined by f (x) = x2 , for all x ∈ R.
• Find f −1 ({1}).
Solution:
10
Figure 1.4: Composition of Functions
• Here, S = {1}.
f −1 (S) = {a ∈ R : f (a) ∈ S}
25
20
= {a ∈ R : f (a) ∈ {1}}
al
= {a ∈ R : f (a) = 1}
= {a ∈ R : op
a2 = 1}
Bh
= {a ∈ R : a = ±1}
IT
= {1, −1}.
II
e-
ur
Example 16. Let f : R → R is defined by f (x) = x2 , for all x ∈ R.
ct
ru
1. Find f −1 {x : x > 4}
St
2. Find f −1 {x : 0 < x < 1}
e
t
re
isc
Composition Function
D
I:
H
Definition 1.13. Let f : A → B and g : B → C be two functions.
• The composition of f and g is a function g ◦ f : A → C.
• Defined by (g ◦ f )(x) = g f (x) for all x ∈ A.
Example 17. Let f, g : Z → Z be defined by f (x) = 2x + 3 and g(x) = 3x + 2
for all x ∈ Z.
• The composition (g ◦ f )(x) = g f (x) = g(2x + 3) = 3(2x + 3) + 2 =
6x + 11.
• Also, (f ◦ g)(x) = f g(x) = f (3x + 2) = 2(3x + 2) + 3 = 6x + 7.
Exercise 1.7. Find the f ◦ g and g ◦ f for following functions
11
25
Figure 2.1: Floor Function
20
al
1. f (x) = 4 − x, and g(x) = −4x.
op
Bh
2. f (x) = x2 + 2x, and g(x) = 5x + 1.
√
IT
3. f (x) = x + 2, and g(x) = x1 .
II
√
e-
4. f (x) = x+3 , and g(x) = 1 − x.
ur
2
√
ct
5. f (x) = x21−1 , and g(x) = x + 1.
ru
St
e
2 Functions: Special Functions
t
re
isc
Definition 2.1. Floor Function
D
• A function f : R → Z defined by
I:
H
f (x) = ⌊x⌋
is called Floor function.
• ⌊x⌋ = n, the largest integer that is less than or equal to x.
• n ≤ x.
Example 18. Floor Function
• ⌊2.3⌋ = 2, ⌊7.9⌋ = 7, ⌊5⌋ = 5
• ⌊−3.4⌋ = −4, ⌊−10.1⌋ = −11, ⌊−6⌋ = −6.
• For any integer n, ⌊n⌋ = n.
12
Figure 2.2: Ceiling Function
Definition 2.2. Ceiling Function
25
• A function f : R → Z defined by
l 20
f (x) = ⌈x⌉
o pa
Bh
is called Ceiling function.
IT
• ⌈x⌉ = n is the smallest integer greater than or equal to x.
II
e-
• n ≥ x.
ur
ct
ru
St
Example 19. Ceiling Function
te
• ⌈2.3⌉ = 3, ⌈8.1⌉ = 9, ⌈11⌉ = 11
re
isc
• ⌈−2.3⌉ = −2, ⌈−7.5⌉ = −7, ⌈−2⌉ = −2
:D
HI
• For any integer n, ⌈n⌉ = n
Exercise 2.1. • Let S = {−1, 0, 2, 4, 7}. Find f (S) if
1. f (x) = ⌈ x5 ⌉
2
2. f (x) = ⌊ x 3+1 ⌋
• Let g(x) = ⌊x⌋.
1. Find g −1 {0}
2. Find g −1 {−1, 0, 1}
3. Find g −1 {x : 0 < x < 1}
13