Class 12Mathematics · Relations & FunctionsFull chapter

Relations and Functions

The whole chapter in one place — read it, then test yourself. Clear notes, formula sheet, a practice quiz, and worked NCERT solutions & PYQs.

Relations: Definition and Types

Quick answer A relation from set A to set B is a subset of A × B; this section covers how relations are defined and the key properties — reflexive, symmetric and transitive — used to classify them.

If A and B are two non-empty sets, a relation R from A to B is simply a subset of the Cartesian product A × B. So R ⊆ A × B, and if (a, b) ∈ R we write a R b, read as "a is related to b". The set of first elements of the ordered pairs in R is called the domain of R, and the set of second elements is called the range of R.

When A = B, we simply say R is a relation on the set A, and R ⊆ A × A. Two special relations on any set A are worth naming: the empty relation R = ∅ (no element of A is related to any element), and the universal relation R = A × A (every element is related to every element, including itself).

To study relations in general, we classify them using three key properties:

  • Reflexive: R is reflexive if (a, a) ∈ R for every a ∈ A.
  • Symmetric: R is symmetric if (a, b) ∈ R ⟹ (b, a) ∈ R for all a, b ∈ A.
  • Transitive: R is transitive if (a, b) ∈ R and (b, c) ∈ R ⟹ (a, c) ∈ R for all a, b, c ∈ A.

Worked Example: Let A = {1, 2, 3, 4} and let R = {(a, b) : a divides b}. Check whether R is reflexive, symmetric and transitive.

Reflexive: every natural number divides itself, so (a, a) ∈ R for all a ∈ A. Hence R is reflexive.

Symmetric: (1, 2) ∈ R because 1 divides 2, but (2, 1) ∉ R because 2 does not divide 1. So R is not symmetric.

Transitive: suppose (a, b) ∈ R and (b, c) ∈ R, i.e., a divides b and b divides c. Then a must divide c as well (since b = ka and c = mb = mka for integers k, m). So (a, c) ∈ R, and R is transitive.

Conclusion: R is reflexive and transitive, but not symmetric.

Number of relations from A to B Total relations = 2^(m×n) where |A| = m and |B| = n, since A × B has mn ordered pairs and each subset is a relation.
Reflexive condition (a, a) ∈ R, ∀ a ∈ A Every element must be related to itself.
Symmetric condition (a, b) ∈ R ⟹ (b, a) ∈ R Relation must work both ways.
Transitive condition (a, b) ∈ R and (b, c) ∈ R ⟹ (a, c) ∈ R Chained relations must close up.
Remember
  • A relation R from A to B is any subset of A × B.
  • Empty relation: R = ∅; Universal relation: R = A × A.
  • Reflexive needs every (a, a); symmetric needs (a,b) to force (b,a); transitive needs (a,b) & (b,c) to force (a,c).
  • A relation can satisfy some properties and fail others — always test all three separately.
  • 'a divides b' on a set of natural numbers is reflexive and transitive but not symmetric.

Equivalence Relations and Equivalence Classes

Quick answer A relation that is reflexive, symmetric and transitive all at once is called an equivalence relation; it splits its set into disjoint equivalence classes that together partition the set.

A relation R on a set A is called an equivalence relation if it is simultaneously reflexive, symmetric and transitive. Equivalence relations are important because they behave like "sameness" — they group elements of A into non-overlapping clusters called equivalence classes.

For a ∈ A, the equivalence class of a, denoted [a], is defined as [a] = {x ∈ A : (x, a) ∈ R}, i.e., the set of all elements related to a. A fundamental fact is that any two equivalence classes are either identical or completely disjoint, and the union of all distinct equivalence classes is the whole set A. This means an equivalence relation always partitions A into disjoint, non-empty subsets.

Worked Example: Let R be the relation on the set of integers Z defined by a R b if and only if (a − b) is divisible by 3 (congruence modulo 3). Show R is an equivalence relation and list its equivalence classes.

Reflexive: a − a = 0, and 3 divides 0, so (a, a) ∈ R for every a. R is reflexive.

Symmetric: if (a − b) is divisible by 3, say a − b = 3k, then b − a = 3(−k), which is also divisible by 3. So (b, a) ∈ R. R is symmetric.

Transitive: if a − b = 3k and b − c = 3m, adding gives a − c = 3(k + m), which is divisible by 3. So R is transitive.

Hence R is an equivalence relation. Every integer leaves remainder 0, 1 or 2 on division by 3, so there are exactly three equivalence classes:

  • [0] = {..., −6, −3, 0, 3, 6, ...} (multiples of 3)
  • [1] = {..., −5, −2, 1, 4, 7, ...}
  • [2] = {..., −4, −1, 2, 5, 8, ...}

These three classes are disjoint and their union is all of Z, exactly as the partition property predicts.

Equivalence class [a] = {x ∈ A : (x, a) ∈ R} Set of elements related to a.
Congruence modulo n a ≡ b (mod n) ⟺ n divides (a − b) Standard equivalence relation used to build equivalence classes {0,1,...,n−1}.
Remember
  • Equivalence relation = reflexive + symmetric + transitive, all three together.
  • Equivalence class [a] = set of all elements related to a.
  • Distinct equivalence classes are always disjoint; they never partially overlap.
  • The union of all equivalence classes recovers the original set A (a partition).
  • Congruence modulo n is the classic example of an equivalence relation on integers.

Types of Functions: One-One and Onto

Quick answer Functions are classified by how they map inputs to outputs — one-one (injective) functions never repeat an image, while onto (surjective) functions cover the entire codomain.

A function f : A → B assigns to every element of A exactly one element of B. Two important properties describe how efficiently f uses its codomain:

  • One-one (injective): f is one-one if distinct elements of A always have distinct images in B, i.e., f(x₁) = f(x₂) ⟹ x₁ = x₂ (equivalently, x₁ ≠ x₂ ⟹ f(x₁) ≠ f(x₂)).
  • Onto (surjective): f is onto if every element of B is the image of at least one element of A, i.e., for every y ∈ B there exists some x ∈ A such that f(x) = y. In other words, Range(f) = B.

Worked Example 1: Let f : R → R be defined by f(x) = 2x + 3. Show f is one-one and onto.

One-one: assume f(x₁) = f(x₂). Then 2x₁ + 3 = 2x₂ + 3, so 2x₁ = 2x₂, giving x₁ = x₂. Hence f is one-one.

Onto: let y ∈ R be any real number. We need x ∈ R with f(x) = y, i.e., 2x + 3 = y, so x = (y − 3)/2, which is a real number for every real y. Hence every y ∈ R has a pre-image, so f is onto.

Worked Example 2: Let f : R → R be defined by f(x) = x². Show f is neither one-one nor onto.

Not one-one: f(2) = 4 and f(−2) = 4, so two distinct inputs (2 and −2) give the same output. Hence f is not one-one.

Not onto: since x² ≥ 0 for every real x, no negative real number (e.g., −1) is ever the image of any x ∈ R. So Range(f) = [0, ∞) ≠ R, and f is not onto.

One-one (injective) test f(x₁) = f(x₂) ⟹ x₁ = x₂ Equivalently, different inputs must give different outputs.
Onto (surjective) condition Range(f) = Co-domain(B) Every element of B must have a pre-image in A.
Remember
  • One-one (injective): no two different inputs share an output.
  • Onto (surjective): every element of the codomain is hit by some input.
  • f(x) = 2x + 3 on R → R is both one-one and onto.
  • f(x) = x² on R → R is neither one-one (fails at ±a) nor onto (misses negative reals).
  • Onto-ness depends on the stated codomain — the same rule can be onto for one codomain and not for another.

Bijective Functions and Counting Functions

Quick answer A function that is both one-one and onto is called bijective; for finite sets, this section covers how to count the total number of functions, injections, and bijections between two sets.

A function f : A → B that is both one-one and onto is called a bijective function, or simply a bijection. Bijections set up a perfect one-to-one pairing between every element of A and every element of B — nothing in B is left out, and nothing in B is repeated. A useful consequence is that if A and B are finite sets and a bijection f : A → B exists, then A and B must have the same number of elements.

Counting functions between finite sets is a common application. Suppose |A| = m and |B| = n.

  • The total number of functions from A to B is nᵐ, since each of the m elements of A can independently be mapped to any of the n elements of B.
  • The number of one-one functions (injections) from A to B, when m ≤ n, is ⁿPₘ = n! / (n − m)!, since the images of the m elements must all be distinct, chosen in order from n available elements.
  • When m = n, every one-one function from A to B is automatically onto too (and vice-versa), so the number of bijections from a set with n elements to itself is simply n!.

Worked Example: Let A = {a, b, c} (3 elements) and B = {1, 2, 3, 4, 5} (5 elements). Find the number of one-one functions from A to B, and the number of bijections from A to A.

Number of one-one functions from A to B: here m = 3, n = 5, so the count is ⁵P₃ = 5! / (5 − 3)! = 5 × 4 × 3 = 60.

Number of bijections from A to A: here A has 3 elements, so the count is 3! = 3 × 2 × 1 = 6.

Total functions Total functions from A to B = n^m |A| = m, |B| = n; each of m elements has n independent choices.
Number of one-one functions (m ≤ n) ⁿPₘ = n! / (n − m)! Images must be chosen distinctly and in order.
Number of bijections (m = n) n! Every arrangement of the n images is a valid bijection.
Remember
  • Bijective = one-one AND onto together — a perfect pairing between A and B.
  • A bijection between finite sets forces |A| = |B|.
  • Total functions from an m-set to an n-set: n^m.
  • One-one functions from an m-set to an n-set (m ≤ n): n!/(n−m)!.
  • Bijections from an n-set to itself: n!.

Composition of Functions

Quick answer Composing two functions chains them together — apply one function first, then feed its output into the second — and this section covers how to compute compositions and their key properties.

Given two functions f : A → B and g : B → C, their composition g∘f : A → C is defined by (g∘f)(x) = g(f(x)) for every x ∈ A. In words: first apply f to x to land in B, then apply g to that result to land in C. Note that g∘f is only defined when the codomain of f matches (or is contained in) the domain of g.

Composition of functions is associative: if f : A → B, g : B → C and h : C → D, then (h∘g)∘f = h∘(g∘f). However, composition is not commutative in general — g∘f and f∘g can be completely different functions, and one may not even be defined when the other is.

Worked Example: Let f(x) = 2x + 1 and g(x) = x² − 2, both functions R → R. Find g∘f and f∘g, and check whether they are equal.

(g∘f)(x) = g(f(x)) = g(2x + 1) = (2x + 1)² − 2 = 4x² + 4x + 1 − 2 = 4x² + 4x − 1.

(f∘g)(x) = f(g(x)) = f(x² − 2) = 2(x² − 2) + 1 = 2x² − 4 + 1 = 2x² − 3.

Clearly 4x² + 4x − 1 ≠ 2x² − 3 as functions (for instance, at x = 0 the first gives −1 while the second gives −3). So g∘f ≠ f∘g here, confirming that composition of functions does not commute in general.

Two useful facts connect composition with the properties from earlier sections: if both f and g are one-one, then g∘f is one-one; and if both f and g are onto, then g∘f is onto.

Composition of functions (g∘f)(x) = g(f(x)) f applied first, then g.
Associativity of composition (h∘g)∘f = h∘(g∘f) Grouping does not affect the result.
Remember
  • (g∘f)(x) = g(f(x)) — apply f first, then g.
  • Composition requires the range of f to fit inside the domain of g.
  • Composition is associative: (h∘g)∘f = h∘(g∘f).
  • Composition is generally NOT commutative: g∘f ≠ f∘g.
  • One-one ∘ one-one = one-one; onto ∘ onto = onto.

Invertible Functions

Quick answer A function has an inverse exactly when it is bijective; this section covers the definition of an invertible function, how to construct its inverse, and how to verify it.

A function f : A → B is called invertible if there exists a function g : B → A such that g∘f = IA (the identity function on A) and f∘g = IB (the identity function on B). Such a g, if it exists, is unique and is called the inverse of f, written f⁻¹.

The central theorem of this topic is: f is invertible if and only if f is bijective (both one-one and onto). This makes intuitive sense — to reverse f uniquely, every output must come from exactly one input (one-one), and every element of B must actually be reached so the inverse is defined everywhere on B (onto).

Worked Example: Let f : R → R be defined by f(x) = 3x − 4. Show f is invertible and find f⁻¹.

One-one: if f(x₁) = f(x₂), then 3x₁ − 4 = 3x₂ − 4, so 3x₁ = 3x₂, giving x₁ = x₂. Hence f is one-one.

Onto: for any y ∈ R, we need x with 3x − 4 = y, i.e., x = (y + 4)/3, which is always a real number. So f is onto.

Since f is bijective, it is invertible. To find f⁻¹, set y = 3x − 4 and solve for x: x = (y + 4)/3. Swapping the roles of the variable, f⁻¹(x) = (x + 4)/3.

Verification: f(f⁻¹(x)) = 3 × [(x + 4)/3] − 4 = (x + 4) − 4 = x, and f⁻¹(f(x)) = [(3x − 4) + 4]/3 = 3x/3 = x. Both checks confirm the inverse is correct.

Invertibility condition f invertible ⟺ f is bijective One-one and onto together are necessary and sufficient.
Inverse identity relations g∘f = I_A , f∘g = I_B I_A and I_B denote the identity functions on A and B.
Inverse of a linear function f(x) = ax + b (a ≠ 0) ⟹ f⁻¹(x) = (x − b)/a Solve y = ax+b for x, then relabel.
Remember
  • f is invertible ⟺ f is bijective (one-one and onto).
  • The inverse g satisfies g∘f = I_A and f∘g = I_B.
  • The inverse of a function, when it exists, is unique.
  • To find f⁻¹: write y = f(x), solve for x in terms of y, then swap variable names.
  • Always verify an inverse by checking f(f⁻¹(x)) = x and f⁻¹(f(x)) = x.

The formula sheet

Every formula in this chapter, in one place — screenshot it before your exam.

Total relations = 2^(m×n)
Number of relations from A to B
(a, a) ∈ R, ∀ a ∈ A
Reflexive condition
(a, b) ∈ R ⟹ (b, a) ∈ R
Symmetric condition
(a, b) ∈ R and (b, c) ∈ R ⟹ (a, c) ∈ R
Transitive condition
[a] = {x ∈ A : (x, a) ∈ R}
Equivalence class
a ≡ b (mod n) ⟺ n divides (a − b)
Congruence modulo n
f(x₁) = f(x₂) ⟹ x₁ = x₂
One-one (injective) test
Range(f) = Co-domain(B)
Onto (surjective) condition
Total functions from A to B = n^m
Total functions
ⁿPₘ = n! / (n − m)!
Number of one-one functions (m ≤ n)
n!
Number of bijections (m = n)
(g∘f)(x) = g(f(x))
Composition of functions
(h∘g)∘f = h∘(g∘f)
Associativity of composition
f invertible ⟺ f is bijective
Invertibility condition
g∘f = I_A , f∘g = I_B
Inverse identity relations
f(x) = ax + b (a ≠ 0) ⟹ f⁻¹(x) = (x − b)/a
Inverse of a linear function

Test yourself

Tap an answer to check it instantly — you'll see why it's right, and what to revise if it isn't.

0 correct · 0/12 answered
Q1 Relations - Definitions easy

A relation R on a set A is called reflexive if:

Q2 Relations - Reflexive easy

Let A = {1, 2, 3}. Which of these relations on A is NOT reflexive?

Q3 Relations - Types easy

The relation R = {(a, b) : a ≤ b} on the set of real numbers is:

Q4 Functions - Onto medium

A function f : A → B is called onto (surjective) if:

Q5 Functions - Bijective medium

If f : R → R is defined by f(x) = x³, then f is:

Q6 Functions - One-one and Onto medium

Let f : R → R be given by f(x) = x². Then f is:

Q7 Equivalence Relations medium

The number of equivalence relations on the set A = {1, 2, 3} that contain the pair (1, 2) is:

Q8 Counting Functions medium

If set A has 3 elements and set B has 4 elements, the number of one-one functions from A to B is:

Q9 Composition of Functions hard

If f(x) = 2x + 3 and g(x) = x² − 1, then (f∘g)(2) equals:

Q10 Invertible Functions hard

If f : R → R defined by f(x) = (3x − 2)/5 is invertible, then f⁻¹(x) equals:

Q11 Equivalence Relations hard

Let A = {1, 2, 3, 4} and R = {(1,1),(2,2),(3,3),(4,4),(1,2),(2,1),(3,4),(4,3)}. This relation is:

Q12 Counting Functions - Bijections hard

The number of bijective functions from a set A with 4 elements to itself is:

NCERT solutions & previous-year questions

Step-by-step model answers — tap a question to reveal the full solution.

NCERT questions 6

1 Show that the relation R in the set of integers Z defined by R = {(a, b) : 2 divides (a − b)} is an equivalence relation. Also find the equivalence class of 0.Equivalence Relations

Reflexive: For any a ∈ Z, a − a = 0, and 2 divides 0. So (a, a) ∈ R for every a ∈ Z. Hence R is reflexive.

Symmetric: Suppose (a, b) ∈ R, so 2 divides (a − b), i.e. a − b = 2k for some integer k. Then b − a = −2k = 2(−k), which is also divisible by 2. So (b, a) ∈ R. Hence R is symmetric.

Transitive: Suppose (a, b) ∈ R and (b, c) ∈ R, so a − b = 2k and b − c = 2m for integers k, m. Adding: (a − b) + (b − c) = a − c = 2(k + m), which is divisible by 2. So (a, c) ∈ R. Hence R is transitive.

Since R is reflexive, symmetric and transitive, R is an equivalence relation.

Equivalence class of 0: [0] = {x ∈ Z : (x, 0) ∈ R} = {x ∈ Z : 2 divides x} = the set of all even integers = {..., −4, −2, 0, 2, 4, ...}.

2 Show that the function f : N → N given by f(1) = f(2) = 1, and f(x) = x − 1 for every x > 2, is onto but not one-one.Types of Functions

Not one-one: f(1) = 1 and f(2) = 1, so two distinct elements 1 and 2 of the domain have the same image 1. Hence f is not one-one.

Onto: Let n ∈ N be any element of the codomain.

  • If n = 1: choose x = 1 ∈ N. Then f(1) = 1 = n, so n = 1 has a pre-image.
  • If n ≥ 2: choose x = n + 1. Since n ≥ 2, x = n + 1 ≥ 3 > 2, so f(x) = x − 1 = (n + 1) − 1 = n. So every n ≥ 2 also has a pre-image.

Since every n ∈ N has at least one pre-image in N, f is onto. Hence f is onto but not one-one.

3 Show that the function f : R* → R* defined by f(x) = 1/x is one-one and onto, where R* is the set of all non-zero real numbers.Types of Functions

One-one: Let x₁, x₂ ∈ R* with f(x₁) = f(x₂). Then 1/x₁ = 1/x₂. Cross-multiplying (valid since x₁, x₂ ≠ 0) gives x₂ = x₁, i.e. x₁ = x₂. Hence f is one-one.

Onto: Let y ∈ R* be arbitrary (so y ≠ 0). Choose x = 1/y. Since y ≠ 0, x is a well-defined non-zero real number, so x ∈ R*. Then f(x) = 1/x = 1/(1/y) = y. So every y ∈ R* has a pre-image in R*. Hence f is onto.

Since f is both one-one and onto, f is a bijection from R* to R*.

4 Let f = {(1, 2), (3, 5), (4, 1)} be a function from {1, 3, 4} to {1, 2, 5}, and g = {(1, 3), (2, 3), (5, 1)} be a function from {1, 2, 5} to {1, 3}. Write down g∘f.Composition of Functions

We compute (g∘f)(x) = g(f(x)) for each element of the domain {1, 3, 4}:

  • (g∘f)(1) = g(f(1)) = g(2) = 3
  • (g∘f)(3) = g(f(3)) = g(5) = 1
  • (g∘f)(4) = g(f(4)) = g(1) = 3

Therefore, g∘f = {(1, 3), (3, 1), (4, 3)}.

5 Show that the relation R in the set A = {1, 2, 3, 4, 5} given by R = {(a, b) : |a − b| is even} is an equivalence relation. Show that all the elements of {1, 3, 5} are related to each other, and all the elements of {2, 4} are related to each other, but no element of {1, 3, 5} is related to any element of {2, 4}.Equivalence Relations

Reflexive: |a − a| = 0, which is even, so (a, a) ∈ R for every a ∈ A. R is reflexive.

Symmetric: |a − b| = |b − a| always, so if |a − b| is even then |b − a| is even too. R is symmetric.

Transitive: If |a − b| is even, a and b have the same parity (both odd or both even). If |b − c| is even, b and c also have the same parity. So a and c must have the same parity, making |a − c| even. R is transitive.

Hence R is an equivalence relation.

Checking the sub-claims: 1, 3, 5 are all odd: |1−3| = 2, |3−5| = 2, |1−5| = 4, all even — so all pairs in {1, 3, 5} are related. 2, 4 are both even: |2−4| = 2, even — so 2 and 4 are related. Between the two groups: |1−2| = 1, |3−2| = 1, |3−4| = 1, |5−4| = 1, |1−4| = 3, |5−2| = 3, all odd — so no element of {1, 3, 5} is related to any element of {2, 4}.

6 Find g∘f and f∘g, if f(x) = 8x³ and g(x) = x^(1/3).Composition of Functions

Finding g∘f: (g∘f)(x) = g(f(x)) = g(8x³) = (8x³)^(1/3) = 8^(1/3) × (x³)^(1/3) = 2 × x = 2x.

Finding f∘g: (f∘g)(x) = f(g(x)) = f(x^(1/3)) = 8 × (x^(1/3))³ = 8x.

So g∘f(x) = 2x and f∘g(x) = 8x. Since 2x ≠ 8x in general, this confirms once again that composition of functions is not commutative.

Previous-year board questions 4

Q1 Check whether the relation R in the set {1, 2, 3} defined by R = {(1,1), (1,2), (2,1), (2,2), (3,3)} is reflexive, symmetric and transitive. 2022 2 marks

Reflexive: (1,1), (2,2) and (3,3) are all present in R, so every element is related to itself. R is reflexive.

Symmetric: (1,2) ∈ R and its mirror (2,1) ∈ R as well; all other pairs are of the form (a,a) which are trivially symmetric. So R is symmetric.

Transitive: Checking all chains — (1,2) & (2,1) gives (1,1) ∈ R; (2,1) & (1,2) gives (2,2) ∈ R; (1,1) & (1,2) gives (1,2) ∈ R; (2,2) & (2,1) gives (2,1) ∈ R. All required pairs are present, so R is transitive.

Hence R is reflexive, symmetric and transitive — i.e., R is an equivalence relation.

Q2 Show that the function f : R → R defined by f(x) = x/(x² + 1) for all x ∈ R, is neither one-one nor onto. 2022 3 marks

Not one-one: Consider x₁ = 2 and x₂ = 1/2. Then f(2) = 2/(4+1) = 2/5 = 0.4, and f(1/2) = (1/2)/((1/4)+1) = (1/2)/(5/4) = 2/5 = 0.4. So f(2) = f(1/2) even though 2 ≠ 1/2. Hence f is not one-one.

Not onto: By AM-GM, for x > 0, x² + 1 ≥ 2x, so x/(x² + 1) ≤ 1/2 (equality at x = 1). Similarly for x < 0, x/(x² + 1) ≥ −1/2. So the range of f is contained in [−1/2, 1/2], which is not equal to the codomain R. For instance, y = 1 has no pre-image. Hence f is not onto.

So f is neither one-one nor onto.

Q3 Let A = {1, 2, 3, ..., 9} and R be the relation on A × A defined by (a, b) R (c, d) if a + d = b + c, for (a, b), (c, d) ∈ A × A. Show that R is an equivalence relation and find the equivalence class of (2, 5). 2023 4 marks

Reflexive: (a, b) R (a, b) requires a + b = b + a, which is always true. So R is reflexive.

Symmetric: If (a, b) R (c, d), then a + d = b + c. Rearranging: c + b = d + a, which is exactly the condition for (c, d) R (a, b). So R is symmetric.

Transitive: Suppose (a, b) R (c, d) and (c, d) R (e, f). Then a + d = b + c ... (i) and c + f = d + e ... (ii). Adding (i) and (ii): a + d + c + f = b + c + d + e. Cancelling c + d from both sides gives a + f = b + e, which is precisely the condition for (a, b) R (e, f). So R is transitive.

Since R is reflexive, symmetric and transitive, R is an equivalence relation.

Equivalence class of (2, 5): We need pairs (a, b) ∈ A × A such that (a, b) R (2, 5), i.e., a + 5 = b + 2, i.e., b − a = 3, with a, b ∈ {1, 2, ..., 9}. Taking a = 1, 2, 3, 4, 5, 6 gives b = 4, 5, 6, 7, 8, 9 respectively (a = 7 onward would need b > 9, not allowed). So the equivalence class is {(1,4), (2,5), (3,6), (4,7), (5,8), (6,9)}.

Q4 Let f : N → N be defined by f(n) = (n+1)/2 if n is odd, and f(n) = n/2 if n is even, for all n ∈ N. Show that f is a many-one, onto function. 2024 5 marks

Not one-one (many-one): f(1) = (1+1)/2 = 1 (since 1 is odd), and f(2) = 2/2 = 1 (since 2 is even). So two distinct elements 1 and 2 both map to 1. Hence f is not one-one, i.e., f is many-one.

Onto: Let m ∈ N be any element of the codomain. Choose n = 2m, which is even and belongs to N. Then f(n) = f(2m) = 2m/2 = m. So every m ∈ N has a pre-image (namely 2m) under f. Hence f is onto.

Therefore, f is a many-one, onto function.

Part of Priodemy for School

Interactive Maths & Science — free with every school on Priodemy EduSuite. Explore more chapters and labs on the Priodemy for School hub.

Ask AI