Skip to content

Mathematics · Ch 1 — Sets, Relations and Functions

Cartesian Product

1.3

Cartesian Product

Definition. For non-empty sets A,B,CA,B,C, the Cartesian product of AA with BB is the set of ordered pairs

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

For three sets, 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\} is a set of ordered triplets. In particular A×A={(a,b):a,b∈A}A\times A=\{(a,b):a,b\in A\} -- this is not the same as {(a,a):a∈A}\{(a,a):a\in A\}, which is only the "diagonal" of A×AA\times A.

Order matters. Because the pairs are ordered, A×B≠B×AA\times B\ne B\times A in general; equality A×B=B×AA\times B=B\times A forces A=BA=B. The familiar R×R={(x,y):x,y∈R}R\times R=\{(x,y):x,y\in R\} (written R2R^2) is the coordinate plane, and R×R×R=R3R\times R\times R=R^3 (written R3R^3) is ordered-triplet space.

Example. If A={1,2,3}A=\{1,2,3\} and B={2,4,6}B=\{2,4,6\}, then

A×B={(1,2),(1,4),(1,6),(2,2),(2,4),(2,6),(3,2),(3,4),(3,6)},A\times B=\{(1,2),(1,4),(1,6),(2,2),(2,4),(2,6),(3,2),(3,4),(3,6)\},

a subset of R×RR\times R with 3×3=93\times3=9 elements.

Counting rule. n(A×B)=n(A) n(B)n(A\times B)=n(A)\,n(B) for finite A,BA,B; similarly n(A×B×C)=n(A) n(B) n(C)n(A\times B\times C)=n(A)\,n(B)\,n(C).

Familiar subsets of R×RR\times R. Graphs of ordinary curves are exactly subsets of R×RR\times R: {(x,2x):x∈R}\{(x,2x):x\in R\} (a line), {(x,x2):x∈R}\{(x,x^2):x\in R\} (a parabola), {(x,x):x≥0}\{(x,\sqrt x):x\ge0\} and {(x,−x):x≥0}\{(x,-\sqrt x):x\ge0\} (the two branches of y2=xy^2=x), {(x2,x):x∈R}\{(x^2,x):x\in R\}.

Worked examples from the book, in brief:

  • Counting subsets of a set defined by a condition. For A={x:x=4n+1, 2≤n≤5, n∈N}={9,13,17,21}A=\{x:x=4n+1,\ 2\le n\le5,\ n\in N\}=\{9,13,17,21\}, n(A)=4n(A)=4 so n(P(A))=24=16n(P(A))=2^4=16.
  • Language-survey cardinality. With three overlapping groups (percentages of 5000 people knowing three languages), the count "only Language A" is found via n(A)−n(A∩B)−n(A∩C)+n(A∩B∩C)n(A)-n(A\cap B)-n(A\cap C)+n(A\cap B\cap C), giving 1950 people -- confirmed independently by drawing a Venn diagram with the region percentages.
  • A set-algebra identity. Statements like ((A∪B′∪C)∩(A∩B′∩C′))∪((A∪B∪C′)∩(B′∩C′))=B′∩C′((A\cup B'\cup C)\cap(A\cap B'\cap C'))\cup((A\cup B\cup C')\cap(B'\cap C'))=B'\cap C' are proved by using subset containments (e.g. A∩B′∩C′⊆A⊆A∪B′∪CA\cap B'\cap C'\subseteq A\subseteq A\cup B'\cup C) to collapse each bracket.
  • Counting a "removed-element" family of subsets. If X={1,…,10}X=\{1,\dots,10\}, A={1,2,3,4,5}A=\{1,2,3,4,5\}, the subsets B⊆XB\subseteq X with A−B={4}A-B=\{4\} correspond exactly to subsets CC of {6,7,8,9,10}\{6,7,8,9,10\} (take B=C∪{1,2,3,5}B=C\cup\{1,2,3,5\}), so there are 25=322^5=32 such BB.
  • Cardinality algebra. If n(B−A)=2n(A−B)=4n(A∩B)n(B-A)=2n(A-B)=4n(A\cap B) and n(A∪B)=14n(A\cup B)=14: setting n(A∩B)=kn(A\cap B)=k gives n(A−B)=2k, n(B−A)=4kn(A-B)=2k,\ n(B-A)=4k, and since n(A∪B)=n(A−B)+n(B−A)+n(A∩B)=7k=14n(A\cup B)=n(A-B)+n(B-A)+n(A\cap B)=7k=14, k=2k=2; then n(A)=n(A−B)+n(A∩B)=6n(A)=n(A-B)+n(A\cap B)=6, so n(P(A))=26=64n(P(A))=2^6=64.
  • Power-of-2 equation. Two sets with m,km,k elements (m>km>k) where 2m−2k=112=24×72^m-2^k=112=2^4\times7: factoring 2k(2m−k−1)=24×72^k(2^{m-k}-1)=2^4\times7 forces k=4, 2m−k−1=7⇒m−k=3⇒m=7k=4,\ 2^{m-k}-1=7\Rightarrow m-k=3\Rightarrow m=7. …