The idea

A relation from to is any set of ordered pairs with , , i.e. a subset of . A function is the special relation in which every element of appears exactly once as a first coordinate. Counting questions follow from these definitions.
Textbook vs exam method
Textbook method
- ; relations are subsets, so of them.
- Functions: each element of has choices; one-one functions are arrangements.
- Properties of a relation on : reflexive (all ), symmetric (), transitive (); all three make an equivalence relation.
Exam method
- Count choices per element. , never list unless the set is tiny.
- Probabilities. favourable functions over all relations (or all functions).
- Properties. hunt for one counter-example per property.
Worked examples
Example 1Sitter
Functions from to
.
Example 2EasyIndore 2022
(relation is a function), ,
.
Example 3EasyIndore 2022
with , and elements
.
Example 4Easy
Reflexive relations on
.
Example 5Typical
on
reflexive, symmetric, not transitive ().
Traps
- Direction of functions ( vs ); pairs vs subsets; incomplete transitivity checks.
Formulas
Size of a Cartesian product
m = n(A), n = n(B). The pairs that lie in both products have both coordinates in A and B.
Number of relations
A relation is any subset of A x B; 2^(m^2) = 512 means m = 3.
Number of functions and one-one functions
Each element of A chooses one image; distinct images give one-one functions.
Number of onto functions
For 2 target elements: n^m - 2 (remove the two constant functions).
Reflexive and symmetric relations
Diagonal pairs are compulsory for reflexive; symmetric relations choose diagonal pairs and unordered pairs freely.
Probability that a relation is a function
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: for to elements.
- If contains and and has elements, then (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}