Relations in Math - Definition, Types, Examples
Relations in Math - Definition, Types, Examples
TL;DR
A relation in math is a rule that links each element of one set to one or more elements of another set, written as a collection of ordered pairs. This article covers the formal definition, domain and range, the eight standard types (empty, universal, identity, reflexive, symmetric, transitive, equivalence, inverse), how a relation differs from a function, and the three mistakes that cost students marks every term.
The 1830s Problem That Forced Mathematicians To Define A Relation
In 1830, a French mathematician named Évariste Galois wrote a manuscript that nobody could follow. He kept saying that some permutations of the roots of an equation "belong together" — but he never said exactly what belong together meant. The manuscript sat for fourteen years before Joseph Liouville understood it. The missing word was relation — a precise way of saying which things in one set are paired with which things in another. Without that word, every algebraic structure you meet later (functions, equivalence classes, ordered fields, even the integers themselves) sits on sand.
A relation in math is a rule that pairs each element of one set with one or more elements of another set. Formally, a relation R from set A to set B is a subset of the Cartesian product A×B — a collection of ordered pairs (a,b) where a∈A and b∈B. If (a,b)∈R, we write aRb and say "a is related to b."
What Is The Cartesian Product, And Why Does The Definition Start There?
Before relations, you need the Cartesian product. Given two sets A and B, the Cartesian product A×B is the set of all possible ordered pairs (a,b) with a∈A and b∈B.
If A={1,2} and B={x,y}, then:
A×B={(1,x),(1,y),(2,x),(2,y)}
A relation picks some of those pairs — not all of them. That's the whole idea. The Cartesian product is the full menu; a relation is the order.
Domain, Range, And Codomain
Every relation comes with three companion sets:
- Domain — the set of all first elements (all the a values that appear in some ordered pair).
- Range — the set of all second elements (all the b values that actually show up).
- Codomain — the set B from which the second elements are allowed to come. The range is always a subset of the codomain, but they aren't always equal.
For the relation R={(1,4),(1,5),(2,5),(3,6)} from A={1,2,3} to B={4,5,6,7}:
- Domain ={1,2,3}
- Range ={4,5,6}
- Codomain ={4,5,6,7}
The number 7 sits in the codomain but never in the range — it was available as a second element, but no pair uses it.
Quick — Standard — Stretch: Three Worked Examples
Quick — find the domain and range of a small relation
Find the domain and range of R={(-1,2),(0,5),(3,5),(4,9)}.
- Domain — first elements: {-1, 0, 3, 4}.
- Range — second elements: {2, 5, 9}. (5 appears twice but we list it once.)
Final answer: Domain ={-1, 0, 3, 4}; Range = {2, 5, 9}.
Standard (Wrong-Path-First) — is this relation a function?
Decide whether R={(1,4),(2,5),(1,6),(3,7)} is a function.
Wrong path. First instinct — check if every domain element is paired (1, 2, 3 are all there). Both checks pass, so the relation is a function. Done.
Correct method. Scan the first coordinates. If any value repeats with a different second coordinate, the relation is not a function. Here, 1 appears twice — once paired with 4, and once with 6. Final answer: R is a relation but not a function.
Stretch — does the relation "is a divisor of" on {2,3,4,6} have the transitive property?
Let R on the set {2,3,4,6} be defined by aRb if a divides b.
List the pairs first:
- 2|2,2|4,2|6 — so (2,2),(2,4),(2,6).
- 3|3,3|6 — so (3,3),(3,6).
- 4|4 — so (4,4).
- 6|6 — so (6,6).
So R={(2,2),(2,4),(2,6),(3,3),(3,6),(4,4),(6,6)}.
For transitivity, whenever (a,b)∈R and (b,c)∈R, we need (a,c)∈R. Check the longest chain: 2|4 and 4|4 — needs 2|4. Yes. 2|2 and 2|6 — needs 2|6. Yes. 3|3 and 3|6 — needs 3|6. Yes. Every chain closes.
Final answer: Yes — "is a divisor of" is transitive on this set.
The Eight Types of Relations Every Grade 11 Student Meets
Competitor coverage on this topic is uneven. Cuemath lists eight types; BYJU's lists nine; GeeksforGeeks lists seven. The eight below are the union of the most-cited types — cover them all:
- Empty relation. No elements are related. R=∅.
- Universal relation. Every element of A is related to every element of A. R=A×A.
- Identity relation. Each element is related only to itself. R={(a,a): a∈A}.
- Reflexive relation. Every element is related to itself — but other pairs may also exist.
- Symmetric relation. If (a,b)∈R, then (b,a)∈R.
- Transitive relation. If (a,b)∈R and (b,c)∈R, then (a,c)∈R.
- Equivalence relation. Reflexive, symmetric, and transitive at the same time.
- Inverse relation. The relation R−1 formed by reversing every ordered pair in R. If (a,b)∈R, then (b,a)∈R−1.
Why Relations Matter — From Sorting Algorithms To Social Networks
The story sounds dry until you see where relations show up.
- Databases. Every relational database on the planet is built on the relation concept.
- Sorting. The relation ≤ on the integers is what allows sorting to be defined.
- Social networks. "Is a friend of" is a relation on the set of users.
- Number theory. The relation "a≡b(modn)" partitions the integers into classes.
Relations vs Functions — The Distinction That Gets Tested Every Year
Every function is a relation. Not every relation is a function.
| Property | Relation | Function |
|---|---|---|
| Pairs from A×B | Yes | Yes |
| Each input may repeat? | Allowed | Not allowed |
| Each input must appear? | Optional | Required |
| Domain | All first elements that appear | All of A |
Where Students Trip Up On Relations
Mistake 1: Treating a relation and a function as the same thing
Where it slips in: The first time a problem says "decide whether the following is a function" and the relation happens to look neat.
Correct way: Scan first coordinates for duplicates with different second coordinates.
Mistake 2: Confusing range with codomain
Where it slips in: When the question gives the codomain explicitly.
Correct way: Range is only the second coordinates that show up in the pair list.
Mistake 3: Checking transitivity by intuition rather than by chain-closure
Where it slips in: Equivalence-relation questions where the relation feels obviously transitive.
Correct way: Write out every chain and confirm the results.
Key Takeaways
- A relation in math is a subset of A×B — a collection of ordered pairs.
- Every relation has a domain, range, and codomain.
- The eight standard types are empty, universal, identity, reflexive, symmetric, transitive, equivalence, and inverse.
- A function is a relation in which each first coordinate appears in exactly one ordered pair.
- An equivalence relation is reflexive, symmetric, and transitive.