MathorynMathematical Formula Database

Set Theory & Logic

Cartesian Product

The Cartesian product of two sets is the set of all ordered pairs with the first entry from AA and the second from BB; its size is the product of the sizes. It is the basis of coordinates, relations, tables and the multiplication principle of counting.

A×B={(a,b):a∈A, b∈B},∣A×B∣=∣A∣⋅∣B∣A\times B=\{(a,b): a\in A,\ b\in B\},\qquad |A\times B|=|A|\cdot|B|
LaTeXA\times B=\{(a,b): a\in A,\ b\in B\},\qquad |A\times B|=|A|\cdot|B|

Variables

A, BA,\ B
sets
(a,b)(a,b)
ordered pair
∣A∣|A|
number of elements

Example

A={1,2,3}A=\{1,2,3\}, B={x,y,z,w}B=\{x,y,z,w\}. How many pairs are in A×BA\times B?

  1. ∣A×B∣=3⋅4|A\times B|=3\cdot4.

Answer: 1212 ordered pairs.

Related formulas