Quick answer: The Cartesian product is the set of all ordered pairs with and , so . A relation from A to B is any subset of . If and , there are relations from A to B.
Ordered pairs
An ordered pair has a first and a second element, so order matters: .
Two ordered pairs are equal only when corresponding elements are equal: means and .
Cartesian product
Example: If and , then
which has elements.
Properties
| Property | Statement |
|---|---|
| Size | |
| Not commutative | unless or one set is empty |
| Empty set | |
| Over union | |
| Over intersection | |
| Over difference | |
| Mixed |
is often written , and is the coordinate plane.
Relations
A relation R from A to B is a subset of . We write when .
| Term | Meaning |
|---|---|
| Domain | Set of first elements of pairs in R |
| Range | Set of second elements of pairs in R |
| Co-domain | The whole set B |
| Relation on A | A subset of |
Example: Let and on A. Then , the domain is and the range is .
Inverse relation
The domain of is the range of R, and vice versa.
Counting results
| Quantity | Count |
|---|---|
| Elements of | |
| Relations from A to B | |
| Relations on A, with | |
| Non-empty relations from A to B |
Why : a relation is any subset of , and a set of elements has subsets (see power sets).
Worked examples
Example 1: equal ordered pairs
If , find x and y.
and , so and .
Example 2: counting relations
If and , how many relations are there from A to B?
.
Example 3: recovering sets from a product
If , then and .
Example 4: common elements
If , and , find .
Using the mixed property, it equals .
Summary table
| Idea | Key result |
|---|---|
| Ordered pair | Order matters |
| Relation | Any subset of |
| Number of relations | |
| Inverse relation | Swap each pair |
Exam tips
- For "how many relations" questions, find first, then raise 2 to that power.
- Use the mixed property for intersections of two Cartesian products.
- Do not confuse the range of a relation with its co-domain.
Next, study types of relations and equivalence relations or browse the NIMCET Set Theory chapter.
Common mistakes
- Treating and as the same pair.
- Writing the number of relations as instead of .
- Assuming .
- Forgetting that the empty relation is also a relation.
Frequently Asked Questions
What is the Cartesian product of two sets?
A × B is the set of all ordered pairs (a, b) with a in A and b in B.
How many relations are there from A to B?
If n(A) = m and n(B) = n, there are 2^(mn) relations from A to B.
Is A × B equal to B × A?
Not in general. They are equal only when A = B or when one of the sets is empty.
What is a relation in set theory?
A relation from A to B is any subset of the Cartesian product A × B.
What is the inverse of a relation?
The inverse R⁻¹ contains every pair of R with its elements swapped.