Cartesian product

From CS2800 wiki


Definition: Cartesian product
If [math]A [/math] and [math]B [/math] are sets, then the cartesian product of [math]A [/math] and [math]B [/math] (written [math]A \href{/cs2800/wiki/index.php/%5Ctimes}{\times} B [/math]) is the set of ordered pairs of elements, one from [math]A [/math] and one from [math]B [/math]. Formally, [math]A \href{/cs2800/wiki/index.php/%5Ctimes}{\times} B \href{/cs2800/wiki/index.php/Definition}{:=} \{\href{/cs2800/wiki/index.php/Pair}{(a,b)} \mid a \href{/cs2800/wiki/index.php/%E2%88%88}{∈} A\text{ and }b \href{/cs2800/wiki/index.php/%E2%88%88}{∈} B\} [/math].

For example, [math]\href{/cs2800/wiki/index.php/Enumerated_set}{\{1,2\}} \href{/cs2800/wiki/index.php/%5Ctimes}{\times} \href{/cs2800/wiki/index.php/Enumerated_set}{\{a,b\}} = \{\href{/cs2800/wiki/index.php/Pair}{(1,a)}, \href{/cs2800/wiki/index.php/Pair}{(1,b)}, \href{/cs2800/wiki/index.php/Pair}{(2,a)}, \href{/cs2800/wiki/index.php/Pair}{(2,b)}\} [/math]