Skip to content

Relations

5 lessons · 16 questions · 3 PYQs · ~45 s per question

The idea

A relation from AA to BB is any set of ordered pairs (a,b)(a,b) with a∈Aa\in A, b∈Bb\in B, i.e. a subset of A×BA\times B. A function is the special relation in which every element of AA appears exactly once as a first coordinate. Counting questions follow from these definitions.

Textbook vs exam method

Exam method

  1. Count choices per element. , never list unless the set is tiny.
  2. Probabilities. favourable functions over all relations (or all functions).
  3. Properties. hunt for one counter-example per property.

Worked examples

Example 1Sitter

Functions from {1,2,3}\{1,2,3\} to {x,y}\{x,y\}

Example 2EasyIndore 2022

PP(relation A→BA\to B is a function), A={1,2,3}A=\{1,2,3\}, B={a,b}B=\{a,b\}

Example 3EasyIndore 2022

A×BA\times B with (1,4)(1,4), (4,1)(4,1) and 44 elements

Example 4Easy

Reflexive relations on {a,b,c}\{a,b,c\}

Example 5Typical

1+ab>01+ab>0 on R\mathbb{R}

Traps

  • Direction of functions (nmn^{m} vs mnm^{n}); pairs vs subsets; incomplete transitivity checks.

Formulas

Size of a Cartesian product

n(A×B)=n(A) n(B),(A×B)∩(B×A)=(A∩B)×(A∩B)n(A\times B)=n(A)\,n(B),\qquad (A\times B)\cap(B\times A)=(A\cap B)\times(A\cap B)

m = n(A), n = n(B). The pairs that lie in both products have both coordinates in A and B.
Number of relations

#relations A→B=2mn,#relations on A=2m2\#\text{relations }A\to B=2^{mn},\qquad \#\text{relations on }A=2^{m^{2}}

A relation is any subset of A x B; 2^(m^2) = 512 means m = 3.
Number of functions and one-one functions

#functions A→B=nm,#one-one=nPm\#\text{functions }A\to B=n^{m},\qquad \#\text{one-one}={}^{n}P_{m}

Each element of A chooses one image; distinct images give one-one functions.
Number of onto functions

#onto A→B=∑j=0n(−1)j(nj)(n−j)m\#\text{onto }A\to B=\sum_{j=0}^{n}(-1)^{j}\binom{n}{j}(n-j)^{m}

For 2 target elements: n^m - 2 (remove the two constant functions).
Reflexive and symmetric relations

#reflexive=2m2−m,#symmetric=2m(m+1)/2\#\text{reflexive}=2^{m^{2}-m},\qquad \#\text{symmetric}=2^{m(m+1)/2}

Diagonal pairs are compulsory for reflexive; symmetric relations choose diagonal pairs and unordered pairs freely.
Probability that a relation is a function

P(random relation A→B is a function)=nm2mnP(\text{random relation }A\to B\text{ is a function})=\dfrac{n^{m}}{2^{mn}}

Indore 2022 Q28: A = {1, 2, 3}, B = {a, b} gives 8/64 = 1/8.

In the exam

Shortcuts
  • Equivalence relations on a set correspond to its partitions: 1,2,5,151, 2, 5, 15 for 11 to 44 elements.
  • If A×BA\times B contains (u,v)(u,v) and (v,u)(v,u) and has 44 elements, then A=B={u,v}A=B=\{u,v\} (Indore 2022 Q36).
~45 s per question at exam speed
When to skip: Classifying a relation on the reals (1 + ab > 0 type) needs a counter-example for transitivity - 60 to 75 s.

Before this

What the exams ask here

  • probability random relation A->B is a function
  • n(AxB)
  • is R an equivalence relation
  • A x B with (1, 4) and (4, 1) and 4 elements (Indore 2022 Q36)
  • number of relations on A is 512 -> |A| = 3
  • number of equivalence relations on {1, 2, 3}

Practise this free. Every mistake is saved and comes back until you fix it.

Start free