Relations
Two sets sit side by side — a list of book titles and a list of authors, or a set of countries and a set of capitals. A relation is simply the mathematical device for saying which items from the first set are linked to which items from the second: it is a chosen subset of ordered pairs picked out of the Cartesian product . Once you can form , a relation just filters that product down to the pairs that satisfy some rule or connection you care about — "is the square of," "divides," "is the capital of." This article builds the formal definition, shows how to read off a relation's domain, co-domain and range, and counts how many different relations can exist between two finite sets. Reflexive, symmetric and transitive relations are a Class 12 topic and are deliberately left out here.
A relation from to is any subset of , and it can always be described by roster form, set-builder form or an arrow diagram, with domain, co-domain and range read off from the ordered pairs it contains.
The core idea
Given two non-empty sets and , a relation from to is defined as any subset of the Cartesian product:
where: is the set of all ordered pairs with and , and is whichever pairs we choose to keep. If we say is related to under , written . A relation can be written in three equivalent ways. In roster form the pairs are listed explicitly, e.g. . In set-builder form the defining rule is stated instead of the pairs, e.g. . In an arrow diagram, and are drawn as two ovals and an arrow is drawn from each to every with — a picture of the same information. Every relation carries three associated sets. The domain is the set of first components actually used:
The co-domain is the whole of , fixed in advance regardless of what gets used. The range is the set of second components actually hit:
where: range is always a subset of co-domain, but the two need not be equal — co-domain is the declared target set , while range is only the part of that some pair actually reaches.
The number of possible relations from A to B
Since a relation is nothing more than a chosen subset of , the goal here is to count, in one formula, how many distinct relations can be formed between two finite sets and purely from the sizes of the sets, using only the fact that has elements and that a set with elements has subsets in total.
The goal is to show that if and , the total number of relations that can be defined from to — including the empty relation and the full relation — is exactly , by combining the size of the Cartesian product with the subset-counting rule.
Step 1. Find the size of . Every element of can be paired with every element of , so contains exactly ordered pairs. This is the ground set from which a relation is drawn.
Step 2. Recall that a relation is, by definition, any subset of — there is no restriction on which pairs may be included or excluded, so every subset of is a legitimate relation, and every relation is some subset of .
Step 3. Count the subsets of a set with elements. A standard result (proved by choosing, independently, to include or exclude each of the elements) is that a set with elements has exactly subsets. Applying this with gives subsets of .
Step 4. Conclude. Since relations from to are exactly the subsets of , the total number of possible relations from to is . This count includes the empty relation (, where nothing is related to anything) and the full relation (, where everything is related to everything).
Worked example
Let and , and define .
Step 1. Apply the rule to each element of . For , , so . For , , so . For , , so . For , , so .
Step 2. Write in roster form: .
Step 3. Read off the three sets. Domain , since every element of appeared as a first entry. Co-domain , the full declared set. Range — note sits in the co-domain but not the range, since no satisfies .
Step 4. Apply the counting formula from the derivation as a check on scale. Here and , so and the total number of possible relations from to is — the single relation above is just one of over a million subsets of .
The relation is , with domain , co-domain and range .
Competitive stretch
Take , , and . Checking divisibility pair by pair gives , so domain and range — here every element of is hit, so range equals co-domain. Since and , , so the total number of possible relations from to is .
Common traps
- Confusing co-domain with range. Co-domain is the entire set as declared; range is only the part of actually reached by some pair. They coincide only when every element of is used.
- Treating the rule as the relation. "" or " divides " is just a description of which pairs belong to ; the relation itself is the resulting set of ordered pairs, not the formula.
- Applying reflexive, symmetric or transitive labels. These classifications belong to Class 12 — this syllabus only asks for domain, co-domain, range and the three representations.
- Forgetting the count includes the empty and full relations. Students often only count "interesting" relations and undercount, or forget that and are both valid relations.
Ask the tutor: Still mixing up domain, co-domain and range, or want more practice converting a word rule into roster form? Ask the AI tutor for a fresh set of examples with step-by-step working.
Is every relation also a function
No. A function is a special kind of relation where every element of the domain set is related to exactly one element of — no element of may have two arrows going out or none at all. A general relation has no such restriction: some elements of can point to several elements of , and others can point to none. The Class 11 relations chapter only asks you to identify domain, co-domain and range for a given relation; the extra function condition and its vocabulary come right after this topic.
Why does range not always equal co-domain
Co-domain is simply the set you declared at the start, fixed before you even define . Range is worked out afterward, from whichever pairs actually satisfy the rule of . If some elements of never get paired with anything from — like in the squares example, since no element of squares to — those elements stay in the co-domain but are excluded from the range. Range equals co-domain only in the special case where every element of happens to be used.
How do I quickly count the number of relations possible between two sets
Multiply the sizes of the two sets to get , then raise 2 to that power. This works because a relation is any subset of , and a set with elements has exactly subsets. For example, with and , , so there are possible relations, ranging from the empty relation to the full relation itself.