Cartesian product of sets

A map grid reference like "column D, row 7" is really just an ordered pair — and that simple idea, applied to sets, is exactly what launches the whole chapter "Relations and Functions" in CBSE Class 11 Mathematics. Having just finished sets — union, intersection, complement — you now learn how to pair up two sets systematically: take every element of one set, match it with every element of another, and keep track of which came first. The result is the Cartesian product, and it is not a side topic — it is the scaffolding on which relations (subsets of it) and functions (special relations) are built in the very next lessons. This article stays tightly inside the NCERT scope: forming A×BA \times B, counting its elements, seeing why order matters, and recognising R×R\mathbb{R} \times \mathbb{R} as the coordinate plane you already graph on.

The core insight

The Cartesian product A×BA \times B collects every ordered pair (a,b)(a, b) with a∈Aa \in A and b∈Bb \in B, giving n(A)⋅n(B)n(A) \cdot n(B) pairs in total, and since order is built into the pair, A×BA \times B generally differs from B×AB \times A even though both have the same size.

The core idea

Ordered pairs first. An ordered pair (a,b)(a, b) fixes a position for each entry — aa first, bb second — which is what lets us say two ordered pairs are equal exactly when both positions match:

(a,b)=(c,d)  ⟺  a=c and b=d.(a, b) = (c, d) \iff a = c \text{ and } b = d.

where: a,ca, c are the first entries and b,db, d are the second entries of the two pairs being compared. This is stricter than set equality, where {a,b}={b,a}\{a, b\} = \{b, a\} regardless of order — an ordered pair remembers sequence, a set does not.

Defining the product. For non-empty sets AA and BB, the Cartesian product A×BA \times B is the set of all such pairs formed by taking a first element from AA and a second from BB:

A×B={(a,b):a∈A,  b∈B}.A \times B = \{(a, b) : a \in A, \; b \in B\}.

Every element of AA gets paired with every element of BB, once each, and nothing else is included. If either AA or BB is empty, there is nothing to pair, so A×B=∅A \times B = \varnothing.

Counting the pairs. Because each of AA's pp elements can be matched with each of BB's qq elements independently, the total count multiplies rather than adds:

n(A×B)=n(A)⋅n(B).n(A \times B) = n(A) \cdot n(B).

where: n(A)n(A) and n(B)n(B) are the number of elements in AA and BB. This is the single most-used fact in the chapter — both forwards (given the sets, find the count) and backwards (given the count and one set, find the other).

Order matters, but size doesn't care. Swapping the roles of AA and BB generally produces a different set of pairs, since (a,b)≠(b,a)(a, b) \neq (b, a) unless a=ba = b, so A×B≠B×AA \times B \neq B \times A in general. Yet the two products always have equal size, n(A×B)=n(B×A)=n(A)⋅n(B)n(A \times B) = n(B \times A) = n(A) \cdot n(B), because multiplication of the two counts is commutative even though the pairs themselves are not interchangeable.

Figure
A grid of dots showing set A across the top and set B down the side, with every dot marking one ordered pair from the Cartesian product
A times B: every element of A meets every element of B A = {1, 2, 3}, B = {x, y} — 3 times 2 = 6 ordered pairs 1 2 3 x y (1,x) (2,x) (3,x) (1,y) (2,y) (3,y) Each dot is one ordered pair — six dots, six pairs, matching n(A) times n(B)

Extending the idea. Taking A=B=RA = B = \mathbb{R} gives R×R\mathbb{R} \times \mathbb{R} (written R2\mathbb{R}^2), the set of all ordered pairs of real numbers — precisely the coordinate plane, where every point is written (x,y)(x, y). One step further, R×R×R\mathbb{R} \times \mathbb{R} \times \mathbb{R} (written R3\mathbb{R}^3) is the set of ordered triples (x,y,z)(x, y, z), three-dimensional coordinate space. The idea generalises past two sets too: A×B×C={(a,b,c):a∈A,b∈B,c∈C}A \times B \times C = \{(a, b, c) : a \in A, b \in B, c \in C\}, with n(A×B×C)=n(A)⋅n(B)⋅n(C)n(A \times B \times C) = n(A) \cdot n(B) \cdot n(C).

Derivation AWhy n(A × B) equals n(A) times n(B)

The goal is to justify, from nothing more than the definition of an ordered pair and a basic counting argument, why the number of pairs in A×BA \times B is always the product n(A)⋅n(B)n(A) \cdot n(B) rather than, say, their sum — this is the fact students are expected to both apply and prove informally in the chapter, and it is also the reasoning that later underlies counting rules in permutations and probability.

Step 1. Fix the first coordinate. Pick any one element a∈Aa \in A and ask: how many ordered pairs (a,b)(a, b) can be formed with this fixed aa and bb ranging over BB? Since bb can be any of the q=n(B)q = n(B) elements of BB, and each choice of bb gives a distinct pair (because the pairs differ in their second coordinate), fixing one aa produces exactly qq pairs.

Step 2. Vary the first coordinate. There are p=n(A)p = n(A) choices for aa, and Step 1 showed each choice of aa contributes its own separate batch of qq pairs. No pair from one batch can coincide with a pair from another batch, because pairs from different batches have different first coordinates, so by the definition of equality of ordered pairs they are unequal.

Step 3. Add up the batches. The full set A×BA \times B is the union of these pp disjoint batches, each of size qq. Since the batches share no pairs, the total count is simply the sum of pp equal batches of size qq, which is pp added to itself pp times over — that is, p×qp \times q:

n(A×B)=q+q+⋯+q⏟p times=p⋅q=n(A)⋅n(B).n(A \times B) = \underbrace{q + q + \cdots + q}_{p \text{ times}} = p \cdot q = n(A) \cdot n(B).

Step 4. Read the result. The multiplication, not addition, arises because the choices of aa and bb are made independently — every one of the pp choices for the first slot can be freely combined with every one of the qq choices for the second slot. This is the same independent-choice reasoning used later for the fundamental counting principle.

Worked example

Let A={1,2,3}A = \{1, 2, 3\} and B={x,y}B = \{x, y\}. Find A×BA \times B and B×AB \times A, and verify the counting rule for each.

Step 1. List A×BA \times B by pairing every element of AA (first slot) with every element of BB (second slot):

A×B={(1,x),(1,y),(2,x),(2,y),(3,x),(3,y)}.A \times B = \{(1,x), (1,y), (2,x), (2,y), (3,x), (3,y)\}.

This gives 6 ordered pairs.

Step 2. List B×AB \times A by reversing the roles — BB's elements now come first:

B×A={(x,1),(x,2),(x,3),(y,1),(y,2),(y,3)}.B \times A = \{(x,1), (x,2), (x,3), (y,1), (y,2), (y,3)\}.

This also gives 6 ordered pairs, but as sets A×B≠B×AA \times B \neq B \times A: for instance (1,x)∈A×B(1, x) \in A \times B while (1,x)∉B×A(1, x) \notin B \times A.

Step 3. Check the counting rule. Here n(A)=3n(A) = 3 and n(B)=2n(B) = 2, so n(A×B)=3×2=6n(A \times B) = 3 \times 2 = 6 and n(B×A)=2×3=6n(B \times A) = 2 \times 3 = 6 — both match the lists above, confirming that the pairs differ while the counts agree.

Competitive stretch

If n(A)=4n(A) = 4 and A×BA \times B has 20 elements, find n(B)n(B), then list P×P×PP \times P \times P for P={1,2}P = \{1, 2\}.

Step 1. From n(A×B)=n(A)⋅n(B)n(A \times B) = n(A) \cdot n(B): 20=4×n(B)20 = 4 \times n(B), so n(B)=20/4=5n(B) = 20/4 = 5.

Step 2. For P×P×PP \times P \times P, each of the three positions is independently 11 or 22, giving 2×2×2=82 \times 2 \times 2 = 8 triples:

P×P×P={(1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1),(2,1,2),(2,2,1),(2,2,2)}.P \times P \times P = \{(1,1,1), (1,1,2), (1,2,1), (1,2,2), (2,1,1), (2,1,2), (2,2,1), (2,2,2)\}.

This matches n(P×P×P)=n(P)3=23=8n(P \times P \times P) = n(P)^3 = 2^3 = 8, so n(B)=5n(B) = 5 and the eight triples are listed above.

Common traps

  • Confusing {a,b}\{a, b\} with (a,b)(a, b). A set collapses order and duplicates ({a,b}={b,a}\{a,b\} = \{b,a\}); an ordered pair keeps a fixed sequence and can repeat naturally, e.g. (2,2)∈A×A(2,2) \in A \times A.
  • Assuming A×B=B×AA \times B = B \times A. The two sets of pairs are generally different (unless A=BA = B), even though they always have the same size.
  • Forgetting the empty-set case. If either AA or BB is empty, A×B=∅A \times B = \varnothing — it does not default to the non-empty set.
  • Turning the product into a sum. n(A×B)=n(A)⋅n(B)n(A \times B) = n(A) \cdot n(B), not n(A)+n(B)n(A) + n(B) — a slip that costs marks under time pressure.

Ask the tutor: Want to practice listing a Cartesian product without missing pairs, or work through a few more "find the unknown set size" problems using n(A×B)=n(A)⋅n(B)n(A \times B) = n(A) \cdot n(B)?

Why is (a, b) different from (b, a) if a and b are just two elements sitting together

Because an ordered pair is defined by the rule that position carries meaning: the first slot and second slot are separate roles, not interchangeable membership in a group. Two ordered pairs are equal only when both the first entries match and the second entries match. So (a,b)(a, b) and (b,a)(b, a) are different objects unless a=ba = b, even though the same two elements are involved — exactly like a coordinate (3,5)(3, 5) meaning something different from (5,3)(5, 3) on a graph.

Do A times B and B times A ever come out equal as sets

Yes, in the special case A=BA = B, since then swapping the roles of the two sets does not change which pairs are available — every pair (a,b)(a, b) with a,b∈Aa, b \in A is automatically matched by (b,a)(b, a), also with both entries in AA. If A≠BA \neq B, though, A×BA \times B and B×AB \times A are generally different sets of pairs, even while n(A×B)=n(B×A)n(A \times B) = n(B \times A) always holds since both equal n(A)⋅n(B)n(A) \cdot n(B).

How does the Cartesian product connect to relations and functions in the next lessons

A relation from AA to BB is formally defined as any subset of A×BA \times B — so before you can even talk about "a relation," you need the full Cartesian product as the universe of all possible pairings to choose from. A function is then a special kind of relation (one where every element of AA appears exactly once as a first entry). That is why this topic opens the chapter: A×BA \times B is the raw material, relations select some pairs from it, and functions are the most tightly constrained selections of all.

Before this

Where this leads