Sets, Relations and Functions
A set with three elements. Its Cartesian product with itself has pairs, so it carries relations.
Of those , how many are equivalence relations?
The instinct is to count each property and combine. Reflexive relations number . Symmetric relations also number . Relations that are both come to . So the equivalence relations, being reflexive and symmetric and transitive, must be some part of that .
The answer is .
| Property demanded | Count on a -element set |
|---|---|
| nothing | |
| reflexive | |
| symmetric | |
| reflexive and symmetric | |
| all three, i.e. equivalence |
Three of the eight die, and transitivity kills them. Take the relation containing the diagonal, the couple and the couple , but not . Then and force , which is absent. The same accident happens for each of the three choices of which single element is left out, so exactly of the fail.
The right way to get never mentions relations. Cut into non-overlapping pieces: three singletons, or a pair with a singleton left over ( ways), or one block of three. That is .
Equivalence relations are partitions. That is the chapter in one line, and it is why no formula exists for counting them.
| The organising idea | What it buys |
|---|---|
| Every object here is a set of ordered pairs | relations, functions and their counts are one subject |
| Every property is a condition on which pairs are present | each formula becomes a fifteen-second argument, not a memory |
1. Sets, Representation and the Power Set
Set. A well-defined collection of distinct objects.
Well-defined is doing real work. "The set of tall students" is not a set, because membership is not decidable.
| Form | Example |
|---|---|
| Roster | |
| Set-builder |
Two rules catch people out.
Order is irrelevant. and are the same set.
Repetition does not count. has two elements, not three.
Power set : the set of all subsets of , including and itself.
Each element is in or out of a given subset, independently.
Notice the shape of that argument. Every counting formula below reuses this exact skeleton: find the independent choices, then raise to their number.
Illustration 1
How many subsets of a -element set have an even number of elements?
The tempting route is to add binomial coefficients: .
The independent-choice route is faster and needs no arithmetic. Fix one element, say . Choose freely whether each of the other elements is in or out, giving half-formed subsets. Now has no choice at all: it goes in exactly when it is needed to make the size even.
So even-sized subsets number , and by the same argument so do odd-sized ones. The two counts are equal for every , which the binomial sum hides.
2. Operations and Their Algebra
| Law | Statement |
|---|---|
| Commutative | , same for |
| Associative | |
| Distributive | , and the reverse |
| Identity | , |
| Idempotent | , |
Trap. In arithmetic, multiplication distributes over addition but addition does not distribute over multiplication. In set algebra each operation distributes over the other. JEE has exploited that asymmetry.
De Morgan's laws. Complementing swaps the two operations.
In words, and this fixes them permanently: not in either one means outside both; not in both means outside at least one.
Illustration 2
Check the second distributive law, , on , , , and see why the arithmetic analogue fails.
Left side: , so .
Right side: and , whose intersection is .
They agree. Now run the arithmetic analogue with as and as : , while .
Set operations are idempotent and arithmetic ones are not, and that is exactly the difference. Expanding the right side produces terms, which collapse back to ; expanding produces , which does not collapse to .
Counting with overlaps
Shared elements would otherwise be counted twice.
Inclusion-exclusion: add singles, subtract pairs, add the triple back.
Illustration 3
Of readers, take paper , take , take ; take and , take and , take and , and take all three. How many take exactly two?
The pairwise figures already include the triple-takers, and that is the whole difficulty.
At least one: .
Each of the three pairwise counts contains the triple-takers, so subtract them once from each pair.
Exactly one is then , and the check holds: .
Trap. "Both and " means . "Only and " means . Read which one the question asked before computing anything.
3. The Cartesian Product: Where Pairs Come From
Cartesian product : the set of all ordered pairs with first entry from and second from .
Ordered means , and therefore unless or one of them is empty.
This is the pivot of the chapter. Everything from here is a subset of some Cartesian product; the topics differ only in which subsets are allowed.
Illustration 4
For and , find .
A pair lies in both products exactly when is in and in , and likewise.
So the intersection is , here , giving .
The general identity is worth keeping: the product operation distributes over intersection on both sides.
4. Relations as Sets of Pairs
Relation from to : any subset of .
That is the whole definition. No formula, no pattern and no rule is required.
has elements; a subset takes or leaves each one.
On a single -element set the pairs live in , so there are relations, which is the the chapter opened with.
| Named extreme | Contents |
|---|---|
| Empty relation | no pairs at all |
| Universal relation | every pair of |
Both are legitimate relations, and JEE tests whether you will accept them.
Domain of a relation: the first entries actually used. Range: the second entries actually used. Neither has to exhaust or .
5. Types of Relations
Each named type is a condition on which pairs must be present, so each definition converts directly into a count.
| Type | Condition | Count on an -set |
|---|---|---|
| Reflexive | every present | |
| Symmetric | present forces | |
| Transitive | and force | no closed formula |
| Equivalence | all three | Bell number |
Transitivity has no formula because it is not a partition of the cells into independent choices: whether one cell may be empty depends on which others are filled. If a question asks you to count transitive relations, the set will be small enough to enumerate.
Illustration 5
On let mean " divides ". Test all three properties.
Reflexive: every number divides itself, so all six diagonal pairs are present. Yes.
Symmetric: holds because divides , but fails. No.
Transitive: if and then and , so . Yes.
So divisibility is reflexive and transitive but not symmetric. It is in fact antisymmetric: and together force for positive integers.
Reflexive, antisymmetric and transitive is a partial order, not an equivalence relation. The word "partial" records that some pairs are simply incomparable: neither nor .
The trap that catches almost everyone
Does symmetric plus transitive imply reflexive?
The argument looks complete: gives by symmetry, and the two together give by transitivity.
It fails, because the argument needs some with to exist before it can start. An element related to nothing at all never enters the chain.
Symmetric, transitive, and not reflexive, because is missing.
Trap. The identity relation is exactly the diagonal and nothing else. A reflexive relation must contain the diagonal but may contain anything else too. Every identity relation is reflexive; the converse is false.
6. Equivalence Relations and Partitions
Equivalence relation: reflexive, symmetric and transitive at once. This is the most examined idea in the chapter.
Its importance is structural. For each , collect everything related to into the equivalence class .
Those classes are either identical or completely disjoint. They never overlap partially, and the proof is one line: if lies in and in then and , so , so the two classes coincide.
Both directions hold. Every partition defines an equivalence relation, by relating two elements when they land in the same block.
That correspondence converts a hard question into an easy one: counting equivalence relations means counting partitions.
| Equivalence relations (Bell number) | |
|---|---|
| 1 | 1 |
| 2 | 2 |
| 3 | 5 |
| 4 | 15 |
| 5 | 52 |
Illustration 6
Which three of the eight reflexive-and-symmetric relations on fail transitivity, and how do the surviving five match the five partitions?
Each of the eight is the diagonal plus a choice of which of the three couples , , to include.
| Couples included | Transitive? | Partition |
|---|---|---|
| none | yes | |
| any one of the three | yes | that pair, plus a singleton |
| any two of the three | no | none |
| all three | yes |
Take couples and but not . Then and , so transitivity demands , which is absent. The three two-couple relations fail for exactly this reason, in each case because the missing couple is forced by the other two.
So , matching exactly, and the failure has a clean meaning: two couples sharing an element already merge all three elements into one block.
Illustration 7
On the integers define when is divisible by . Verify it is an equivalence relation and describe its classes.
Reflexive: , divisible by .
Symmetric: .
Transitive: and .
The classes group integers by remainder on division by , giving exactly five classes: .
Every integer lies in precisely one, and together they cover . That is the partition the theory promised, and it is why this relation is written .
7. Functions: A Relation with a Rule
Function : a relation in which every element of is the first entry of exactly one pair.
Two conditions hide in that sentence, and separating them makes the definition usable.
| Condition | What it forbids | Example ruled out |
|---|---|---|
| every is used | an input with no image | on all of |
| no is used twice | an input with two images | as of |
Nothing at all is required of . Codomain elements may be hit many times or not at all, and that freedom is the entire content of the next section.
Each of the elements of chooses independently among the elements of .
Trap. The exponent is the size of the domain, because the domain elements do the choosing. Reversing it is the single most common slip in this chapter.
Range: the values actually taken, always a subset of the codomain. Keeping range and codomain apart is essential, because the gap between them is the whole meaning of onto.
8. One-One, Onto and Into
| Term | Meaning | Condition |
|---|---|---|
| One-one (injective) | distinct inputs, distinct outputs | |
| Onto (surjective) | every codomain element is hit | range codomain |
| Into | at least one is missed | range is a proper subset |
| Bijective | both at once | a perfect pairing |
Vocabulary warning. In Indian textbooks and in the JEE syllabus, into means specifically not onto. Much of the international literature uses it merely to mean a function with a stated codomain, with no such implication. Follow the JEE usage in the exam.
To prove one-one: assume , derive . Graphically, no horizontal line may cut the curve twice. Strict monotonicity gives it free.
To prove onto: take arbitrary in the codomain and produce an mapping to it. To disprove, exhibit one unreachable value.
The first domain element has choices, the next because it must avoid the first, and so on for factors.
That is inclusion-exclusion again: subtract the functions missing at least one codomain element, then correct for double subtraction.
When the two notions coincide and the count of bijections is . That coincidence is a finite-set fact and does not survive on infinite sets.
Illustration 8
From a -element set to a -element set, count the one-one functions and the onto functions.
One-one: the three inputs pick distinct images in order, giving , which is .
Onto: zero. Three inputs produce at most three distinct outputs, so at least two of the five codomain elements are never reached. No arithmetic is needed; the pigeonhole principle settles it.
Reverse the sets and both answers flip. From a -set to a -set there are no injections at all, and the surjections number .
Trap. Check feasibility before reaching for a formula. The injective formula is meaningless when , and the surjective sum silently returns when .
Illustration 9
Show that given by is one-one but not onto, even though domain and codomain are the same set.
One-one. For the function is , which strictly increases. For it is , also strictly increasing. The two pieces agree at , so increases strictly on all of and is therefore injective.
Not onto. Since always, no value outside is ever attained. The range is , a proper subset of .
So an injective self-map of an infinite set need not be surjective. On a finite set that cannot happen, which is precisely what makes infinite sets different, and JEE has used this gap to build "one-one but into" options.
9. Composition of Functions
For and :
Read right to left. The function written first is applied last, and misreading the order is the commonest error in composition questions.
| Property | Holds? |
|---|---|
| Associative, | yes |
| Commutative, | no, in general |
How properties travel is one-directional, and the asymmetry is examinable.
| If | Then |
|---|---|
| and both one-one | is one-one |
| and both onto | is onto |
| is one-one | is one-one; need not be |
| is onto | is onto; need not be |
The inner function controls injectivity of the composite; the outer function controls surjectivity.
Illustration 10
For , find and hence applied four times.
The common denominator cancels top and bottom, which is why the result is so much simpler than the starting expression.
Now apply the same map twice more.
So composed with itself four times is the identity, and has order under composition. Asking for is then trivial: , so the answer is .
10. Finding Domains and Ranges
Domain questions are reliable marks and reduce to a checklist of what a real expression forbids.
| Expression | Requirement |
|---|---|
| , strictly |
When several appear together, impose every condition and intersect the resulting sets.
Trap. Solving the conditions separately and reporting their union is a standard and costly mistake. Each condition is a requirement, not an alternative.
Ranges have no checklist. Two methods cover almost everything in JEE.
Invert. Write , solve for , and ask which give a real answer.
Use monotonicity. On an interval where is monotonic, the range runs between the endpoint values.
Illustration 11
Find the range of over all real .
First check the denominator never vanishes: its discriminant is , so the domain is all of and no exclusion is needed.
Set and clear the fraction into a quadratic in .
For a real to exist the discriminant must be non-negative.
The case has to be checked separately, because the quadratic degenerates to a linear equation there. It gives , which is legitimate, so stays in the range.
Both endpoints are attained, at the values where the discriminant is exactly zero, which is the signature of a maximum or minimum reached rather than approached.
Summary
Every object here is a set of ordered pairs, and every property is a condition on which pairs are present.
Independent binary choices generate every count: , and each formula below is the same argument with different cells forced or locked.
Each set operation distributes over the other, unlike arithmetic, because set operations are idempotent. De Morgan's laws say complementing swaps union with intersection.
Inclusion-exclusion adds singles, subtracts pairs, adds the triple back; "exactly two" needs the triple removed three times over.
A relation from to is any subset of , so there are of them, with no pattern required.
Reflexive relations number , symmetric ones , both together ; transitivity has no closed formula because its cells are not independent.
Symmetric plus transitive does not give reflexive: an element related to nothing never enters the argument.
Equivalence relations correspond exactly to partitions, which is why a -element set carries of them and not or .
A function is a relation using every domain element exactly once, so there are of them, with the domain size in the exponent.
Injections number and need ; surjections need inclusion-exclusion and need ; when the finite sets match in size the two coincide, and on infinite sets they do not.
In a composite the function written first is applied last. A one-one composite forces the inner function one-one, an onto composite forces the outer one onto, and neither converse holds.
Domain conditions are imposed and then intersected, never united. Ranges come from inverting and demanding a real solution, or from monotonicity.
