Sets, Relations and Functions
A function satisfies for every pair of real numbers. Must ?
No. And every JEE problem of this shape quietly adds one more word so that the answer becomes yes.
Setting gives . Setting gives . Repeated addition gives for every positive integer , and applying that to gives
That is exactly as far as algebra reaches. The rationals are pinned; the irrationals are still free. Add continuity at a single point, or monotonicity on some interval, or merely boundedness on some interval, and the pinning propagates to every real, so everywhere. Remove all three and there genuinely exist additive functions whose graph is dense in the plane — functions you cannot write a formula for and cannot draw, but which exist.
So the word "continuous" in a functional-equation problem is not decoration. It is the entire bridge from the rationals to the reals. Noticing which hypothesis is load-bearing is a fair one-line summary of what this chapter is for at Advanced level, where the questions are almost never about the definitions themselves and almost always about counting, structure, or a functional identity.
1. Inclusion and exclusion, and the "exactly" counts
For two sets, , because the elements of were counted twice. Extending to three sets, an element in all three is counted three times by the singles, subtracted three times by the pairs, and so must be added back once:
Advanced questions rarely stop at the union. They ask for the number of elements in exactly one or exactly two of the sets, and those need their own accounting. Write , , . An element lying in exactly two sets is counted once in each of the two relevant pairwise intersections, so
The coefficients come from asking how many times an element of each type is counted, not from memory.
Illustration 1
Of students, take Physics, take Chemistry, take Maths, take Physics and Chemistry, take Chemistry and Maths, take Physics and Maths, and take all three. How many take exactly one subject, and how many take none?
Here , , . Exactly one is . The union is , so no student is left out — a useful arithmetic check, because a negative "none" count is the usual sign of inconsistent data.
Illustration 2
A set with elements has subsets, because each element is independently in or out. How many ordered pairs of subsets satisfy ?
Each element has three independent fates: in only, in only, or in neither. It cannot be in both. So the count is . The same "decide element by element" habit answers most subset-counting questions at Advanced, and it is far safer than trying to sum a binomial series.
2. Counting relations by their grid
A relation on a set with elements is nothing more than a subset of the cells of the grid, so there are relations in all. Every structural word in a question is a constraint on those cells, and each constraint can be counted independently.
The diagonal cells are what reflexivity controls: reflexive means all are present, so the remaining cells are free and the count is . Symmetry ties the cell to the cell , so the off-diagonal cells collapse into independent pairs, while the diagonal stays free. That gives symmetric relations. Imposing both leaves only the pairs free.
| property | free cells | count on an -set |
|---|---|---|
| none | all | |
| reflexive | off-diagonal only | |
| symmetric | diagonal and pairs | |
| reflexive and symmetric | pairs only |
Transitivity is the exception: it does not decompose into independent cells, and there is no closed formula. Transitive relations are counted by hand on small sets, which is why questions that involve them stay at or .
Illustration 3
How many relations on are both reflexive and symmetric?
With the free objects are the unordered off-diagonal pairs, each independently present or absent, so the answer is . Notice how little the answer has to do with listing anything.
Illustration 4
A common "proof" argues that symmetry and transitivity together force reflexivity: from and , transitivity gives . Where does it fail?
It assumes every element is related to something. On the relation is symmetric and transitive but not reflexive, because appears nowhere and the argument never gets started. The empty relation on any non-empty set is the extreme case. This is the single most examined subtlety in the topic.
3. Equivalence relations are partitions
An equivalence relation on carves into classes: the class of is the set of everything related to . Two classes that share an element are equal, by symmetry and transitivity, so the classes are disjoint and cover . That is precisely a partition.
The converse is just as true. Given any partition, declare when they lie in the same block, and you have an equivalence relation. So counting equivalence relations on an -set is counting partitions of it, and the answers are the Bell numbers for to .
For the fifteen come from the five shapes of partition: one block of (one way), a split (four ways, choose the singleton), a split (three ways, pair up with one of the other three), a split (six ways, choose the pair), and four singletons (one way). Total .
Illustration 5
How many equivalence relations on contain the pair ?
Containing means and share a block. Fuse them into a single object and the question becomes: how many partitions does a three-element set have? Five. Fusing is the whole method — it turns a constrained count into an unconstrained one on a smaller set.
4. How many functions, and how many of each kind
A function from an -set to an -set makes independent choices from options, giving . Injectivity removes options as you go, so there are one-one functions, which is zero as soon as .
Surjectivity cannot be built up choice by choice, because "nothing is missed" is a condition on the whole assignment. Inclusion and exclusion handles it: subtract the assignments that miss at least one target, add back those that miss at least two, and so on.
Illustration 6
Count the onto functions from a five-element set to a three-element set.
The naive answer counts the assignments that use only one or two of the targets, and of them do. For a quick sanity check, the three constant functions and the assignments using exactly two targets add to exactly .
5. Ranges by inversion, not by inspection
At Main level a range is usually read off a familiar graph. At Advanced the function is unfamiliar, and the reliable method is to treat as an equation in and ask which leave it solvable. For a ratio of quadratics this becomes a discriminant condition.
Illustration 7
Find the range of on .
The denominator has discriminant , so it never vanishes and the domain really is all of . Cross-multiplying and collecting powers of ,
If this is linear and gives , so is attained. Otherwise a real exists exactly when , that is , giving . The range is .
The step candidates skip is the separate treatment of . Whenever the leading coefficient can vanish, that value of is outside the discriminant argument and has to be tested on its own.
Illustration 8
Find the range of .
Substituting turns this into , but is not free: it satisfies . So , hence runs over and the range is .
Compare the two illustrations. Substitution is faster when it works, but it is only safe if you carry the substituted variable's own range along with it. Forgetting here would hand you , which contains values the function never takes.
6. Composition, inverses and a trap about
A function is invertible exactly when it is a bijection onto its codomain, and the graph of is the reflection of the graph of in the line . That picture supports a shortcut used constantly: if is increasing, then solving is the same as solving , because the two graphs can only meet on the mirror line.
The shortcut is stated far more often than its hypothesis is, and for a decreasing it is false.
Illustration 9
For on , solve .
On this domain is increasing, so the equation reduces to , that is , with roots . Only lies in the domain, so it is the unique solution.
Illustration 10
Now take on , which is a decreasing bijection with . Solve .
The equation is , so and . But gives only . The points and are genuine intersections of the two graphs lying off the mirror line — they are swapped by the reflection rather than fixed by it. A candidate who applies the increasing-case shortcut here loses two of the three solutions.
Illustration 11
How many functions satisfy for all ?
Such an is its own inverse, so it is a bijection whose cycles all have length or . Counting by the number of two-cycles: none gives the identity, one gives choices, and two gives ways to split four elements into two pairs. The total is .
7. Periodicity, and where the "take the LCM" rule breaks
If has period and has period , then repeats after any common multiple of and , so the LCM is always a period when one exists. It need not be the smallest one, because the sum can have symmetries neither term has.
Illustration 12
Both and have period , so the LCM rule offers for their sum. Test :
The shift swaps the two terms instead of fixing each one, so the sum is unchanged and the true fundamental period is . Nothing smaller works, since the function attains its minimum only at multiples of .
Illustration 13
Is periodic?
A period would have to satisfy and for integers and , forcing , a rational number. It is not, so no common period exists and is not periodic at all. When the two periods are incommensurable the LCM does not merely shrink — it fails to exist.
8. The functional equations that actually appear
Four families cover almost everything, and each is solved by the same rational-scaling argument as the opening hook, with a regularity hypothesis supplied by the question.
| identity | solution (with continuity) | how to spot it |
|---|---|---|
| sums to sums | ||
| sums to products | ||
| $f(x)=c\ln | x | |
| products to products |
The other standard type is not a family at all but a technique: when the unknown appears at two related arguments, substitute to generate a second equation and solve the pair as simultaneous linear equations in the unknowns and .
Illustration 14
Find if for all .
Replacing by gives . Doubling this and subtracting the original eliminates :
Substituting back confirms it, which is worth doing, because the manipulation assumes a solution exists and the check is what proves it does.
Illustration 15
If , evaluate .
The structure to look for is a pairing. Here
so . The arguments pair off as with , giving pairs, and the middle term is . The sum is .
9. The greatest integer and fractional part
Every real number splits uniquely as , where is the greatest integer not exceeding and . Advanced uses this pair constantly, and almost every error with them comes from one habit: treating as if it distributed over sums. It does not. For we get but , and in general is either or one more than it, depending on whether the fractional parts overflow.
Three facts settle most questions. First, has fundamental period while has no period at all, since it is strictly increasing on the integers. Second, when is an integer and otherwise, which is where sign errors breed. Third, jumps by exactly at each integer and is constant between them, so an equation such as is really a statement about which unit interval lies in: or gives .
The same reading solves mixed equations. To solve , substitute to get , so . The left side lies in and the right side is an even integer, forcing and , hence . Reducing to a statement about an integer and a number in separately is the whole technique.
Any function on a symmetric domain also splits uniquely as an even part plus an odd part, , which is worth recognising because a definite integral over a symmetric interval kills the odd half outright.
Summary
Advanced treats this chapter as structure rather than vocabulary. Sets are counted, not drawn: inclusion and exclusion answers the union, and the "exactly " counts follow from asking how many times each element is counted.
Relations are subsets of a grid, so reflexivity fixes the diagonal, symmetry pairs the off-diagonal cells, and the counts and are read off the picture rather than recalled. Transitivity has no such formula, and symmetry together with transitivity does not give reflexivity when some element is related to nothing.
Equivalence relations are partitions, so counting them is counting partitions, and a constraint such as "contains " is handled by fusing the two elements. Functions are counted the same way: in all, a falling product for the injective ones, and inclusion and exclusion for the onto ones.
For ranges, invert rather than inspect — impose a real-solution condition on , and treat separately any that kills the leading coefficient. For inverses, remember that reduces to only when increases. For periods, the LCM is a period but not always the smallest, and with incommensurable periods there is none. For functional equations, the algebra reaches the rationals and the stated regularity hypothesis carries it the rest of the way.
