Relation and Function
Relation and Function
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 1 / 29
Contents
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 2 / 29
A-Q15 — Define a Relation
Question
Define a relation from A to B. Give an example. [1–2 marks]
Solution
A binary relation R from set A to set B is any subset of the Cartesian product A × B:
R ⊆ A×B
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 3 / 29
A-Q15 — Define a Relation
Question
Define a relation from A to B. Give an example. [1–2 marks]
Solution
A binary relation R from set A to set B is any subset of the Cartesian product A × B:
R ⊆ A×B
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 3 / 29
A-Q15 — Define a Relation
Question
Define a relation from A to B. Give an example. [1–2 marks]
Solution
A binary relation R from set A to set B is any subset of the Cartesian product A × B:
R ⊆ A×B
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 3 / 29
A-Q15 — Define a Relation
Question
Define a relation from A to B. Give an example. [1–2 marks]
Solution
A binary relation R from set A to set B is any subset of the Cartesian product A × B:
R ⊆ A×B
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 3 / 29
A-Q15 — Define a Relation
Question
Define a relation from A to B. Give an example. [1–2 marks]
Solution
A binary relation R from set A to set B is any subset of the Cartesian product A × B:
R ⊆ A×B
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 3 / 29
A-Q15 — Define a Relation
Question
Define a relation from A to B. Give an example. [1–2 marks]
Solution
A binary relation R from set A to set B is any subset of the Cartesian product A × B:
R ⊆ A×B
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 3 / 29
A-Q15 — Define a Relation
Question
Define a relation from A to B. Give an example. [1–2 marks]
Solution
A binary relation R from set A to set B is any subset of the Cartesian product A × B:
R ⊆ A×B
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 3 / 29
A-Q16/17/18 — Reflexive, Symmetric, Transitive
Question
Define reflexive, symmetric, and transitive relations with examples. [1–2 marks each]
1 1
1 2
2 2 3
Key Idea
Digraph rules: Reflexive = loops at all nodes. Symmetric = all arrows bidirectional. Transitive
= 2-hop paths have a direct shortcut.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 4 / 29
A-Q16/17/18 — Reflexive, Symmetric, Transitive
Question
Define reflexive, symmetric, and transitive relations with examples. [1–2 marks each]
1 1
1 2
2 2 3
Key Idea
Digraph rules: Reflexive = loops at all nodes. Symmetric = all arrows bidirectional. Transitive
= 2-hop paths have a direct shortcut.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 4 / 29
A-Q16/17/18 — Reflexive, Symmetric, Transitive
Question
Define reflexive, symmetric, and transitive relations with examples. [1–2 marks each]
1 1
1 2
2 2 3
Key Idea
Digraph rules: Reflexive = loops at all nodes. Symmetric = all arrows bidirectional. Transitive
= 2-hop paths have a direct shortcut.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 4 / 29
A-Q16/17/18 — Reflexive, Symmetric, Transitive
Question
Define reflexive, symmetric, and transitive relations with examples. [1–2 marks each]
1 1
1 2
2 2 3
Key Idea
Digraph rules: Reflexive = loops at all nodes. Symmetric = all arrows bidirectional. Transitive
= 2-hop paths have a direct shortcut.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 4 / 29
A-Q16/17/18 — Reflexive, Symmetric, Transitive
Question
Define reflexive, symmetric, and transitive relations with examples. [1–2 marks each]
1 1
1 2
2 2 3
Key Idea
Digraph rules: Reflexive = loops at all nodes. Symmetric = all arrows bidirectional. Transitive
= 2-hop paths have a direct shortcut.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 4 / 29
A-Q16/17/18 — Reflexive, Symmetric, Transitive
Question
Define reflexive, symmetric, and transitive relations with examples. [1–2 marks each]
1 1
1 2
2 2 3
Key Idea
Digraph rules: Reflexive = loops at all nodes. Symmetric = all arrows bidirectional. Transitive
= 2-hop paths have a direct shortcut.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 4 / 29
A-Q16/17/18 — Reflexive, Symmetric, Transitive
Question
Define reflexive, symmetric, and transitive relations with examples. [1–2 marks each]
1 1
1 2
2 2 3
Key Idea
Digraph rules: Reflexive = loops at all nodes. Symmetric = all arrows bidirectional. Transitive
= 2-hop paths have a direct shortcut.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 4 / 29
A-Q16/17/18 — Reflexive, Symmetric, Transitive
Question
Define reflexive, symmetric, and transitive relations with examples. [1–2 marks each]
1 1
1 2
2 2 3
Key Idea
Digraph rules: Reflexive = loops at all nodes. Symmetric = all arrows bidirectional. Transitive
= 2-hop paths have a direct shortcut.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 4 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q19 & A-Q20 — Equivalence vs. Partial Order
Solution Solution
R is an equivalence relation if it is simulta- R is a partial order (poset) if it is:
neously: 1 Reflexive (R)
1 Reflexive (R) 2 Anti-symmetric (AS)
2 Symmetric (S) (a, b), (b, a) ∈ R ⇒ a = b
3 Transitive (T) 3 Transitive (T)
Example: “=” on Z. Example: “≤” on N.
Notation: a ∼ b (read “a equivalent to b”). (A, R) is called a poset.
Key Idea
Critical difference: Equivalence uses Symmetric (RST); Partial Order uses Anti-symmetric
(RAST).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 5 / 29
A-Q21 & A-Q22 — Digraph & Matrix Representations
Question
How is a relation represented by (i) a digraph, and (ii) a matrix? [1–2 marks each]
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 6 / 29
A-Q21 & A-Q22 — Digraph & Matrix Representations
Question
How is a relation represented by (i) a digraph, and (ii) a matrix? [1–2 marks each]
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 6 / 29
A-Q21 & A-Q22 — Digraph & Matrix Representations
Question
How is a relation represented by (i) a digraph, and (ii) a matrix? [1–2 marks each]
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 6 / 29
A-Q21 & A-Q22 — Digraph & Matrix Representations
Question
How is a relation represented by (i) a digraph, and (ii) a matrix? [1–2 marks each]
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 6 / 29
A-Q21 & A-Q22 — Digraph & Matrix Representations
Question
How is a relation represented by (i) a digraph, and (ii) a matrix? [1–2 marks each]
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 6 / 29
A-Q21 & A-Q22 — Digraph & Matrix Representations
Question
How is a relation represented by (i) a digraph, and (ii) a matrix? [1–2 marks each]
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 6 / 29
A-Q21 & A-Q22 — Digraph & Matrix Representations
Question
How is a relation represented by (i) a digraph, and (ii) a matrix? [1–2 marks each]
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 6 / 29
A-Q23 & A-Q24 — Function, Domain, Range
Question
Define a function. Define domain and range of a function. [1–2 marks each]
Solution
A function f : A → B is a relation from A to B such that every element of A maps to exactly
one element of B:
∀ a ∈ A, ∃! b ∈ B s.t. f (a) = b
Question
Define a function. Define domain and range of a function. [1–2 marks each]
Solution
A function f : A → B is a relation from A to B such that every element of A maps to exactly
one element of B:
∀ a ∈ A, ∃! b ∈ B s.t. f (a) = b
Question
Define a function. Define domain and range of a function. [1–2 marks each]
Solution
A function f : A → B is a relation from A to B such that every element of A maps to exactly
one element of B:
∀ a ∈ A, ∃! b ∈ B s.t. f (a) = b
Question
Define a function. Define domain and range of a function. [1–2 marks each]
Solution
A function f : A → B is a relation from A to B such that every element of A maps to exactly
one element of B:
∀ a ∈ A, ∃! b ∈ B s.t. f (a) = b
Question
Define a function. Define domain and range of a function. [1–2 marks each]
Solution
A function f : A → B is a relation from A to B such that every element of A maps to exactly
one element of B:
∀ a ∈ A, ∃! b ∈ B s.t. f (a) = b
Question
Define onto function, into function, and one-to-one function. [1–2 marks each]
zÖmissed
c y b
b y
c z
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 8 / 29
A-Q25/26/27 — Types of Functions
Question
Define onto function, into function, and one-to-one function. [1–2 marks each]
zÖmissed
c y b
b y
c z
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 8 / 29
A-Q25/26/27 — Types of Functions
Question
Define onto function, into function, and one-to-one function. [1–2 marks each]
zÖmissed
c y b
b y
c z
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 8 / 29
A-Q25/26/27 — Types of Functions
Question
Define onto function, into function, and one-to-one function. [1–2 marks each]
zÖmissed
c y b
b y
c z
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 8 / 29
A-Q25/26/27 — Types of Functions
Question
Define onto function, into function, and one-to-one function. [1–2 marks each]
zÖmissed
c y b
b y
c z
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 8 / 29
A-Q25/26/27 — Types of Functions
Question
Define onto function, into function, and one-to-one function. [1–2 marks each]
zÖmissed
c y b
b y
c z
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 8 / 29
A-Q25/26/27 — Types of Functions
Question
Define onto function, into function, and one-to-one function. [1–2 marks each]
zÖmissed
c y b
b y
c z
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 8 / 29
A-Q28 — Hashing Function
Question
Define a hashing function. [1–2 marks]
Solution
A hashing function h : K → I maps a set of keys K to table indices I (positions in a hash
table).
The most common form uses the division method:
h(k) = k mod m
Question
Define a hashing function. [1–2 marks]
Solution
A hashing function h : K → I maps a set of keys K to table indices I (positions in a hash
table).
The most common form uses the division method:
h(k) = k mod m
Question
Define a hashing function. [1–2 marks]
Solution
A hashing function h : K → I maps a set of keys K to table indices I (positions in a hash
table).
The most common form uses the division method:
h(k) = k mod m
Question
Define a hashing function. [1–2 marks]
Solution
A hashing function h : K → I maps a set of keys K to table indices I (positions in a hash
table).
The most common form uses the division method:
h(k) = k mod m
Question
Define a hashing function. [1–2 marks]
Solution
A hashing function h : K → I maps a set of keys K to table indices I (positions in a hash
table).
The most common form uses the division method:
h(k) = k mod m
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
Question
Check whether R = {(1, 1), (2, 2), (3, 3), (1, 2), (2, 1)} on A = {1, 2, 3} is reflexive, symmetric, and
transitive. [3–4 marks]
Digraph of R:
1. Reflexive? – Check (a, a) ∈ R for all a ∈ A
(1, 1) ∈ R ✓ (2, 2) ∈ R ✓ (3, 3) ∈ R ✓ 1
⇒ YES, Reflexive.
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q16 — “Is Equal To” is an Equivalence Relation
Question
Show that “is equal to” (=) is an equivalence relation on Z. [3–4 marks]
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q16 — “Is Equal To” is an Equivalence Relation
Question
Show that “is equal to” (=) is an equivalence relation on Z. [3–4 marks]
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q16 — “Is Equal To” is an Equivalence Relation
Question
Show that “is equal to” (=) is an equivalence relation on Z. [3–4 marks]
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q16 — “Is Equal To” is an Equivalence Relation
Question
Show that “is equal to” (=) is an equivalence relation on Z. [3–4 marks]
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q16 — “Is Equal To” is an Equivalence Relation
Question
Show that “is equal to” (=) is an equivalence relation on Z. [3–4 marks]
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q16 — “Is Equal To” is an Equivalence Relation
Question
Show that “is equal to” (=) is an equivalence relation on Z. [3–4 marks]
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q16 — “Is Equal To” is an Equivalence Relation
Question
Show that “is equal to” (=) is an equivalence relation on Z. [3–4 marks]
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q16 — “Is Equal To” is an Equivalence Relation
Question
Show that “is equal to” (=) is an equivalence relation on Z. [3–4 marks]
1. Reflexive
For any a ∈ Z: a = a is always true.
⇒ (a, a) ∈ R for all a. Reflexive!
2. Symmetric
If a = b, then b = a.
⇒ (a, b) ∈ R ⇒ (b, a) ∈ R. Symmetric!
3. Transitive
If a = b and b = c, then a = c.
⇒ (a, b), (b, c) ∈ R ⇒ (a, c) ∈ R. Transitive!
Solution
Since “=” satisfies Reflexive + Symmetric + Transitive, it is an equivalence relation on Z. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 11 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q17 — “≤” is a Partial Order on N
Question
Show that “≤” on natural numbers is a partial order relation. [3–4 marks]
1. Reflexive
a ≤ a for all a ∈ N. Reflexive!
2. Anti-symmetric
If a ≤ b and b ≤ a, then a = b. Anti-symmetric!
Note: This is not symmetric – 2 ≤ 3 but 3 ̸≤ 2.
3. Transitive
If a ≤ b and b ≤ c, then a ≤ c. Transitive!
Solution
Since “≤” is reflexive, anti-symmetric, and transitive, (N, ≤) is a partially ordered set (poset).
□
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 12 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q18 — Digraph Representation
Question
Represent R = {(1, 2), (2, 3), (3, 1)} on A = {1, 2, 3} using a digraph. [3–4 marks]
Procedure: (i) Draw one node per element of A. (ii) Draw a directed arrow for each ordered pair
in R.
Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 13 / 29
B-Q19 — Matrix Representation
Question
Represent R = {(1, 1), (2, 2), (1, 2)} on A = {1, 2} using a matrix. [3–4 marks]
Question
Represent R = {(1, 1), (2, 2), (1, 2)} on A = {1, 2} using a matrix. [3–4 marks]
Question
Represent R = {(1, 1), (2, 2), (1, 2)} on A = {1, 2} using a matrix. [3–4 marks]
Question
Represent R = {(1, 1), (2, 2), (1, 2)} on A = {1, 2} using a matrix. [3–4 marks]
Question
Represent R = {(1, 1), (2, 2), (1, 2)} on A = {1, 2} using a matrix. [3–4 marks]
Question
Represent R = {(1, 1), (2, 2), (1, 2)} on A = {1, 2} using a matrix. [3–4 marks]
Question
Represent R = {(1, 1), (2, 2), (1, 2)} on A = {1, 2} using a matrix. [3–4 marks]
Question
Represent R = {(1, 1), (2, 2), (1, 2)} on A = {1, 2} using a matrix. [3–4 marks]
Question
Define bijective function with an example. [3–4 marks]
Solution
f : A → B is bijective (one-to-one correspondence) if it is both injective (one-to-one) and
surjective (onto).
Injective: Distinct inputs always give distinct outputs.
Surjective: Every element of B is reached by some element of A.
Consequence: |A| = |B| (sets have the same cardinality).
Question
Define bijective function with an example. [3–4 marks]
Solution
f : A → B is bijective (one-to-one correspondence) if it is both injective (one-to-one) and
surjective (onto).
Injective: Distinct inputs always give distinct outputs.
Surjective: Every element of B is reached by some element of A.
Consequence: |A| = |B| (sets have the same cardinality).
Question
Define bijective function with an example. [3–4 marks]
Solution
f : A → B is bijective (one-to-one correspondence) if it is both injective (one-to-one) and
surjective (onto).
Injective: Distinct inputs always give distinct outputs.
Surjective: Every element of B is reached by some element of A.
Consequence: |A| = |B| (sets have the same cardinality).
Question
Define bijective function with an example. [3–4 marks]
Solution
f : A → B is bijective (one-to-one correspondence) if it is both injective (one-to-one) and
surjective (onto).
Injective: Distinct inputs always give distinct outputs.
Surjective: Every element of B is reached by some element of A.
Consequence: |A| = |B| (sets have the same cardinality).
Question
Define bijective function with an example. [3–4 marks]
Solution
f : A → B is bijective (one-to-one correspondence) if it is both injective (one-to-one) and
surjective (onto).
Injective: Distinct inputs always give distinct outputs.
Surjective: Every element of B is reached by some element of A.
Consequence: |A| = |B| (sets have the same cardinality).
Question
Define bijective function with an example. [3–4 marks]
Solution
f : A → B is bijective (one-to-one correspondence) if it is both injective (one-to-one) and
surjective (onto).
Injective: Distinct inputs always give distinct outputs.
Surjective: Every element of B is reached by some element of A.
Consequence: |A| = |B| (sets have the same cardinality).
Question
Define bijective function with an example. [3–4 marks]
Solution
f : A → B is bijective (one-to-one correspondence) if it is both injective (one-to-one) and
surjective (onto).
Injective: Distinct inputs always give distinct outputs.
Surjective: Every element of B is reached by some element of A.
Consequence: |A| = |B| (sets have the same cardinality).
Question
Define bijective function with an example. [3–4 marks]
Solution
f : A → B is bijective (one-to-one correspondence) if it is both injective (one-to-one) and
surjective (onto).
Injective: Distinct inputs always give distinct outputs.
Surjective: Every element of B is reached by some element of A.
Consequence: |A| = |B| (sets have the same cardinality).
Solution
Definition: (g ◦ f )(x) = g (f (x)) (Apply f first, then apply g to the result.)
Step 1 – Compute f (x):
f (x) = 2x + 1
Step 2 – Apply g to f (x):
Step 3 – Expand:
(g ◦ f )(x) = 4x 2 + 4x + 1
Key Idea
Warning – order matters!
(f ◦ g )(x) = f (g (x)) = f (x 2 ) = 2x 2 + 1 ̸= 4x 2 + 4x + 1.
In general, g ◦ f ̸= f ◦ g .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 16 / 29
B-Q21 — Composite Function (g ◦ f )(x)
Question
If f (x) = 2x + 1 and g (x) = x 2 , find (g ◦ f )(x). [3–4 marks]
Solution
Definition: (g ◦ f )(x) = g (f (x)) (Apply f first, then apply g to the result.)
Step 1 – Compute f (x):
f (x) = 2x + 1
Step 2 – Apply g to f (x):
Step 3 – Expand:
(g ◦ f )(x) = 4x 2 + 4x + 1
Key Idea
Warning – order matters!
(f ◦ g )(x) = f (g (x)) = f (x 2 ) = 2x 2 + 1 ̸= 4x 2 + 4x + 1.
In general, g ◦ f ̸= f ◦ g .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 16 / 29
B-Q21 — Composite Function (g ◦ f )(x)
Question
If f (x) = 2x + 1 and g (x) = x 2 , find (g ◦ f )(x). [3–4 marks]
Solution
Definition: (g ◦ f )(x) = g (f (x)) (Apply f first, then apply g to the result.)
Step 1 – Compute f (x):
f (x) = 2x + 1
Step 2 – Apply g to f (x):
Step 3 – Expand:
(g ◦ f )(x) = 4x 2 + 4x + 1
Key Idea
Warning – order matters!
(f ◦ g )(x) = f (g (x)) = f (x 2 ) = 2x 2 + 1 ̸= 4x 2 + 4x + 1.
In general, g ◦ f ̸= f ◦ g .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 16 / 29
B-Q21 — Composite Function (g ◦ f )(x)
Question
If f (x) = 2x + 1 and g (x) = x 2 , find (g ◦ f )(x). [3–4 marks]
Solution
Definition: (g ◦ f )(x) = g (f (x)) (Apply f first, then apply g to the result.)
Step 1 – Compute f (x):
f (x) = 2x + 1
Step 2 – Apply g to f (x):
Step 3 – Expand:
(g ◦ f )(x) = 4x 2 + 4x + 1
Key Idea
Warning – order matters!
(f ◦ g )(x) = f (g (x)) = f (x 2 ) = 2x 2 + 1 ̸= 4x 2 + 4x + 1.
In general, g ◦ f ̸= f ◦ g .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 16 / 29
B-Q21 — Composite Function (g ◦ f )(x)
Question
If f (x) = 2x + 1 and g (x) = x 2 , find (g ◦ f )(x). [3–4 marks]
Solution
Definition: (g ◦ f )(x) = g (f (x)) (Apply f first, then apply g to the result.)
Step 1 – Compute f (x):
f (x) = 2x + 1
Step 2 – Apply g to f (x):
Step 3 – Expand:
(g ◦ f )(x) = 4x 2 + 4x + 1
Key Idea
Warning – order matters!
(f ◦ g )(x) = f (g (x)) = f (x 2 ) = 2x 2 + 1 ̸= 4x 2 + 4x + 1.
In general, g ◦ f ̸= f ◦ g .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 16 / 29
B-Q21 — Composite Function (g ◦ f )(x)
Question
If f (x) = 2x + 1 and g (x) = x 2 , find (g ◦ f )(x). [3–4 marks]
Solution
Definition: (g ◦ f )(x) = g (f (x)) (Apply f first, then apply g to the result.)
Step 1 – Compute f (x):
f (x) = 2x + 1
Step 2 – Apply g to f (x):
Step 3 – Expand:
(g ◦ f )(x) = 4x 2 + 4x + 1
Key Idea
Warning – order matters!
(f ◦ g )(x) = f (g (x)) = f (x 2 ) = 2x 2 + 1 ̸= 4x 2 + 4x + 1.
In general, g ◦ f ̸= f ◦ g .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 16 / 29
B-Q22 & B-Q23 — Composite & Inverse Functions
Solution Solution
If f : A → B and g : B → C , the composite If f : A → B is bijective, its inverse f −1 : B →
(g ◦ f ) : A → C is defined as: A satisfies:
Key Idea
Only bijective functions have inverses. f −1 “undoes” f : (f −1 ◦ f )(x) = x (identity function).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 17 / 29
B-Q22 & B-Q23 — Composite & Inverse Functions
Solution Solution
If f : A → B and g : B → C , the composite If f : A → B is bijective, its inverse f −1 : B →
(g ◦ f ) : A → C is defined as: A satisfies:
Key Idea
Only bijective functions have inverses. f −1 “undoes” f : (f −1 ◦ f )(x) = x (identity function).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 17 / 29
B-Q22 & B-Q23 — Composite & Inverse Functions
Solution Solution
If f : A → B and g : B → C , the composite If f : A → B is bijective, its inverse f −1 : B →
(g ◦ f ) : A → C is defined as: A satisfies:
Key Idea
Only bijective functions have inverses. f −1 “undoes” f : (f −1 ◦ f )(x) = x (identity function).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 17 / 29
B-Q22 & B-Q23 — Composite & Inverse Functions
Solution Solution
If f : A → B and g : B → C , the composite If f : A → B is bijective, its inverse f −1 : B →
(g ◦ f ) : A → C is defined as: A satisfies:
Key Idea
Only bijective functions have inverses. f −1 “undoes” f : (f −1 ◦ f )(x) = x (identity function).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 17 / 29
B-Q22 & B-Q23 — Composite & Inverse Functions
Solution Solution
If f : A → B and g : B → C , the composite If f : A → B is bijective, its inverse f −1 : B →
(g ◦ f ) : A → C is defined as: A satisfies:
Key Idea
Only bijective functions have inverses. f −1 “undoes” f : (f −1 ◦ f )(x) = x (identity function).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 17 / 29
B-Q22 & B-Q23 — Composite & Inverse Functions
Solution Solution
If f : A → B and g : B → C , the composite If f : A → B is bijective, its inverse f −1 : B →
(g ◦ f ) : A → C is defined as: A satisfies:
Key Idea
Only bijective functions have inverses. f −1 “undoes” f : (f −1 ◦ f )(x) = x (identity function).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 17 / 29
B-Q22 & B-Q23 — Composite & Inverse Functions
Solution Solution
If f : A → B and g : B → C , the composite If f : A → B is bijective, its inverse f −1 : B →
(g ◦ f ) : A → C is defined as: A satisfies:
Key Idea
Only bijective functions have inverses. f −1 “undoes” f : (f −1 ◦ f )(x) = x (identity function).
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 17 / 29
C-Q15 — Congruence Modulo m is Equivalence [1/2]
Question
Prove that congruence modulo m is an equivalence relation on Z. [5–6 marks]
Definition
a ≡ b (mod m) if and only if m | (a − b),
i.e., a − b = km for some integer k.
2. Symmetric – If a ≡ b, show b ≡ a
If a ≡ b (mod m), then a − b = km for some k ∈ Z.
Then b − a = −(a − b) = (−k)m, so m | (b − a).
∴ b ≡ a (mod m). Symmetric!
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 18 / 29
C-Q15 — Congruence Modulo m is Equivalence [1/2]
Question
Prove that congruence modulo m is an equivalence relation on Z. [5–6 marks]
Definition
a ≡ b (mod m) if and only if m | (a − b),
i.e., a − b = km for some integer k.
2. Symmetric – If a ≡ b, show b ≡ a
If a ≡ b (mod m), then a − b = km for some k ∈ Z.
Then b − a = −(a − b) = (−k)m, so m | (b − a).
∴ b ≡ a (mod m). Symmetric!
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 18 / 29
C-Q15 — Congruence Modulo m is Equivalence [1/2]
Question
Prove that congruence modulo m is an equivalence relation on Z. [5–6 marks]
Definition
a ≡ b (mod m) if and only if m | (a − b),
i.e., a − b = km for some integer k.
2. Symmetric – If a ≡ b, show b ≡ a
If a ≡ b (mod m), then a − b = km for some k ∈ Z.
Then b − a = −(a − b) = (−k)m, so m | (b − a).
∴ b ≡ a (mod m). Symmetric!
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 18 / 29
C-Q15 — Congruence Modulo m is Equivalence [1/2]
Question
Prove that congruence modulo m is an equivalence relation on Z. [5–6 marks]
Definition
a ≡ b (mod m) if and only if m | (a − b),
i.e., a − b = km for some integer k.
2. Symmetric – If a ≡ b, show b ≡ a
If a ≡ b (mod m), then a − b = km for some k ∈ Z.
Then b − a = −(a − b) = (−k)m, so m | (b − a).
∴ b ≡ a (mod m). Symmetric!
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 18 / 29
C-Q15 — Congruence Modulo m is Equivalence [1/2]
Question
Prove that congruence modulo m is an equivalence relation on Z. [5–6 marks]
Definition
a ≡ b (mod m) if and only if m | (a − b),
i.e., a − b = km for some integer k.
2. Symmetric – If a ≡ b, show b ≡ a
If a ≡ b (mod m), then a − b = km for some k ∈ Z.
Then b − a = −(a − b) = (−k)m, so m | (b − a).
∴ b ≡ a (mod m). Symmetric!
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 18 / 29
C-Q15 — Congruence Modulo m is Equivalence [1/2]
Question
Prove that congruence modulo m is an equivalence relation on Z. [5–6 marks]
Definition
a ≡ b (mod m) if and only if m | (a − b),
i.e., a − b = km for some integer k.
2. Symmetric – If a ≡ b, show b ≡ a
If a ≡ b (mod m), then a − b = km for some k ∈ Z.
Then b − a = −(a − b) = (−k)m, so m | (b − a).
∴ b ≡ a (mod m). Symmetric!
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 18 / 29
C-Q15 — Congruence Modulo m is Equivalence [2/2]
3. Transitive – If a ≡ b and b ≡ c, show a ≡ c
Suppose a ≡ b (mod m) and b ≡ c (mod m).
Then a − b = k1 m and b − c = k2 m for integers k1 , k2 .
a − c = (a − b) + (b − c) = k1 m + k2 m = (k1 + k2 ) m
Solution
Congruence modulo m is reflexive, symmetric, and transitive – therefore it is an equivalence
relation on Z. □
Key Idea
Equivalence Classes (for m = 3):
[0] = {. . . , −6, −3, 0, 3, 6, . . .}
[1] = {. . . , −5, −2, 1, 4, 7, . . .}
[2] = {. . . , −4, −1, 2, 5, 8, . . .}
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 19 / 29
C-Q15 — Congruence Modulo m is Equivalence [2/2]
3. Transitive – If a ≡ b and b ≡ c, show a ≡ c
Suppose a ≡ b (mod m) and b ≡ c (mod m).
Then a − b = k1 m and b − c = k2 m for integers k1 , k2 .
a − c = (a − b) + (b − c) = k1 m + k2 m = (k1 + k2 ) m
Solution
Congruence modulo m is reflexive, symmetric, and transitive – therefore it is an equivalence
relation on Z. □
Key Idea
Equivalence Classes (for m = 3):
[0] = {. . . , −6, −3, 0, 3, 6, . . .}
[1] = {. . . , −5, −2, 1, 4, 7, . . .}
[2] = {. . . , −4, −1, 2, 5, 8, . . .}
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 19 / 29
C-Q15 — Congruence Modulo m is Equivalence [2/2]
3. Transitive – If a ≡ b and b ≡ c, show a ≡ c
Suppose a ≡ b (mod m) and b ≡ c (mod m).
Then a − b = k1 m and b − c = k2 m for integers k1 , k2 .
a − c = (a − b) + (b − c) = k1 m + k2 m = (k1 + k2 ) m
Solution
Congruence modulo m is reflexive, symmetric, and transitive – therefore it is an equivalence
relation on Z. □
Key Idea
Equivalence Classes (for m = 3):
[0] = {. . . , −6, −3, 0, 3, 6, . . .}
[1] = {. . . , −5, −2, 1, 4, 7, . . .}
[2] = {. . . , −4, −1, 2, 5, 8, . . .}
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 19 / 29
C-Q15 — Congruence Modulo m is Equivalence [2/2]
3. Transitive – If a ≡ b and b ≡ c, show a ≡ c
Suppose a ≡ b (mod m) and b ≡ c (mod m).
Then a − b = k1 m and b − c = k2 m for integers k1 , k2 .
a − c = (a − b) + (b − c) = k1 m + k2 m = (k1 + k2 ) m
Solution
Congruence modulo m is reflexive, symmetric, and transitive – therefore it is an equivalence
relation on Z. □
Key Idea
Equivalence Classes (for m = 3):
[0] = {. . . , −6, −3, 0, 3, 6, . . .}
[1] = {. . . , −5, −2, 1, 4, 7, . . .}
[2] = {. . . , −4, −1, 2, 5, 8, . . .}
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 19 / 29
C-Q15 — Congruence Modulo m is Equivalence [2/2]
3. Transitive – If a ≡ b and b ≡ c, show a ≡ c
Suppose a ≡ b (mod m) and b ≡ c (mod m).
Then a − b = k1 m and b − c = k2 m for integers k1 , k2 .
a − c = (a − b) + (b − c) = k1 m + k2 m = (k1 + k2 ) m
Solution
Congruence modulo m is reflexive, symmetric, and transitive – therefore it is an equivalence
relation on Z. □
Key Idea
Equivalence Classes (for m = 3):
[0] = {. . . , −6, −3, 0, 3, 6, . . .}
[1] = {. . . , −5, −2, 1, 4, 7, . . .}
[2] = {. . . , −4, −1, 2, 5, 8, . . .}
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 19 / 29
C-Q17 — Digraph and Matrix for R = {(1, 2), (2, 3), (3, 1), (1, 3)}
Question
Represent R = {(1, 2), (2, 3), (3, 1), (1, 3)} on A = {1, 2, 3} using a digraph and a matrix. [5–6
marks]
1 2 3
1 0 1 1
MR =
2 3 2 0 0 1
3 1 0 0
Blue arrows: cycle 1 → 2 → 3 → 1.
Orange arrow: extra edge (1, 3). Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 20 / 29
C-Q17 — Digraph and Matrix for R = {(1, 2), (2, 3), (3, 1), (1, 3)}
Question
Represent R = {(1, 2), (2, 3), (3, 1), (1, 3)} on A = {1, 2, 3} using a digraph and a matrix. [5–6
marks]
1 2 3
1 0 1 1
MR =
2 3 2 0 0 1
3 1 0 0
Blue arrows: cycle 1 → 2 → 3 → 1.
Orange arrow: extra edge (1, 3). Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 20 / 29
C-Q17 — Digraph and Matrix for R = {(1, 2), (2, 3), (3, 1), (1, 3)}
Question
Represent R = {(1, 2), (2, 3), (3, 1), (1, 3)} on A = {1, 2, 3} using a digraph and a matrix. [5–6
marks]
1 2 3
1 0 1 1
MR =
2 3 2 0 0 1
3 1 0 0
Blue arrows: cycle 1 → 2 → 3 → 1.
Orange arrow: extra edge (1, 3). Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 20 / 29
C-Q17 — Digraph and Matrix for R = {(1, 2), (2, 3), (3, 1), (1, 3)}
Question
Represent R = {(1, 2), (2, 3), (3, 1), (1, 3)} on A = {1, 2, 3} using a digraph and a matrix. [5–6
marks]
1 2 3
1 0 1 1
MR =
2 3 2 0 0 1
3 1 0 0
Blue arrows: cycle 1 → 2 → 3 → 1.
Orange arrow: extra edge (1, 3). Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 20 / 29
C-Q17 — Digraph and Matrix for R = {(1, 2), (2, 3), (3, 1), (1, 3)}
Question
Represent R = {(1, 2), (2, 3), (3, 1), (1, 3)} on A = {1, 2, 3} using a digraph and a matrix. [5–6
marks]
1 2 3
1 0 1 1
MR =
2 3 2 0 0 1
3 1 0 0
Blue arrows: cycle 1 → 2 → 3 → 1.
Orange arrow: extra edge (1, 3). Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 20 / 29
C-Q17 — Digraph and Matrix for R = {(1, 2), (2, 3), (3, 1), (1, 3)}
Question
Represent R = {(1, 2), (2, 3), (3, 1), (1, 3)} on A = {1, 2, 3} using a digraph and a matrix. [5–6
marks]
1 2 3
1 0 1 1
MR =
2 3 2 0 0 1
3 1 0 0
Blue arrows: cycle 1 → 2 → 3 → 1.
Orange arrow: extra edge (1, 3). Key Idea
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 20 / 29
C-Q19 — Finding the Inverse Function
Question
If f : R → R, f (x) = 3x + 2, find f −1 (x). [5 marks]
Solution
Method: Write y = f (x), solve for x, then rename y → x for the final formula.
Step 1 – Write y = f (x):
y = 3x + 2
Step 2 – Solve for x:
y − 2 = 3x
y −2
x=
3
Step 3 – Replace y with x (standard convention):
x −2
f −1 (x) =
3
x −2
Verify: f f −1 (x) = 3 ·
+ 2 = (x − 2) + 2 = x ✓
3
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 21 / 29
C-Q19 — Finding the Inverse Function
Question
If f : R → R, f (x) = 3x + 2, find f −1 (x). [5 marks]
Solution
Method: Write y = f (x), solve for x, then rename y → x for the final formula.
Step 1 – Write y = f (x):
y = 3x + 2
Step 2 – Solve for x:
y − 2 = 3x
y −2
x=
3
Step 3 – Replace y with x (standard convention):
x −2
f −1 (x) =
3
x −2
Verify: f f −1 (x) = 3 ·
+ 2 = (x − 2) + 2 = x ✓
3
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 21 / 29
C-Q19 — Finding the Inverse Function
Question
If f : R → R, f (x) = 3x + 2, find f −1 (x). [5 marks]
Solution
Method: Write y = f (x), solve for x, then rename y → x for the final formula.
Step 1 – Write y = f (x):
y = 3x + 2
Step 2 – Solve for x:
y − 2 = 3x
y −2
x=
3
Step 3 – Replace y with x (standard convention):
x −2
f −1 (x) =
3
x −2
Verify: f f −1 (x) = 3 ·
+ 2 = (x − 2) + 2 = x ✓
3
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 21 / 29
C-Q19 — Finding the Inverse Function
Question
If f : R → R, f (x) = 3x + 2, find f −1 (x). [5 marks]
Solution
Method: Write y = f (x), solve for x, then rename y → x for the final formula.
Step 1 – Write y = f (x):
y = 3x + 2
Step 2 – Solve for x:
y − 2 = 3x
y −2
x=
3
Step 3 – Replace y with x (standard convention):
x −2
f −1 (x) =
3
x −2
Verify: f f −1 (x) = 3 ·
+ 2 = (x − 2) + 2 = x ✓
3
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 21 / 29
C-Q19 — Finding the Inverse Function
Question
If f : R → R, f (x) = 3x + 2, find f −1 (x). [5 marks]
Solution
Method: Write y = f (x), solve for x, then rename y → x for the final formula.
Step 1 – Write y = f (x):
y = 3x + 2
Step 2 – Solve for x:
y − 2 = 3x
y −2
x=
3
Step 3 – Replace y with x (standard convention):
x −2
f −1 (x) =
3
x −2
Verify: f f −1 (x) = 3 ·
+ 2 = (x − 2) + 2 = x ✓
3
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 21 / 29
C-Q19 — Finding the Inverse Function
Question
If f : R → R, f (x) = 3x + 2, find f −1 (x). [5 marks]
Solution
Method: Write y = f (x), solve for x, then rename y → x for the final formula.
Step 1 – Write y = f (x):
y = 3x + 2
Step 2 – Solve for x:
y − 2 = 3x
y −2
x=
3
Step 3 – Replace y with x (standard convention):
x −2
f −1 (x) =
3
x −2
Verify: f f −1 (x) = 3 ·
+ 2 = (x − 2) + 2 = x ✓
3
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 21 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q20 — Composition – (g ◦ f )(x) and (f ◦ g )(x)
Question
√
If f (x) = x 2 and g (x) = x, find (g ◦ f )(x) and (f ◦ g )(x). [5 marks]
Key Idea
(f ◦ g )(x) = x means f and g are inverse functions (on [0, ∞))!
But (g ◦ f )(x) = |x| =
̸ x, confirming g ◦ f ̸= f ◦ g in general.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 22 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [1/2]
Question
Prove that f : R → R, f (x) = 2x + 3, is one-to-one and onto. [5–6 marks]
2x1 + 3 = 2x2 + 3
2x1 = 2x2
x1 = x2 ✓
∴ f is injective (one-to-one).
Key Idea
Template for injective proofs:
“Assume f (x1 ) = f (x2 )” −→ algebraic steps −→ conclude x1 = x2 .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 23 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [1/2]
Question
Prove that f : R → R, f (x) = 2x + 3, is one-to-one and onto. [5–6 marks]
2x1 + 3 = 2x2 + 3
2x1 = 2x2
x1 = x2 ✓
∴ f is injective (one-to-one).
Key Idea
Template for injective proofs:
“Assume f (x1 ) = f (x2 )” −→ algebraic steps −→ conclude x1 = x2 .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 23 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [1/2]
Question
Prove that f : R → R, f (x) = 2x + 3, is one-to-one and onto. [5–6 marks]
2x1 + 3 = 2x2 + 3
2x1 = 2x2
x1 = x2 ✓
∴ f is injective (one-to-one).
Key Idea
Template for injective proofs:
“Assume f (x1 ) = f (x2 )” −→ algebraic steps −→ conclude x1 = x2 .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 23 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [1/2]
Question
Prove that f : R → R, f (x) = 2x + 3, is one-to-one and onto. [5–6 marks]
2x1 + 3 = 2x2 + 3
2x1 = 2x2
x1 = x2 ✓
∴ f is injective (one-to-one).
Key Idea
Template for injective proofs:
“Assume f (x1 ) = f (x2 )” −→ algebraic steps −→ conclude x1 = x2 .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 23 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [1/2]
Question
Prove that f : R → R, f (x) = 2x + 3, is one-to-one and onto. [5–6 marks]
2x1 + 3 = 2x2 + 3
2x1 = 2x2
x1 = x2 ✓
∴ f is injective (one-to-one).
Key Idea
Template for injective proofs:
“Assume f (x1 ) = f (x2 )” −→ algebraic steps −→ conclude x1 = x2 .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 23 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [1/2]
Question
Prove that f : R → R, f (x) = 2x + 3, is one-to-one and onto. [5–6 marks]
2x1 + 3 = 2x2 + 3
2x1 = 2x2
x1 = x2 ✓
∴ f is injective (one-to-one).
Key Idea
Template for injective proofs:
“Assume f (x1 ) = f (x2 )” −→ algebraic steps −→ conclude x1 = x2 .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 23 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [1/2]
Question
Prove that f : R → R, f (x) = 2x + 3, is one-to-one and onto. [5–6 marks]
2x1 + 3 = 2x2 + 3
2x1 = 2x2
x1 = x2 ✓
∴ f is injective (one-to-one).
Key Idea
Template for injective proofs:
“Assume f (x1 ) = f (x2 )” −→ algebraic steps −→ conclude x1 = x2 .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 23 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [1/2]
Question
Prove that f : R → R, f (x) = 2x + 3, is one-to-one and onto. [5–6 marks]
2x1 + 3 = 2x2 + 3
2x1 = 2x2
x1 = x2 ✓
∴ f is injective (one-to-one).
Key Idea
Template for injective proofs:
“Assume f (x1 ) = f (x2 )” −→ algebraic steps −→ conclude x1 = x2 .
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 23 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [2/2]
2x + 3 = y
y −3
x=
2
y −3
Since y ∈ R, we have x = ∈ R. ✓
2
y −3 y −3
Verify: f =2· + 3 = (y − 3) + 3 = y ✓
2 2
∴ f is surjective (onto).
Solution
Since f (x) = 2x + 3 is both injective and surjective, it is bijective. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 24 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [2/2]
2x + 3 = y
y −3
x=
2
y −3
Since y ∈ R, we have x = ∈ R. ✓
2
y −3 y −3
Verify: f =2· + 3 = (y − 3) + 3 = y ✓
2 2
∴ f is surjective (onto).
Solution
Since f (x) = 2x + 3 is both injective and surjective, it is bijective. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 24 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [2/2]
2x + 3 = y
y −3
x=
2
y −3
Since y ∈ R, we have x = ∈ R. ✓
2
y −3 y −3
Verify: f =2· + 3 = (y − 3) + 3 = y ✓
2 2
∴ f is surjective (onto).
Solution
Since f (x) = 2x + 3 is both injective and surjective, it is bijective. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 24 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [2/2]
2x + 3 = y
y −3
x=
2
y −3
Since y ∈ R, we have x = ∈ R. ✓
2
y −3 y −3
Verify: f =2· + 3 = (y − 3) + 3 = y ✓
2 2
∴ f is surjective (onto).
Solution
Since f (x) = 2x + 3 is both injective and surjective, it is bijective. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 24 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [2/2]
2x + 3 = y
y −3
x=
2
y −3
Since y ∈ R, we have x = ∈ R. ✓
2
y −3 y −3
Verify: f =2· + 3 = (y − 3) + 3 = y ✓
2 2
∴ f is surjective (onto).
Solution
Since f (x) = 2x + 3 is both injective and surjective, it is bijective. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 24 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [2/2]
2x + 3 = y
y −3
x=
2
y −3
Since y ∈ R, we have x = ∈ R. ✓
2
y −3 y −3
Verify: f =2· + 3 = (y − 3) + 3 = y ✓
2 2
∴ f is surjective (onto).
Solution
Since f (x) = 2x + 3 is both injective and surjective, it is bijective. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 24 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [2/2]
2x + 3 = y
y −3
x=
2
y −3
Since y ∈ R, we have x = ∈ R. ✓
2
y −3 y −3
Verify: f =2· + 3 = (y − 3) + 3 = y ✓
2 2
∴ f is surjective (onto).
Solution
Since f (x) = 2x + 3 is both injective and surjective, it is bijective. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 24 / 29
C-Q21 — Prove f (x) = 2x + 3 is Bijective [2/2]
2x + 3 = y
y −3
x=
2
y −3
Since y ∈ R, we have x = ∈ R. ✓
2
y −3 y −3
Verify: f =2· + 3 = (y − 3) + 3 = y ✓
2 2
∴ f is surjective (onto).
Solution
Since f (x) = 2x + 3 is both injective and surjective, it is bijective. □
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 24 / 29
C-Q25 — Composition of Bijections is Bijective [1/2]
Question
Prove: if f : A → B and g : B → C are both bijective, then g ◦ f : A → C is bijective. [5–6 marks]
Part 1 – g ◦ f is Injective:
Let a1 , a2 ∈ A and suppose (g ◦ f )(a1 ) = (g ◦ f )(a2 ).
⇒ g (f (a1 )) = g (f (a2 ))
⇒ f (a1 ) = f (a2 ) [g is injective]
⇒ a1 = a2 [f is injective] ✓
g ◦ f is injective.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 25 / 29
C-Q25 — Composition of Bijections is Bijective [1/2]
Question
Prove: if f : A → B and g : B → C are both bijective, then g ◦ f : A → C is bijective. [5–6 marks]
Part 1 – g ◦ f is Injective:
Let a1 , a2 ∈ A and suppose (g ◦ f )(a1 ) = (g ◦ f )(a2 ).
⇒ g (f (a1 )) = g (f (a2 ))
⇒ f (a1 ) = f (a2 ) [g is injective]
⇒ a1 = a2 [f is injective] ✓
g ◦ f is injective.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 25 / 29
C-Q25 — Composition of Bijections is Bijective [1/2]
Question
Prove: if f : A → B and g : B → C are both bijective, then g ◦ f : A → C is bijective. [5–6 marks]
Part 1 – g ◦ f is Injective:
Let a1 , a2 ∈ A and suppose (g ◦ f )(a1 ) = (g ◦ f )(a2 ).
⇒ g (f (a1 )) = g (f (a2 ))
⇒ f (a1 ) = f (a2 ) [g is injective]
⇒ a1 = a2 [f is injective] ✓
g ◦ f is injective.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 25 / 29
C-Q25 — Composition of Bijections is Bijective [1/2]
Question
Prove: if f : A → B and g : B → C are both bijective, then g ◦ f : A → C is bijective. [5–6 marks]
Part 1 – g ◦ f is Injective:
Let a1 , a2 ∈ A and suppose (g ◦ f )(a1 ) = (g ◦ f )(a2 ).
⇒ g (f (a1 )) = g (f (a2 ))
⇒ f (a1 ) = f (a2 ) [g is injective]
⇒ a1 = a2 [f is injective] ✓
g ◦ f is injective.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 25 / 29
C-Q25 — Composition of Bijections is Bijective [1/2]
Question
Prove: if f : A → B and g : B → C are both bijective, then g ◦ f : A → C is bijective. [5–6 marks]
Part 1 – g ◦ f is Injective:
Let a1 , a2 ∈ A and suppose (g ◦ f )(a1 ) = (g ◦ f )(a2 ).
⇒ g (f (a1 )) = g (f (a2 ))
⇒ f (a1 ) = f (a2 ) [g is injective]
⇒ a1 = a2 [f is injective] ✓
g ◦ f is injective.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 25 / 29
C-Q25 — Composition of Bijections is Bijective [1/2]
Question
Prove: if f : A → B and g : B → C are both bijective, then g ◦ f : A → C is bijective. [5–6 marks]
Part 1 – g ◦ f is Injective:
Let a1 , a2 ∈ A and suppose (g ◦ f )(a1 ) = (g ◦ f )(a2 ).
⇒ g (f (a1 )) = g (f (a2 ))
⇒ f (a1 ) = f (a2 ) [g is injective]
⇒ a1 = a2 [f is injective] ✓
g ◦ f is injective.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 25 / 29
C-Q25 — Composition of Bijections is Bijective [1/2]
Question
Prove: if f : A → B and g : B → C are both bijective, then g ◦ f : A → C is bijective. [5–6 marks]
Part 1 – g ◦ f is Injective:
Let a1 , a2 ∈ A and suppose (g ◦ f )(a1 ) = (g ◦ f )(a2 ).
⇒ g (f (a1 )) = g (f (a2 ))
⇒ f (a1 ) = f (a2 ) [g is injective]
⇒ a1 = a2 [f is injective] ✓
g ◦ f is injective.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 25 / 29
C-Q25 — Composition of Bijections is Bijective [2/2]
Part 2 – g ◦ f is Surjective:
Let c ∈ C be arbitrary.
Since g is surjective: ∃ b ∈ B s.t. g (b) = c.
Since f is surjective: ∃ a ∈ A s.t. f (a) = b.
Then (g ◦ f )(a) = g (f (a)) = g (b) = c. ✓
g ◦ f is surjective.
Solution
Since g ◦ f is both injective and surjective, it is bijective. □
Key Idea
Bonus fact: (g ◦ f )−1 = f −1 ◦ g −1
(Reverse the composition order when inverting. Think: to undo “put on socks then shoes”, first
take off shoes, then socks.)
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 26 / 29
C-Q25 — Composition of Bijections is Bijective [2/2]
Part 2 – g ◦ f is Surjective:
Let c ∈ C be arbitrary.
Since g is surjective: ∃ b ∈ B s.t. g (b) = c.
Since f is surjective: ∃ a ∈ A s.t. f (a) = b.
Then (g ◦ f )(a) = g (f (a)) = g (b) = c. ✓
g ◦ f is surjective.
Solution
Since g ◦ f is both injective and surjective, it is bijective. □
Key Idea
Bonus fact: (g ◦ f )−1 = f −1 ◦ g −1
(Reverse the composition order when inverting. Think: to undo “put on socks then shoes”, first
take off shoes, then socks.)
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 26 / 29
C-Q25 — Composition of Bijections is Bijective [2/2]
Part 2 – g ◦ f is Surjective:
Let c ∈ C be arbitrary.
Since g is surjective: ∃ b ∈ B s.t. g (b) = c.
Since f is surjective: ∃ a ∈ A s.t. f (a) = b.
Then (g ◦ f )(a) = g (f (a)) = g (b) = c. ✓
g ◦ f is surjective.
Solution
Since g ◦ f is both injective and surjective, it is bijective. □
Key Idea
Bonus fact: (g ◦ f )−1 = f −1 ◦ g −1
(Reverse the composition order when inverting. Think: to undo “put on socks then shoes”, first
take off shoes, then socks.)
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 26 / 29
C-Q25 — Composition of Bijections is Bijective [2/2]
Part 2 – g ◦ f is Surjective:
Let c ∈ C be arbitrary.
Since g is surjective: ∃ b ∈ B s.t. g (b) = c.
Since f is surjective: ∃ a ∈ A s.t. f (a) = b.
Then (g ◦ f )(a) = g (f (a)) = g (b) = c. ✓
g ◦ f is surjective.
Solution
Since g ◦ f is both injective and surjective, it is bijective. □
Key Idea
Bonus fact: (g ◦ f )−1 = f −1 ◦ g −1
(Reverse the composition order when inverting. Think: to undo “put on socks then shoes”, first
take off shoes, then socks.)
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 26 / 29
C-Q25 — Composition of Bijections is Bijective [2/2]
Part 2 – g ◦ f is Surjective:
Let c ∈ C be arbitrary.
Since g is surjective: ∃ b ∈ B s.t. g (b) = c.
Since f is surjective: ∃ a ∈ A s.t. f (a) = b.
Then (g ◦ f )(a) = g (f (a)) = g (b) = c. ✓
g ◦ f is surjective.
Solution
Since g ◦ f is both injective and surjective, it is bijective. □
Key Idea
Bonus fact: (g ◦ f )−1 = f −1 ◦ g −1
(Reverse the composition order when inverting. Think: to undo “put on socks then shoes”, first
take off shoes, then socks.)
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 26 / 29
C-Q25 — Composition of Bijections is Bijective [2/2]
Part 2 – g ◦ f is Surjective:
Let c ∈ C be arbitrary.
Since g is surjective: ∃ b ∈ B s.t. g (b) = c.
Since f is surjective: ∃ a ∈ A s.t. f (a) = b.
Then (g ◦ f )(a) = g (f (a)) = g (b) = c. ✓
g ◦ f is surjective.
Solution
Since g ◦ f is both injective and surjective, it is bijective. □
Key Idea
Bonus fact: (g ◦ f )−1 = f −1 ◦ g −1
(Reverse the composition order when inverting. Think: to undo “put on socks then shoes”, first
take off shoes, then socks.)
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 26 / 29
C-Q25 — Composition of Bijections is Bijective [2/2]
Part 2 – g ◦ f is Surjective:
Let c ∈ C be arbitrary.
Since g is surjective: ∃ b ∈ B s.t. g (b) = c.
Since f is surjective: ∃ a ∈ A s.t. f (a) = b.
Then (g ◦ f )(a) = g (f (a)) = g (b) = c. ✓
g ◦ f is surjective.
Solution
Since g ◦ f is both injective and surjective, it is bijective. □
Key Idea
Bonus fact: (g ◦ f )−1 = f −1 ◦ g −1
(Reverse the composition order when inverting. Think: to undo “put on socks then shoes”, first
take off shoes, then socks.)
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 26 / 29
Properties of Relations – Complete Reference
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 27 / 29
Properties of Relations – Complete Reference
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 27 / 29
Properties of Relations – Complete Reference
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 27 / 29
Types of Functions – Complete Reference
Inverse Functions
f −1 exists ⇔ f is bijective. Find it: set y = f (x), solve for x, rename y → x.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 28 / 29
Types of Functions – Complete Reference
Inverse Functions
f −1 exists ⇔ f is bijective. Find it: set y = f (x), solve for x, rename y → x.
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 28 / 29
Unit III – Relations & Functions
Questions & Solutions: Complete
Interactive Study Guide (BCA Programme · Second Semester) Unit III – Relations & Functions 29 / 29