Skip to content

Sets, Relations and Functions: JEE Formulas and Key Ideas

JEE Mathematics Sets, Relations and Functions

Sets, Relations and Functions for JEE Main and Advanced is built on counting: inclusion–exclusion for sets, free-choice reasoning for reflexive and symmetric relations, and counts of one-one and onto functions. The chapter also covers composition and invertibility, periods, the greatest integer and fractional part functions, the modulus and the domains of standard functions.

Practise Sets, Relations and Functions: 163 JEE Main PYQs with a study plan.

Inclusion–exclusion: counting elements in unions of sets

For finite sets, n(A∪B)=n(A)+n(B)−n(A∩B)n(A\cup B)=n(A)+n(B)-n(A\cap B). Adding the two sizes counts the common elements twice, so the intersection is subtracted once.

With three sets the same idea extends. Add the single sets, subtract the pairwise intersections, then add back n(A∩B∩C)n(A\cap B\cap C), because the subtraction removed it once too often.

Two related counts follow directly. The elements in AA but not in BB number n(A)−n(A∩B)n(A)-n(A\cap B). The symmetric difference AΔBA\Delta B contains the elements in exactly one of the sets. It has n(A)+n(B)−2n(A∩B)n(A)+n(B)-2n(A\cap B) elements, because the common part is removed from both sets.

De Morgan's laws, (A∪B)′=A′∩B′(A\cup B)'=A'\cap B' and (A∩B)′=A′∪B′(A\cap B)'=A'\cup B', turn a "neither" condition into the complement of a union.

Two further counts underpin the rest of the chapter. A set with nn elements has 2n2^n subsets, because each element is either in a subset or out of it. It has 2n−12^n-1 proper subsets once the set itself is excluded. The Cartesian product A×BA\times B of ordered pairs has n(A) n(B)n(A)\,n(B) elements. Relations are built from this product.

Preview of JEE Maths Formula Book – All Chapters, JEE Main & Advanced

JEE Maths Formula Book – All Chapters, JEE Main & Advanced

In the StudentCurio app

Chapter-wise JEE Mathematics formulas for quick revision: algebra, trigonometry, coordinate geometry, calculus, vectors, 3D geometry, statistics and probability

Reflexive, symmetric and transitive relations and how to count them

A relation from AA to BB is a subset of A×BA\times B. Since n(A×B)=n(A) n(B)=mnn(A\times B)=n(A)\,n(B)=mn, and each ordered pair is either included or left out, there are 2mn2^{mn} relations. On a single set of nn elements there are n2n^2 ordered pairs, which gives 2n22^{n^2} relations.

Each type condition changes which pairs remain free choices: - Reflexive relations must contain every (a,a)(a,a). The nn diagonal pairs are fixed and n2−nn^2-n pairs stay free, giving 2n2−n2^{n^2-n}. - Symmetric relations link (a,b)(a,b) with (b,a)(b,a). The free choices are the nn diagonal pairs plus n(n−1)/2n(n-1)/2 off-diagonal pairs, giving 2n(n+1)/22^{n(n+1)/2}. - Reflexive and symmetric relations also fix the diagonal, which leaves 2n(n−1)/22^{n(n-1)/2}.

A relation is transitive when (a,b),(b,c)∈R⇒(a,c)∈R(a,b),(b,c)\in R\Rightarrow(a,c)\in R. A relation with all three properties is an equivalence relation. The inverse relation reverses every pair: R−1={(b,a):(a,b)∈R}R^{-1}=\{(b,a):(a,b)\in R\}.

Concept map linking sets and inclusion–exclusion to the Cartesian product, relations as subsets of it, functions as special relations, and bijections as invertible functions.
Each idea builds on the size of a set or a product of sets.

One-one, onto and invertible functions

Let AA have mm elements and BB have nn. Each element of AA chooses its image independently, so there are nmn^m functions.

A one-one function gives different elements different images. Choosing these images is an arrangement of mm images from nn, giving nPm^{n}P_{m}, and it is possible only when n≥mn\ge m. When m=nm=n, the one-one functions are bijections and there are n!n! of them.

Onto functions require m≥nm\ge n. They are counted by inclusion–exclusion on the images that are missed: ∑r=0n(−1)r nCr (n−r)m\sum_{r=0}^{n}(-1)^r\,{}^{n}C_r\,(n-r)^m. For n=2n=2 this reduces to 2m−22^m-2, which removes the two constant functions.

A function has an inverse if and only if it is bijective. Composition is read right to left, (f∘g)(x)=f(g(x))(f\circ g)(x)=f(g(x)). Its inverse reverses the order: (f∘g)−1=g−1∘f−1(f\circ g)^{-1}=g^{-1}\circ f^{-1}.

Any function on a domain symmetric about 00 splits into an even part 12[f(x)+f(−x)]\tfrac12[f(x)+f(-x)] and an odd part 12[f(x)−f(−x)]\tfrac12[f(x)-f(-x)]. An even function satisfies f(−x)=f(x)f(-x)=f(x), and an odd function satisfies f(−x)=−f(x)f(-x)=-f(x).

Periods, greatest integer, fractional part, modulus and domains

The functions sin⁡x\sin x, cos⁡x\cos x, sec⁡x\sec x and cosec⁡x\operatorname{cosec}x repeat after 2π2\pi. The functions tan⁡x\tan x, cot⁡x\cot x, ∣sin⁡x∣|\sin x| and ∣cos⁡x∣|\cos x| repeat after π\pi, and the fractional part {x}\{x\} repeats after 11.

If ff has period TT, then f(ax+b)f(ax+b) has period T/∣a∣T/|a|. Only the coefficient aa changes the period; the shift bb does not.

The greatest integer function satisfies [x]≤x<[x]+1[x]\le x<[x]+1. Integers pass straight through it: [x+n]=[x]+n[x+n]=[x]+n for integer nn. Negative arguments need care. The sum [x]+[−x][x]+[-x] is 00 when xx is an integer and −1-1 otherwise. For example, [2.3]+[−2.3]=2+(−3)=−1[2.3]+[-2.3]=2+(-3)=-1. The fractional part {x}=x−[x]\{x\}=x-[x] always lies in [0,1)[0,1).

The modulus ∣x∣=x2|x|=\sqrt{x^2} turns inequalities into intervals. For a>0a>0, ∣x∣≤a|x|\le a means −a≤x≤a-a\le x\le a, and ∣x∣≥a|x|\ge a means x≤−ax\le -a or x≥ax\ge a.

Finding a domain also starts with checking conditions. A square root needs a non-negative argument and a logarithm needs a positive argument. The functions sin⁡−1x\sin^{-1}x and cos⁡−1x\cos^{-1}x accept only values in [−1,1][-1,1], and tan⁡x\tan x is undefined at odd multiples of π/2\pi/2. When an expression combines several of these, its domain is the set of xx that satisfies every condition at once.

Sets, Relations and Functions formulas and when each applies

  • Union of finite sets: n(A∪B)=n(A)+n(B)−n(A∩B)n(A\cup B)=n(A)+n(B)-n(A\cap B). For three sets: n(A∪B∪C)=∑n(A)−∑n(A∩B)+n(A∩B∩C)n(A\cup B\cup C)=\sum n(A)-\sum n(A\cap B)+n(A\cap B\cap C).
  • Difference and symmetric difference: n(A−B)=n(A)−n(A∩B)n(A-B)=n(A)-n(A\cap B) and n(AΔB)=n(A)+n(B)−2n(A∩B)n(A\Delta B)=n(A)+n(B)-2n(A\cap B).
  • Power set: a set with nn elements has 2n2^n subsets and 2n−12^n-1 proper subsets.
  • Cartesian product: n(A×B)=n(A) n(B)n(A\times B)=n(A)\,n(B).
  • Relations from AA (mm elements) to BB (nn elements): 2mn2^{mn}. On an nn-element set there are 2n22^{n^2} relations in total, 2n2−n2^{n^2-n} reflexive, 2n(n+1)/22^{n(n+1)/2} symmetric and 2n(n−1)/22^{n(n-1)/2} both reflexive and symmetric.
  • Functions from AA to BB: nmn^m in total. One-one functions number nPm^{n}P_m (only for n≥mn\ge m), bijections number n!n! (only for m=nm=n), and onto functions number ∑r=0n(−1)r nCr(n−r)m\sum_{r=0}^{n}(-1)^r\,{}^{n}C_r(n-r)^m (only for m≥nm\ge n).
  • Inverse: f−1f^{-1} exists if and only if ff is bijective, and then f∘f−1=If\circ f^{-1}=I.
  • Period: f(ax+b)f(ax+b) has period T/∣a∣T/|a|, where TT is the period of ff.
  • Domains: x\sqrt{x} needs x≥0x\ge0; log⁡ax\log_a x needs x>0x>0; sin⁡−1x\sin^{-1}x and cos⁡−1x\cos^{-1}x need x∈[−1,1]x\in[-1,1]; tan⁡x\tan x needs x≠(2n+1)π/2x\ne(2n+1)\pi/2 for integer nn.
Comparison of free choices for reflexive, symmetric, and reflexive-and-symmetric relations on an n-element set.
Count the free pairs; the answer is 2 raised to that number.

Worked example: counting all, one-one and onto functions

Problem. Let A={1,2,3,4}A=\{1,2,3,4\} and B={p,q,r}B=\{p,q,r\}. Find the number of (i) functions from AA to BB, (ii) one-one functions from AA to BB, and (iii) onto functions from AA to BB.

Step 1: all functions. Here m=4m=4 and n=3n=3. Each of the 4 elements has 3 possible images, so there are 34=813^4=81 functions.

Step 2: one-one functions. A one-one function needs n≥mn\ge m, but 3<43<4. Two elements of AA must therefore share an image, so there are 00 one-one functions.

Step 3: onto functions. Since m≥nm\ge n, apply the alternating sum: ∑r=03(−1)r 3Cr(3−r)4=81−3(16)+3(1)−1(0)=36\sum_{r=0}^{3}(-1)^r\,{}^{3}C_r(3-r)^4=81-3(16)+3(1)-1(0)=36.

Answer: there are 81 functions, 0 one-one functions and 36 onto functions.

Check: in an onto map from 4 elements to 3, exactly two elements share one image. Choose that pair in 4C2=6{}^{4}C_2=6 ways, then assign the three images in 3!=63!=6 ways. This gives 6×6=366\times6=36, which matches Step 3.

Common mistakes with relation counts, inverses and [x]

  • Mixing up relation counts. 2n(n+1)/22^{n(n+1)/2} counts symmetric relations. Reflexive relations number 2n2−n2^{n^2-n}.
  • Reversing composition incorrectly. (f∘g)−1(f\circ g)^{-1} equals g−1∘f−1g^{-1}\circ f^{-1}, not f−1∘g−1f^{-1}\circ g^{-1}.
  • Treating [x] as odd. Writing [−x]=−[x][-x]=-[x] is valid only for integer xx. Otherwise [x]+[−x]=−1[x]+[-x]=-1.
  • Ignoring the conditions on function counts. The onto formula is stated for m≥nm\ge n, and nPm^{n}P_m for n≥mn\ge m.
  • Dropping the modulus in the period. For a negative aa, the period of f(ax+b)f(ax+b) is still T/∣a∣T/|a|.

Revising Chapter 01 rows on the formula sheet

The PDF sets out this chapter as two-column tables under Sets, Relations and Functions, with each description on the left and its result on the right. It defines [x][x] as the greatest integer function and {x}\{x\} as the fractional part. Its suggested routine suits this chapter: read every row once, then cover the right-hand column before a mock test and revise only the rows you got wrong. For the relation and function counts, rebuild each exponent from the free-choice reasoning instead of memorising it.

Frequently asked questions

Does a function need to be both one-one and onto to have an inverse?

Yes. A function has an inverse if and only if it is bijective, which means it is both one-one and onto.

Why can there be no one-one function from a 4-element set to a 3-element set?

A one-one function needs at least as many possible images as inputs (n≥mn\ge m). With only 3 images for 4 inputs, two inputs must share an image.

Spotted an error? Report a correction. Practise this in the app: notes, formula sheets and mind maps.

Discussion

Sign in to join the discussion

Loading comments…