# Cartesian Product of Sets

## Ordered Pairs

In sets, the order of elements is not important. For example, the sets \(\left\{ {2,3} \right\}\) and \(\left\{ {3,2} \right\}\) are equal to each other. However, there are many instances in mathematics where the order of elements is essential. So, for example, the pairs of numbers with coordinates \(\left({2,3}\right)\) and \(\left({3,2}\right)\) represent different points on the plane. This leads to the concept of ordered pairs.

An ordered pair is defined as a set of two objects together with an order associated with them. Ordered pairs are usually written in parentheses (as opposed to curly braces, which are used for writing sets).

In the ordered pair \(\left( {a,b} \right),\) the element \(a\) is called the first entry or first component, and \(b\) is called the second entry or second component of the pair.

Two ordered pairs \(\left( {a,b} \right)\) and \(\left( {c,d} \right)\) are equal if and only if \(a = c\) and \(b = d.\) In general,

The equality \(\left( {a,b} \right) = \left( {b,a} \right)\) is possible only if \(a = b.\)

## Tuples

The concept of ordered pair can be extended to more than two elements. An ordered \(n-\)tuple is a set of \(n\) objects together with an order associated with them. Tuples are usually denoted by \(\left( {{a_1},{a_2}, \ldots, {a_n}} \right).\) The element \({a_i}\) \(\left({i = 1,2, \ldots, n}\right)\) is called the \(i\text{th}\) entry or component, and \(n\) is called the length of the tuple.

Similarly to ordered pairs, the order in which elements appear in a tuple is important. Two tuples of the same length \(\left( {{a_1},{a_2}, \ldots, {a_n}} \right)\) and \(\left( {{b_1},{b_2}, \ldots, {b_n}} \right)\) are said to be equal if and only if \({a_i} = {b_i}\) for all \({i = 1,2, \ldots, n}.\) So the following tuples are not equal to each other:

Unlike sets, tuples may contain a certain element more than once:

Ordered pairs are sometimes referred as \(2-\)tuples.

## Cartesian Product of Two Sets

Suppose that \(A\) and \(B\) are non-empty sets. The Cartesian product of two sets \(A\) and \(B,\) denoted \(A \times B,\) is the set of all possible ordered pairs \(\left( {a,b} \right),\) where \(a \in A\) and \(b \in B:\)

The Cartesian product is also known as the cross product.

The figure below shows the Cartesian product of the sets \(A = \left\{ {1,2,3} \right\}\) and \(B = \left\{ {x,y} \right\}.\)

It consists of \(6\) ordered pairs:

Similarly, we can find the Cartesian product \(B \times A:\)

As you can see from this example, the Cartesian products \(A \times B\) and \(B \times A\) do not contain exactly the same ordered pairs. So, in general, \(A \times B \ne B \times A.\)

If \(A = B,\) then \(A \times B\) is called the Cartesian square of the set \(A\) and is denoted by \(A^2:\)

## Cartesian Product of Several Sets

Cartesian products may also be defined on more than two sets.

Let \({A_1}, \ldots ,{A_n}\) be \(n\) non-empty sets. The Cartesian product \({A_1} \times \ldots \times {A_n}\) is defined as the set of all possible ordered \(n-\)tuples \(\left({{a_1}, \ldots ,{a_n}}\right),\) where \({a_i} \in {A_i}\) and \({i = 1,\ldots, n}.\)

If \({A_1} = \ldots = {A_n} = A,\) then \({A_1} \times \ldots \times {A_n}\) is called the \(n\text{th}\) Cartesian power of the set \(A\) and is denoted by \({A^n}.\)

## Some Properties of Cartesian Product

- The Cartesian product is non-commutative:
\[A \times B \ne B \times A\]
- \(A \times B = B \times A,\) if only \(A = B.\)
- \({A \times B = \varnothing},\) if either \(A = \varnothing\) or \(B = \varnothing.\)
- The Cartesian product is non-associative:
\[\left( {A \times B} \right) \times C \ne A \times \left( {B \times C} \right)\]
- Distributive property over set intersection:
\[A \times \left( {B \cap C} \right) = \left( {A \times B} \right) \cap \left( {A \times C} \right)\]
- Distributive property over set union:
\[A \times \left( {B \cup C} \right) = \left( {A \times B} \right) \cup \left( {A \times C} \right)\]
- Distributive property over set difference:
\[A \times \left( {B \backslash C} \right) = \left( {A \times B} \right) \backslash \left( {A \times C} \right)\]
- If \(A \subseteq B,\) then \(A \times C \subseteq B \times C\) for any set \(C.\)

## Cardinality of Cartesian Product

The сardinality of a Cartesian product of two sets is equal to the product of the cardinalities of the sets:

Similarly,