Sets, Relations and Functions
Set operations, types of relations, types of functions, composition, invertibility.
Sets and set operations
Union, intersection, difference, complement; De Morgan.
A SET is a well-defined collection of distinct objects. Notation: roster {1,2,3} or set-builder {x : x is even}.
Key types:
- Empty set ∅ (no elements; it is a subset of EVERY set).
- Finite/infinite by element count.
- Equal sets: exactly same elements.
- Subset: A ⊆ B if every element of A is in B. Proper subset A ⊂ B (A ⊆ B but A ≠ B).
- Power set P(A): set of ALL subsets of A.
Counting formulas (high-yield):
- A set with n elements has 2^n subsets (so |P(A)| = 2^n).
- Number of PROPER subsets = 2^n − 1.
- Number of non-empty subsets = 2^n − 1.
Memory: 'Each element either IN or OUT → 2 choices → 2^n.'
Universal set U contains all elements under discussion. ∅ ⊆ A and A ⊆ A always hold.
Core operations:
- Union A ∪ B: in A OR B.
- Intersection A ∩ B: in A AND B.
- Difference A − B: in A but NOT B.
- Complement A' = U − A.
- Symmetric difference A Δ B = (A−B) ∪ (B−A) = (A∪B) − (A∩B).
Key identities:
- Commutative, Associative for ∪ and ∩.
- Distributive: A ∩ (B ∪ C) = (A∩B) ∪ (A∩C); A ∪ (B ∩ C) = (A∪B) ∩ (A∪C).
- DE MORGAN'S LAWS (very high-yield): (A ∪ B)' = A' ∩ B'; (A ∩ B)' = A' ∪ B'.
Memory: 'Break the bar, flip the operation.' - A − B = A ∩ B'.
Inclusion–Exclusion (counting):
|A ∪ B| = |A| + |B| − |A ∩ B|
|A ∪ B ∪ C| = |A|+|B|+|C| − |A∩B| − |B∩C| − |C∩A| + |A∩B∩C|.
Q: In a class of 100, 60 study Maths, 45 study Physics, 30 study both. How many study (a) at least one, (b) neither, (c) exactly one?
Let |M|=60, |P|=45, |M∩P|=30, |U|=100.
(a) At least one = |M ∪ P| = |M| + |P| − |M∩P| = 60 + 45 − 30 = 75.
(b) Neither = |U| − |M ∪ P| = 100 − 75 = 25.
Using De Morgan: |M' ∩ P'| = |(M ∪ P)'| = 100 − 75 = 25. ✓
(c) Exactly one = |M ∪ P| − |M ∩ P| = 75 − 30 = 45.
Or: (only M) + (only P) = (60−30) + (45−30) = 30 + 15 = 45. ✓
Exam tip: Draw a Venn diagram and fill the INTERSECTION first, then subtract to get 'only' regions. Most JEE set problems are inclusion–exclusion with 2 or 3 sets — memorise the 3-set formula's sign pattern (+ singles, − pairs, + triple).
Relations
Reflexive, symmetric, transitive, equivalence.
A relation R from set A to set B is any subset of A x B (the Cartesian product). If (a,b) belongs to R, we write aRb. The domain of R is the set of all first elements, and the range is the set of all second elements that actually appear. The codomain is B itself (the whole target). Key count: if |A| = m and |B| = n, then |A x B| = mn, so the total number of relations from A to B is 2^(mn) (each ordered pair is either in or out). For a relation on a single set A with |A| = n, the number of relations is 2^(n^2). Memory aid: a relation is just a 'rule pairing' that selects ordered pairs; functions are special relations where every input maps to exactly one output. JEE often tests counting relations and identifying domain/range from a listed set.
On a set A, classify a relation R by three core properties. Reflexive: (a,a) in R for ALL a in A. Symmetric: aRb implies bRa. Transitive: aRb and bRc imply aRc. Mnemonic 'R-S-T'. An equivalence relation satisfies all three (Reflexive + Symmetric + Transitive). Counting formulas to memorize: number of reflexive relations on n elements = 2^(n^2 - n); number of symmetric relations = 2^(n(n+1)/2). The number of equivalence relations on a set of n elements equals the Bell number B_n (B_1=1, B_2=2, B_3=5, B_4=15). Antisymmetric: aRb and bRa imply a=b (basis of partial orders). Watch the trap: a relation can be both symmetric and antisymmetric (only the diagonal), and 'not symmetric' does NOT mean antisymmetric. The empty relation on a non-empty set is symmetric and transitive but NOT reflexive.
Equivalence relations partition a set into disjoint equivalence classes. Classic JEE example: on integers, define aRb if (a - b) is divisible by 5. Check: reflexive since a-a=0 divisible by 5; symmetric since 5 | (a-b) implies 5 | (b-a); transitive since 5|(a-b) and 5|(b-c) give 5|(a-c). So R is an equivalence relation, partitioning Z into 5 classes [0],[1],[2],[3],[4] by remainder mod 5. Worked count: How many equivalence relations on A={1,2,3} contain (1,2)? The class of 1 must include 2. Options: {1,2} separate from {3}, or {1,2,3} together. That gives 2 relations. Tip: counting equivalence relations = counting partitions of the set, so always think in terms of how you group elements into blocks rather than listing pairs.
Functions and types
One-one, onto, composition, inverse.
A function f: A → B assigns each element of A (domain) to exactly one element of B (codomain). The set of values f actually takes is the range ⊆ B.
One-one (injective): different inputs give different outputs.
Test: f(x₁) = f(x₂) ⇒ x₁ = x₂. Or graphically: every horizontal line crosses the graph at most once.
Example: f(x) = 2x is one-one. f(x) = x² on ℝ is not (since f(2) = f(−2) = 4).
Onto (surjective): every element of the codomain is hit.
Test: range = codomain.
Example: f: ℝ → ℝ, f(x) = x³ is onto. f: ℝ → ℝ, f(x) = x² is not onto (negative numbers aren't in the range), but f: ℝ → [0, ∞) is.
Bijection = one-one AND onto. Only bijections have inverses.
Finding f⁻¹:
- Write y = f(x).
- Solve for x in terms of y.
- Swap variables: x = f⁻¹(y), then rename y to x.
Example: f(x) = 3x + 5. Then y = 3x + 5 → x = (y − 5)/3. So f⁻¹(x) = (x − 5)/3.
Composition: (g ∘ f)(x) = g(f(x)). Generally NOT commutative: g ∘ f ≠ f ∘ g.
Key identity for inverses: (f⁻¹ ∘ f)(x) = x = (f ∘ f⁻¹)(x).