Fatskills
Practice. Master. Repeat.
Study Guide: How to Solve: Sets, Relations, and Functions (IIT JEE Guide)
Source: https://www.fatskills.com/iit-jee-math/chapter/how-to-solve-sets-relations-and-functions-iit-jee-guide

How to Solve: Sets, Relations, and Functions (IIT JEE Guide)

By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.

⏱️ ~7 min read

How to Solve: Sets, Relations, and Functions (IIT JEE Guide)

Hook: Mastering sets, relations, and functions unlocks 10-15% of IIT JEE Maths—that’s 30-45 marks in JEE Main and 50+ marks in JEE Advanced. Whether it’s counting functions, finding domains, or composing functions, this topic appears in every major exam, often as a high-scoring, time-saving question.


What You Need To Know First

  1. Basic Set Theory – Union, intersection, subsets, Venn diagrams.
  2. Cartesian Product – Ordered pairs, A × B notation.
  3. Basic Function Concepts – Input-output mapping, one-one/many-one.

(If you’re shaky on these, pause and review them first.)


Key Vocabulary

Term Plain-English Definition Quick Example
Set A collection of distinct objects. A =
Relation A rule connecting elements of two sets (subset of A × B). R =
Function A relation where every input has exactly one output. f(x) = x²
Domain All possible inputs (x-values) of a function. For f(x) = √x, domain = x ≥ 0
Range All possible outputs (y-values) of a function. For f(x) = x², range = y ≥ 0
Composition Plugging one function into another: (f ∘ g)(x) = f(g(x)). If f(x) = x+1, g(x) = 2x, then (f ∘ g)(x) = 2x + 1

Formulas To Know

1. Number of Functions

  • Total functions from A to B: |B||A| (MEMORISE THIS)
  • |A| = number of elements in set A (domain)
  • |B| = number of elements in set B (codomain)

  • One-one (injective) functions: P(|B|, |A|) = |B|! / (|B| - |A|)! (MEMORISE THIS)

  • Only if |B| ≥ |A| (otherwise, 0)

  • Onto (surjective) functions: |B||A| - C(|B|,1)(|B|-1)|A| + C(|B|,2)(|B|-2)|A| - ... (Given on exam sheet)

  • Simpler for small sets: Count manually (see Example 3).

2. Domain & Range Shortcuts

Function Type Domain Range
Polynomial (e.g., f(x) = x³ + 2x) All real numbers (ℝ) All real numbers (ℝ)
Rational (e.g., f(x) = 1/(x-2)) Denominator ≠ 0 → x ≠ 2 y ≠ 0 (if numerator is constant)
Square Root (e.g., f(x) = √(x-3)) Inside ≥ 0 → x ≥ 3 y ≥ 0
Logarithm (e.g., f(x) = log(x-1)) Inside > 0 → x > 1 All real numbers (ℝ)

3. Composition Rules

  • (f ∘ g)(x) = f(g(x)) (MEMORISE THIS)
  • Domain of (f ∘ g): All x in g’s domain where g(x) is in f’s domain.
  • Range of (f ∘ g): f’s range applied to g’s range.

Step-by-Step Method

How to Solve Any Function Problem (IIT JEE Style)

Step 1: Identify the type of problem. - Is it about counting functions? → Use formulas. - Is it about domain/range? → Check restrictions. - Is it about composition? → Work inside-out.

Step 2: Write down given sets/functions clearly. - For sets: A = {1, 2}, B = {a, b, c} - For functions: f(x) = x², g(x) = 2x + 1

Step 3: Apply the correct formula or logic. - Counting functions? → Use |B||A| or permutations. - Domain? → Find where function is undefined (denominator = 0, √negative, log(≤0)). - Range? → Find possible y-values (inverse method or graph analysis). - Composition? → Compute f(g(x)) and simplify.

Step 4: Check for edge cases. - Empty sets? → 0 functions. - Repeated elements? → Not a function. - One-one/onto? → Verify conditions.

Step 5: Write the final answer in the required format. - For counting: Just the number. - For domain/range: Interval notation (e.g., [2, ∞)). - For composition: Simplified function.


Worked Example (Using Steps Above)

Problem: Let A = {1, 2}, B = {a, b, c}. Find: 1. Total number of functions from A to B. 2. Number of one-one functions. 3. Domain and range of f(x) = √(x-1) + 1/(x-2).


Solution (Step-by-Step):

Part 1: Total functions - Step 1: Counting functions problem. - Step 2: A = {1, 2} → |A| = 2, B = {a, b, c} → |B| = 3. - Step 3: Total functions = |B||A| = 3² = 9.

Part 2: One-one functions - Step 1: Counting injective functions. - Step 2: |A| = 2, |B| = 3 → |B| ≥ |A|, so possible. - Step 3: P(3,2) = 3! / (3-2)! = 6 / 1 = 6.

Part 3: Domain & Range of f(x) = √(x-1) + 1/(x-2) - Step 1: Domain/range problem. - Step 2: Break into two parts: - √(x-1) → x - 1 ≥ 0 → x ≥ 1 - 1/(x-2) → x - 2 ≠ 0 → x ≠ 2 - Step 3: Domain = x ≥ 1 and x ≠ 2 → [1, 2) ∪ (2, ∞) - Step 4: Range: - √(x-1) → y ≥ 0 - 1/(x-2) → y ≠ 0 (since x ≠ 2) - Combined: y ≥ 0, but y ≠ 1/(x-2) when x > 2. - For x ∈ [1,2), 1/(x-2) ∈ (-∞, -1] → f(x) ∈ [0, ∞) + (-∞, -1] = (-∞, ∞) - For x ∈ (2, ∞), 1/(x-2) ∈ (0, ∞) → f(x) ∈ [0, ∞) + (0, ∞) = (0, ∞) - Range = ℝ (since all real numbers are covered).

Final Answers: 1. 9 functions. 2. 6 one-one functions. 3. Domain = [1, 2) ∪ (2, ∞), Range = .


Worked Examples

Example 1 – Basic (Counting Functions)

Problem: Let A = {1, 2, 3}, B = {x, y}. Find the number of: 1. Total functions from A to B. 2. One-one functions. 3. Onto functions.

Solution: 1. Total functions = |B||A| = 2³ = 8. 2. One-one functions = P(2,3) = 0 (since |B| < |A|). 3. Onto functions = Total - functions missing at least one element.
- Functions missing x: 1 (only y for all inputs).
- Functions missing y: 1 (only x for all inputs).
- Onto = 8 - 2 = 6.

What we did and why: - Used |B||A| for total functions. - P(|B|,|A|) for one-one (0 if |B| < |A|). - Inclusion-exclusion for onto (easier than formula for small sets).


Example 2 – Medium (Domain & Range)

Problem: Find the domain and range of: f(x) = log2(x² - 4x + 3)

Solution: Domain: - Inside log > 0 → x² - 4x + 3 > 0 - Factor: (x-1)(x-3) > 0 - Critical points: x = 1, 3 - Test intervals: - x < 1 → (x-1)(x-3) > 0 (e.g., x=0 → 3 > 0) - 1 < x < 3 → (x-1)(x-3) < 0 (e.g., x=2 → -1 < 0) - x > 3 → (x-1)(x-3) > 0 (e.g., x=4 → 3 > 0) - Domain = (-∞, 1) ∪ (3, ∞)

Range: - Let y = log2(x² - 4x + 3) - x² - 4x + 3 = 2y - x² - 4x + (3 - 2y) = 0 - For real x, discriminant ≥ 0: - 16 - 4(1)(3 - 2y) ≥ 0 → 16 - 12 + 4·2y ≥ 0 → 4 + 4·2y ≥ 0 → Always true. - But x² - 4x + 3 > 0 → Minimum value of x² - 4x + 3 is at x = 2 (vertex). - f(2) = 4 - 8 + 3 = -1 → But log(-1) is undefined. - Wait: We already restricted domain to where x² - 4x + 3 > 0. - Minimum value in domain:
- For x < 1, as x → -∞, x² - 4x + 3 → ∞.
- For x > 3, as x → ∞, x² - 4x + 3 → ∞.
- At x=1, f(1) = 0 → log2(0) is undefined (but x=1 is not in domain).
- At x=3, f(3) = 0 → log2(0) is undefined (but x=3 is not in domain).
- Minimum value in domain is just above 0 (e.g., x=0.9 → f(0.9) ≈ 0.01 → log2(0.01) ≈ -6.64).
- Range = ℝ (since log can take any real value as input approaches 0+ or ∞).

What we did and why: - Domain: Solved inequality for log’s argument. - Range: Used inverse function and discriminant (but had to check domain restrictions).


Example 3 – Exam-Style (Composition & Tricky Counting)

Problem (JEE Advanced 2018): Let A = {1, 2, 3, 4, 5}, B = {1, 2, 3, 4, 5, 6}. A function f: A → B is called good if f(i) ≠ i for any i ∈ A. Find the number of good functions.

Solution: - Total functions = 65 = 7776. - Good functions = Total - functions where at least one f(i) = i. - Use inclusion-exclusion: - Functions where f(1)=1: 64 = 1296 (fix f(1)=1, others free). - Similarly, f(2)=2: 64, ..., f(5)=5: 64. - Total for single fixed point: C(5,1)·64 = 5·1296 = 6480. - Functions where f(1)=1 and f(2)=2: 63 = 216. - Total for two fixed points: C(5,2)·63 = 10·216 = 2160. - Continue:
- Three fixed points: C(5,3)·62 = 10·36 = 360.
- Four fixed points: C(5,4)·61 = 5·6 = 30.
- Five fixed points: C(5,5)·60 = 1·1 = 1. - Good functions = Total - (single) + (double) - (triple) + (four) - (five) = 7776 - 6480 + 2160 - 360 + 30 - 1 = 3125.

What we did and why: - Recognized this as a derangement-like problem (counting functions with no fixed points). - Used inclusion-exclusion to subtract bad cases. - Key trap: Forgetting to add/subtract higher-order overlaps.


Common Mistakes

Mistake Why It Happens Correct Approach
Counting all relations as functions Confusing "relation" (any subset of A×B) with "function" (exactly one output per input). Check: Every input must have exactly one output.
Forgetting domain restrictions Assuming all functions are defined for all real numbers. Denominator ≠ 0, √(≥0), log(>0).
Misapplying one-one formula Using P( B
Incorrect range for √f(x) Assuming range is always [0, ∞). Range depends on f(x)’s minimum. (e.g., √(x²+1) → [1, ∞)).
Composition order wrong Writing (f ∘ g)(x) = g(f(x)). (f ∘ g)(x) = f(g(x)) (inside-out).

Exam Traps

Trap How to Spot It How to Avoid It
"Find domain of f(g(x))" without checking g(x)’s range Problem gives f(x) and g(x) separately. First find g(x)’s range, then check if it’s in f(x)’s domain.
Counting onto functions with B <
Assuming all functions are one-one or onto Problem says "a function f: A → B" without specifying type. Unless stated, assume it’s just a general function.

1-Minute Recap (Night Before Exam)

"Listen up—this is your 60-second crash course for sets, relations, and functions in IIT JEE:

  1. Counting functions?
  2. Total = |B||A|.
  3. One-one = P(|B|,|A|) (0 if |B| < |A|).
  4. Onto = Total - bad cases (use inclusion-exclusion for small sets).

  5. Domain?

  6. Denominator ≠ 0, √(≥0), log(>0).
  7. For f(g(x)), g(x) must be in f’s domain.

  8. Range?

  9. For √f(x), find f(x)’s minimum.
  10. For log f(x), find f(x)’s range (must be >0).
  11. For rational functions, find y where x exists.

  12. Composition?

  13. (f ∘ g)(x) = f(g(x))—work inside-out.
  14. Domain: x in g’s domain and g(x) in f’s domain.

  15. Common traps?

  16. |B| < |A| → 0 one-one/onto functions.
  17. f(g(x)) ≠ g(f(x))—order matters!
  18. Always check edge cases (e.g., x=2 in 1/(x-2)).

You’ve got this. Now go ace that exam!


⚡ Recently practiced quizzes in this class

ADVERTISEMENT