PYQ Vault

JEE Mains Maths · Relations and Functions

Counting Relations and Their Elements

Counting the ordered pairs in a relation, the fewest pairs to add to make it reflexive, symmetric or an equivalence, and the number of relations of a given type on a finite set.

Why this matters

Thirty-nine PYQs, the largest page in the chapter, and seventeen of them are numerical answers with no options to check against. The work is careful counting: go element by element, keep order in the pairs, and use the equivalence classes to count what must be added. Three ideas cover the page.

Concept 1 of 3: Counting the pairs in a relation

Take the first element one value at a time and count its partners, then add. When a relation on A×BA\times B has a condition linking a1a_1 with b2b_2 and a separate condition linking a2a_2 with b1b_1, count each condition on its own and multiply. When the condition is 'sum on the left = sum on the right', list how often each sum occurs on each side and multiply the matching frequencies.

Definition

  • n(R)=∑a(number of b with aRb)n(R)=\sum_a(\text{number of }b\text{ with }aRb).
  • Independent conditions: n(R)=N1×N2n(R)=N_1\times N_2.
  • Equal sums: n(R)=∑s(ways to make s on the left)×(ways on the right)n(R)=\sum_s(\text{ways to make }s\text{ on the left})\times(\text{ways on the right}).
  • (a,b)(a,b) and (b,a)(b,a) are different pairs unless a=ba=b.

Pairs in a relation

n(R)=∑a#{b:aRb}n(R)=\sum_{a}\#\{b: aRb\}

Worked example

On {1,2,3,4}\{1,2,3,4\}, xRyxRy if x+2y≤8x+2y\le8. Find n(R)n(R).
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 22 Jan 2026 Shift 2 · Q53Moderate

Example 1 · Relations and Functions · Counting Relations and Their Elements

The number of elements in the relation R={(x,y)\mathbf{R = \{(x,y)} :  4x2+y2<52,x,y∈Z}\left. \ 4x^{2}+y^{2}< 52,x,y \in Z \right\} is

Count both orders

(1,2)(1,2) and (2,1)(2,1) are two elements of a relation. A count done over unordered pairs must be doubled, except for pairs with equal entries.

Concept 2 of 3: Fewest pairs to add: reflexive, symmetric, equivalence

For reflexive, add each missing (a,a)(a,a). For symmetric, add the reverse of each pair whose reverse is missing. For an equivalence, see which elements the given pairs link into groups; each group becomes a class, unlinked elements are classes of one, and the smallest equivalence has the sum of the squares of the class sizes. Subtract the pairs already there.

Definition

  • Reflexive: add the missing diagonal pairs.
  • Symmetric: add the missing reverses.
  • Equivalence: classes = linked groups; smallest relation has ∑ki2\sum k_i^2 pairs.
  • Added = (size of the smallest relation) − n(R)n(R).

Smallest equivalence containing R

∑iki2 pairs, ki=class sizes\sum_i k_i^2\ \text{pairs, } k_i=\text{class sizes}

Worked example

R={(1,2),(3,4)}R=\{(1,2),(3,4)\} on {1,2,3,4,5}\{1,2,3,4,5\}. Fewest pairs to add for an equivalence?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2025 · 23 Jan 2025 · Q61Moderate

Example 2 · Relations and Functions · Counting Relations and Their Elements

Let R={(1,2),(2,3),(3,3)}\mathbf{R = \{(1,2),(2,3),(3,3)\}} be a relation defined on the set {1,2,3,4}\mathbf{\{ 1,2,3,4\}}. Then the minimum number of elements, needed to be added in R so the R becomes an equivalence relation, is :

Symmetry then transitivity brings the diagonal

Once (1,2)(1,2) and (2,1)(2,1) are both present, transitivity forces (1,1)(1,1) and (2,2)(2,2). A count for 'symmetric and transitive' must include them.

Concept 3 of 3: Counting relations of a given type

A relation on an nn-element set is any subset of the n2n^2 ordered pairs, so there are 2n22^{n^2}. Reflexive fixes the nn diagonal pairs: 2n2−n2^{n^2-n}. Symmetric decides each diagonal pair and each unordered off-diagonal pair once: 2n(n+1)/22^{n(n+1)/2}. Reflexive and symmetric: 2n(n−1)/22^{n(n-1)/2}. Equivalence relations match the ways to split the set into classes: 5 for 3 elements, 15 for 4.

Definition

  • All relations: 2n22^{n^2}. Reflexive: 2n2−n2^{n^2-n}.
  • Symmetric: 2n(n+1)/22^{n(n+1)/2}. Reflexive and symmetric: 2n(n−1)/22^{n(n-1)/2}.
  • Equivalence relations = partitions: n=3→5n=3\to5, n=4→15n=4\to15.
  • Small cases with extra conditions: list them.

Symmetric relations

2n(n+1)/22^{n(n+1)/2}

Worked example

How many reflexive relations are there on {1,2,3,4}\{1,2,3,4\}?
Practice this conceptself-check · 4 quick reps

The same idea in a real exam question:

JEE Mains · 2026 · 21 Jan 2026 Shift 1 · Q53Moderate

Example 3 · Relations and Functions · Counting Relations and Their Elements

The number of relations, defined on the set {a,b,c,d}\mathbf{\{ a,b,c,d\}}, which are both reflexive and symmetric, is equal to:

Equivalences are not a power of 2

Equivalence relations correspond to partitions, not to free yes/no choices. Count the ways to split the set into classes.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (3)

Watch out for (3)

Test yourself on Relations and Functions

20 past JEE Mains questions from this chapter, timed at 48 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.