Welcome to Relations and Functions
Much of mathematics is about finding a pattern — a recognisable link between quantities that change. Daily life is full of relations: brother and sister, teacher and student. Mathematics has its own: "m is less than n", "line l is parallel to line m", "A is a subset of B". Look closely and every one of them involves pairs of objects in a certain order.
That observation drives the whole chapter:
- Cartesian product (this section) — the machine that manufactures all possible ordered pairs from two sets.
- Relations — selecting from those pairs the ones that satisfy a rule.
- Functions — the special relations where every input has exactly one output, plus the graphs of the standard functions.
- Algebra of real functions — adding, subtracting, multiplying and dividing functions.
The idea of a function was crystallised by G. W. Leibnitz (1646-1716), and it is arguably the single most important concept in mathematics — every later chapter (trigonometric functions, limits, calculus itself) is a study of particular functions.
[JEE Tip] From this chapter, JEE Main repeatedly asks: counting elements of , counting relations (), domain-range of relations and functions, and equality of ordered pairs. Every one of these is covered here and drilled in the JEE Corner.
Ordered Pairs
An ordered pair (p, q) is a pair of elements grouped together in a particular order — p first, q second. The brackets and the order both carry meaning:
- (p, q) is not the set {p, q}. In a set, order is irrelevant; in an ordered pair, it is everything.
- (DL, 01) as a licence-plate code is not the code (01, DL).
Key Point (Equality): Two ordered pairs are equal if and only if the corresponding first elements are equal AND the corresponding second elements are equal: .
This one-line rule is a small equation-solving machine. If , then comparing coordinates gives two separate equations: and , so , .
[Board Important] "Equality of ordered pairs" questions are guaranteed easy marks: split into two coordinate equations, solve each. Never mix the coordinates.
The Cartesian Product
Suppose A = {red, blue} is a set of colours and B = {bag, coat, shirt} a set of objects. How many coloured objects can we describe? Pair each colour with each object:
(red, bag), (red, coat), (red, shirt), (blue, bag), (blue, coat), (blue, shirt) — six pairs.

Key Point (Definition): Given two non-empty sets P and Q, the cartesian product is the set of ALL ordered pairs with first element from P and second from Q:
If either P or Q is empty, there is nothing to pair: . In particular .
The three facts you will use constantly
- Counting: if and , then . (Each of the p first elements pairs with each of the q second elements.)
- Order: in general — the pairs point in opposite directions — although both have pq elements. They are equal only when A = B (or one is empty).
- Infinite factor: if A and B are non-empty and either is infinite, then is infinite.

[JEE Tip] forces A = B for non-empty sets — a favourite true/false claim. And a subtler one: .
Ordered Triplets, and
The product extends naturally to three sets:
where (a, b, c) is an ordered triplet. For a finite set with n elements, has elements.
The geometric stars of the show
- — all ordered pairs of real numbers — is precisely the set of coordinates of all points of the plane. This is why the plane is called .
- is the set of coordinates of all points of three-dimensional space, written .

The Cartesian product is named after René Descartes, whose coordinate geometry is exactly this identification of points with ordered pairs.
Key Point: The point (2.5, 1.8) is different from the point (1.8, 2.5) — geometry itself confirms that order matters in a pair.
[Board Important] "What do and represent?" is a standard 1-2 mark theory question — answer: the coordinates of all points in the plane and in space respectively.
Solved Examples
Example 1. If , find x and y.
Solution.
Step 1 — invoke the equality rule. Two ordered pairs are equal exactly when BOTH corresponding coordinates are equal — one pair-equality always splits into two ordinary equations.
Step 2 — first coordinates. .
Step 3 — second coordinates. .
Step 4 — verify. ✓.
Takeaway: one pair-equality = two coordinate equations, solved independently — never mix the coordinates.
Example 2. If , find x and y.
Solution.
Step 1 — split into two equations. First coordinates: . Second coordinates: .
Step 2 — solve the first. , so .
Step 3 — solve the second. .
Step 4 — verify. ✓.
Takeaway: fractions change nothing — the coordinate-splitting rule is identical; just clear each small equation carefully.
Example 3. If P = {a, b, c} and Q = {r}, form and . Are they equal?
Solution.
Step 1 — build (first element from P). Pair each of a, b, c with r: .
Step 2 — build (first element from Q). Pair r with each of a, b, c: .
Step 3 — compare. The sizes match ( each), but — no pair of one set appears in the other. So .
Takeaway: the two products are mirror images: same count, opposite direction — equality of products needs P = Q.
Example 4. Let A = {1, 2, 3}, B = {3, 4} and C = {4, 5, 6}. Find (i) (ii) (iii) (iv) .
Solution.
(i) Step 1 — inner bracket first. (the only shared element).
Step 2. — three pairs.
(ii) Step 3 — build both products. = {(1,3), (1,4), (2,3), (2,4), (3,3), (3,4)}; = {(1,4), (1,5), (1,6), (2,4), (2,5), (2,6), (3,4), (3,5), (3,6)}.
Step 4 — intersect. Common pairs: (1,4), (2,4), (3,4) — identical to (i) ✓.
(iii) Step 5. , so has pairs: every (a, x) with , .
(iv) Step 6. Pool the two products from Step 3: exactly the same 12 pairs as (iii) ✓.
Takeaway: the Cartesian product distributes over both and — computing each side separately and matching is also how the identity is verified in exams.
Example 5. If P = {1, 2}, form .
Solution.
Step 1 — count before listing. triplets expected.
Step 2 — list in binary-counter order (first coordinate slowest): (1,1,1), (1,1,2), (1,2,1), (1,2,2), (2,1,1), (2,1,2), (2,2,1), (2,2,2).
Step 3 — check. Eight distinct triplets listed ✓.
Takeaway: the odometer/binary-counter ordering guarantees nothing is missed and nothing repeats.
Example 6. If = {(p, q), (p, r), (m, q), (m, r)}, find A and B.
Solution.
Step 1 — project onto first coordinates. The first elements appearing are p and m: A = {p, m}.
Step 2 — project onto second coordinates. The second elements are q and r: B = {q, r}.
Step 3 — verify the count. pairs, matching the four given ✓.
Takeaway: a full Cartesian product remembers its factors — read A and B off the coordinates by projection.
Example 7. If set A has 3 elements and B = {3, 4, 5}, find the number of elements of .
Solution.
Step 1 — record the sizes. (given), (count the listed elements).
Step 2 — apply the counting rule. Each of the 3 first elements pairs with each of the 3 second elements: .
Takeaway: the multiplication rule answers instantly — no listing required, and the answer does not depend on WHAT A's elements are.
Example 8. If G = {7, 8} and H = {5, 4, 2}, find and .
Solution.
Step 1 — , row by row. Fix 7, run through H: (7,5), (7,4), (7,2). Fix 8: (8,5), (8,4), (8,2). Six pairs.
Step 2 — , same discipline. Fix 5: (5,7), (5,8). Fix 4: (4,7), (4,8). Fix 2: (2,7), (2,8). Six pairs.
Step 3 — observe. Both products have elements, yet share NO pair — every pair of one is the reversal of a pair of the other.
Takeaway: \"fix the first element, sweep the second set\" is the listing discipline that scales to any product.
Example 9. State whether each is true or false; correct the false ones. (i) If P = {m, n} and Q = {n, m}, then = {(m, n), (n, m)}. (ii) If A and B are non-empty sets, is a non-empty set of ordered pairs (x, y) with , . (iii) If A = {1, 2}, B = {3, 4}, then .
Solution.
(i) Step 1 — count check first. P and Q are the SAME 2-element set {m, n}, so the product must have pairs — the claim lists only two. False. Correction: .
(ii) Step 2. This is word-for-word the definition of the Cartesian product of non-empty sets. True.
(iii) Step 3 — inner bracket first. , and a product with an empty factor is empty: . True.
Takeaway: the count check catches wrong listings instantly — run it before believing any written-out product.
Example 10. If A = {, 1}, find .
Solution.
Step 1 — count. ordered triplets.
Step 2 — list in counter order. (,,), (,,1), (,1,), (,1,1), (1,,), (1,,1), (1,1,), (1,1,1).
Step 3 — see the geometry. These 8 triplets are precisely the corners of a cube of side 2 centred at the origin in space.
Takeaway: Cartesian products draw geometry — pairs are plane points, triplets are space points.
Example 11. Let A and B be sets with , . If (x, 1), (y, 2), (z, 1) are in and x, y, z are distinct, find A and B.
Solution.
Step 1 — harvest first coordinates. Membership in puts every first coordinate in A: x, y, z ∈ A, and they are DISTINCT — three different elements.
Step 2 — close A with the size. exactly, so A can hold nothing more: A = {x, y, z}.
Step 3 — harvest and close B. Second coordinates 1 and 2 lie in B; exactly, so B = {1, 2}.
Takeaway: the given sizes upgrade \"contains these elements\" to \"equals this set\" — counting hypotheses do the closing work.
Example 12. The Cartesian product has 9 elements, among which are (, 0) and (0, 1). Find A and the remaining elements of .
Solution.
Step 1 — find the size of A. , so .
Step 2 — harvest elements from the given pairs. (, 0) ∈ puts and 0 in A; (0, 1) puts 1 in A. That is three distinct elements — exactly filling A: A = {, 0, 1}.
Step 3 — list all nine pairs systematically. (,), (,0), (,1), (0,), (0,0), (0,1), (1,), (1,0), (1,1).
Step 4 — remove the two given. Remaining seven: (,), (,1), (0,), (0,0), (1,), (1,0), (1,1).
Takeaway: the classic three-move combo — square-root the count, harvest coordinates, list the rest in counter order.
Example 13. Let A = {1, 2} and B = {3, 4}. Write . How many subsets does it have? List them.
Solution.
Step 1 — the product. — four elements.
Step 2 — count the subsets. A 4-element set has subsets.
Step 3 — list by size. Size 0: . Size 1: {(1,3)}, {(1,4)}, {(2,3)}, {(2,4)}. Size 2: {(1,3),(1,4)}, {(1,3),(2,3)}, {(1,3),(2,4)}, {(1,4),(2,3)}, {(1,4),(2,4)}, {(2,3),(2,4)}. Size 3: {(1,3),(1,4),(2,3)}, {(1,3),(1,4),(2,4)}, {(1,3),(2,3),(2,4)}, {(1,4),(2,3),(2,4)}. Size 4: itself. Count: ✓.
Step 4 — look ahead. Each of these 16 subsets is one RELATION from A to B — the exact idea the next section builds on.
Takeaway: subsets of = relations from A to B; their count is always .