π§Έ SetsπΊοΈ Relationsπ₯€ Functionsπ Real Funcsπ― Practice
π§Έ Part 1: Sets β The Toy Boxes
Sets Are Just Labeled Boxes Full of Things
Imagine you have two labeled boxes: Box A contains toys {1, 2, 3}. Box B contains {3, 4, 5}. That's all a set is β a collection of distinct objects with a label.
π§Έ The Core Idea
Sets = Labeled Toy Boxes
Every set is like a box with a label. Inside the box are distinct items β no duplicates allowed. You can have a box of numbers, a box of letters, a box of colors, or even a box of other boxes!
Set notation: A = {1, 2, 3} means "Box A contains items 1, 2, and 3." β means "is in the box" (3 β A). β means "is not in the box" (5 β A).
Key rule: Order doesn't matter. {1, 2, 3} = {3, 1, 2}. And no duplicates: {1, 1, 2} is just {1, 2}.
π‘ A set is a box. β means "inside the box." β means "outside the box." That's the whole language.
π§Έ Sets = Toy Boxes
Union (βͺ): Pour both boxes into one big box. A βͺ B = {1, 2, 3, 4, 5}. The 3 only appears once β sets don't have duplicates!
Types of Sets
Sets come in different flavors. Here are the ones you'll see in JEE:
Empty set β : A box with nothing in it. {} or β . Finite set: A box with a countable number of items. {1, 2, 3}. Infinite set: A box that never ends. β = {1, 2, 3, ...}. Equal sets: Two boxes with exactly the same items. {1, 2} = {2, 1}. Subset A β B: Every item in box A is also in box B. {1, 2} β {1, 2, 3}. Superset A β B: Box A contains everything box B has and possibly more. Universal set U: The biggest box β contains ALL items under consideration.
π§ Think of β as "fits inside." {1, 2} β {1, 2, 3} means the smaller box fits entirely inside the bigger one.
De Morgan's laws are like logical double negatives. "Not (A or B)" means the same as "Not A and Not B." The complement of the union is the intersection of the complements.
Count everything in A, add everything in B, then subtract what you double-counted (the intersection). Like counting students in two classrooms β those in both get counted twice!
Worked Example: Venn Diagram with Three Sets
In a survey of 100 students: 50 like Math (M), 40 like Physics (P), 30 like Chemistry (C), 20 like both M and P, 15 like both P and C, 10 like both M and C, 5 like all three. How many like none?
A relation connects elements of one set to elements of another (or the same) set. Think of it like a friendship map: "Alice knows Bob," "Bob knows Charlie." Each arrow is an ordered pair.
πΊοΈ The Core Idea
Relations = Social Media Connections
Imagine a social network. People (set A) can follow other people (set B). Each follow is an ordered pair (follower, followee).
Ordered pair (a, b): The first element comes from set A (domain), the second from set B (codomain). Unlike sets, order matters here. (Alice, Bob) means Alice follows Bob β it's different from (Bob, Alice)!
Cartesian product A Γ B: The set of ALL possible ordered pairs. If A has 3 people and B has 3 people, A Γ B has 9 possible connections. A relation is just a SUBSET of these possible connections.
π‘ A relation = a set of arrows. Domain = where arrows start. Codomain = where arrows could go. Range = where arrows actually go.
πΊοΈ Relations = Friendship Arrows
Domain = {Alice, Bob, Charlie}. Codomain = {Diana, Eve, Frank}. Range = {Diana, Eve, Frank} (all three have arrows pointing to them). The relation R = {(Alice, Diana), (Alice, Eve), (Bob, Diana), (Charlie, Frank)}.
Types of Relations on the Same Set
When domain and codomain are the SAME set (A to A), we get special types:
π Reflexive, Symmetric, Transitive β The Three Musketeers
Reflexive: Every element relates to itself (self-loop). Symmetric: If A relates to B, B relates to A (bidirectional). Transitive: If AβB and BβC, then AβC (chain). An equivalence relation has ALL three properties β it groups elements into classes.
π Cartesian Product β All Possible Ordered Pairs
Cartesian product A Γ B: The set of ALL possible ordered pairs combining every element of A with every element of B. If |A| = m and |B| = n, then |A Γ B| = m Γ n. A relation is just a subset β you pick which pairs to include.
Worked Example: Identifying Relation Types
Let A = {1, 2, 3} and R = {(1,1), (1,2), (2,1), (2,2), (3,3)}. Is R reflexive? Symmetric? Transitive? An equivalence relation?
1Check reflexiveβΆ
Reflexive means EVERY element relates to itself. Need (1,1), (2,2), (3,3). All three are present. β Reflexive.
2Check symmetricβΆ
Symmetric means if (a,b) is in R, then (b,a) must also be in R.
(1,2) is in R β (2,1) is in R β
All other pairs are self-pairs which are trivially symmetric. β Symmetric.
3Check transitive and equivalenceβΆ
Transitive: if (a,b) and (b,c) in R then (a,c) in R.
(1,2) and (2,1) β (1,1) β (present)
(2,1) and (1,2) β (2,2) β (present)
No other pair combinations apply. β Transitive.
Since R is reflexive + symmetric + transitive = Equivalence relation β . It partitions A into {1, 2} and {3}.
π Equivalence Relations = Sorting Machine
An equivalence relation partitions a set into disjoint groups (equivalence classes). Elements in the same group are "equivalent" to each other.
Example: "Has the same birthday" is an equivalence relation. It groups people by their birth date. Everyone in a group shares the same birthday! "Congruence modulo n" is another classic example.
Worked Example: Number of Relations
If |A| = m and |B| = n, how many possible relations can exist from A to B?
1Think of the gridβΆ
|A Γ B| = m Γ n. A relation is any subset of A Γ B. The number of subsets of a set with k elements is 2k.
Therefore, number of relations from A to B = 2mΓn.
A Function Is a Vending Machine: One Button β One Snack
A function is a special kind of relation. A vending machine: each button (input) gives EXACTLY ONE snack (output). Not zero, not two β exactly one.
π₯€ The Vending Machine Test
Is It a Function? The "One Button β One Snack" Rule
Function: Button 1 gives chips, Button 2 gives cookies. Every button gives exactly one snack. β
Not a function: Button 1 gives chips AND cookies. One input β two outputs. β
Still a function: Button 1 and Button 2 both give chips. Different inputs β same output is fine!
Domain: The set of buttons you can press. Codomain: All snacks that could come out. Range: Snacks that actually come out for some button.
π§ Functions are the strict parent of relations: "One input, exactly one output. No exceptions!"
π₯€ Functions = Vending Machines
Domain = buttons you can press (inputs). Codomain = all snacks in the machine (possible outputs). Range = snacks that actually drop for some button. Each button β exactly one snack. That's a function!
π One-One (Injective) vs Many-One β Mapping Diagrams
One-one (injective): Each input maps to a unique output (distinct arrows, no sharing). Many-one: Multiple inputs share the same output. Onto (surjective): Every possible output is used. Bijective: One-one AND onto = perfect pairing!
Composition of Functions
Think of composition as a conveyor belt. f(g(x)) means: first apply g, then apply f to the result.
βοΈ Composition f(g(x)) β The Conveyor Belt
Watch the ball move: x enters g β g(x) comes out β that goes into f β final result f(g(x)). Like a factory assembly line where each machine transforms the product further.
Worked Example: Domain and Range
Find the domain and range of f(x) = β(x β 3).
1Domain: what x values are allowed?βΆ
The square root of a negative number is not real. So we need x β 3 β₯ 0 β x β₯ 3. Domain: [3, β)
2Range: what y values come out?βΆ
β(anything) is always β₯ 0. For x = 3, f(3) = 0. As x β β, f(x) β β. Range: [0, β)
Worked Example: Composite Function
If f(x) = 2x + 1 and g(x) = xΒ², find f(g(3)) and g(f(3)). Are they equal?
A function is invertible if you can "reverse the vending machine" β press a button that exactly undoes what the original did. This is only possible if the function is bijective (one-one AND onto).
fβ»ΒΉ(f(x)) = x and f(fβ»ΒΉ(y)) = y. Like a perfect undo button! Only bijective functions are invertible.
One-one (injective): Different inputs β different outputs. No two buttons give the same snack. Onto (surjective): Every snack in the machine is reachable by some button. Bijective: Both one-one AND onto. Perfect matching. The only kind that's invertible! Many-one: Not one-one. Two different inputs give the same output. Into: Not onto. Some snacks in the machine never come out.
π§ Injective = no collisions. Surjective = full coverage. Bijective = perfect 1-to-1 mapping.
π Part 4: Real Functions & Their Graphs
Seeing Functions: The V-Shape, the Staircase, the Step
Some functions have such distinctive graphs that they get special names. These appear constantly in JEE β learn their shapes, not their formulas!
Modulus Function: f(x) = |x|
The absolute value (modulus) measures distance from zero. |x| = x if x β₯ 0, |x| = -x if x < 0. The graph is a perfect V-shape.
π The V-Shape β f(x) = |x|
The modulus function creates a V-shape. For x β₯ 0, it's the line y = x (45Β° slope). For x < 0, it's y = -x (reflects across the y-axis). The vertex at (0, 0) is the minimum β the closest you can get to 0.
Signum Function: sgn(x)
The signum function tells you the SIGN of a number: -1 if negative, 0 if zero, 1 if positive.
β« The Step Function β sgn(x)
Signum: A step function with three possible values. At x = 0, sgn(0) = 0 (the only zero output). For any positive x, sgn(x) = 1. For any negative x, sgn(x) = -1. The open circles at the jumps show discontinuity.
Greatest Integer Function: f(x) = [x] (Floor)
The greatest integer function [x] returns the largest integer β€ x. Also called the floor function. Its graph is a staircase!
ποΈ The Staircase β f(x) = [x] (Greatest Integer)
[x] creates a staircase ascending to the right. Each step is flat (constant value) from integer n to just before n+1. At the integer n itself, the value jumps up by 1. Note: [-2.3] = -3 (rounds DOWN, not towards zero!).
Fractional Part Function: f(x) = {x}
The fractional part {x} = x - [x]. It extracts the decimal part of x. The graph is a sawtooth wave!
π¦· The Sawtooth β {x} = x - [x] (Fractional Part)
Fractional part {x}: A sawtooth wave that resets to 0 at every integer. It rises linearly from 0 to almost 1, then drops back to 0. It's always in the range [0, 1). The function is periodic with period 1.
π Real Functions Cheat Sheet
|x| = distance from 0 (V-shape) |
sgn(x) = sign of x (step) |
[x] = floor (staircase) |
{x} = x - [x] (sawtooth)
Learn the SHAPES, not the formulas. In JEE, visual recognition of these graphs saves precious minutes.
Worked Example: Modulus Equation
Solve |2x β 5| = 9.
1Set up two casesβΆ
|2x β 5| = 9 means the distance from 2x β 5 to 0 is 9.
So either 2x β 5 = 9 or 2x β 5 = β9.
2Solve both casesβΆ
Case 1: 2x β 5 = 9 β 2x = 14 β x = 7
Case 2: 2x β 5 = β9 β 2x = β4 β x = β2
Solution set: {β2, 7}
β οΈ Common Mistakes (Don't Fall For These!)
These Traps Trip Up Even Top Students
β οΈ Mistake 1
Confusing β and β
Wrong: If A = {{1, 2}, 3}, then 1 β A β Right: 1 β A because A contains {1, 2} (a set) and 3, not the element 1 directly.
β is for elements (items inside the box). β is for subsets (boxes inside boxes).
{1, 2} β A β (the set {1,2} is an element of A)
1 β A β (1 is inside {1,2}, which is in A, but not directly in A)
β οΈ β = "is an element of" (direct member). β = "is a subset of" (fits inside). Don't mix them!
β οΈ Mistake 2
Forgetting That Order Matters in Relations
Wrong: (a, b) = (b, a) in all cases β Right: (a, b) β (b, a) unless a = b.
Ordered pairs are the foundation of relations. (Alice, Bob) means Alice follows Bob. (Bob, Alice) means Bob follows Alice. Completely different relationships!
In a Cartesian product, (1, 2) and (2, 1) are TWO DIFFERENT pairs.
β οΈ (a, b) β (b, a). Order always matters in ordered pairs!
β οΈ Mistake 3
Thinking "Onto" Means "Every Input Has an Output"
Wrong: "A function is onto because every input maps to something." β Right:Every function has this property β that's what makes it a function!
Onto (surjective) means every element of the CODOMAIN is used, not every element of the domain. It's about covering the target set, not about having defined outputs.
Think: "Every possible snack actually comes out for some button" β that's onto.
β οΈ Into = some codomain elements unused. Onto = ALL codomain elements used. Don't confuse "function" with "onto"!
β οΈ Mistake 4
Greatest Integer of Negative Numbers
Wrong: [-2.3] = -2 β Right: [-2.3] = -3 β
[x] is the greatest integer β€ x. For -2.3, the integers β€ -2.3 are ... -5, -4, -3. The greatest among these is -3.
Think: [-2.3] = -3 because -3 β€ -2.3 < -2. The floor function always rounds DOWN, not towards zero!
β οΈ [x] rounds DOWN. For negatives, [-2.3] = -3, not -2. "Floor" means lower, not closer to zero.
For any set problem with multiple sets and overlaps, draw a Venn diagram. Start from the innermost intersection and work outward. Label each region. Then add up the regions.
Example: In a class of 100, 60 play cricket, 50 play football, 30 play both. How many play neither?
Draw two overlapping circles. The intersection is 30. Cricket only = 60β30 = 30. Football only = 50β30 = 20. Total who play = 30+30+20 = 80. Neither = 100β80 = 20.
π‘ Venn diagrams turn abstract set problems into simple addition problems. Always start from the center!
π§ Strategy 2
"The Vertical and Horizontal Line Tests"
These two tests are all you need for function classification:
Vertical line test: Is it a function? Draw a vertical line across the graph. If it hits the graph more than once, it's NOT a function (one input β multiple outputs).
Horizontal line test: Is it one-one? Draw a horizontal line across the graph. If it hits the graph more than once, it's NOT one-one (two inputs share the same output).
Every function passes the vertical line test. One-one functions also pass the horizontal line test.
π‘ Vertical line = "is it a function?" Horizontal line = "is it one-one?" Two tests, zero calculations!
π§ Strategy 3
"Check Reflexive First"
When identifying relation types, always check reflexive first. It's the easiest β just check if EVERY element has a self-loop (a,a).
If it's not reflexive, it can't be an equivalence relation. Save time by checking this first!
Then check symmetric (if aβb then bβa). Then transitive (if aβb and bβc then aβc). Only if all three hold is it an equivalence relation.
π‘ Reflexive is the quickest check. No self-loops? Not an equivalence relation. Move on!
π§ Strategy 4
"f(g(x)) = Apply Inside-Out"
Composition f(g(x)) looks confusing, but it's just "apply g to x, then apply f to the result." Read from the inside out.
The notation fβg means "f after g" β first g, then f. Think of it as a pipeline: x β g β f β result.
π‘ f(g(x)) = "inside-out." Start with x, apply g, then apply f. Conveyor belt!
π₯ Advanced Worked Examples (JEE Level)
Multi-Step Problems That Combine Multiple Concepts
Example 1: Sets + Cardinality + Venn Diagram
In a group of 200 students: 120 take Physics (P), 90 take Chemistry (C), 80 take Math (M). 50 take P and C, 40 take C and M, 30 take P and M, 20 take all three. How many take exactly two subjects? How many take none?