Cartesian Product
Ordered Pair
An ordered pair is a list (x,y) of two elements x and y, enclosed in parentheses and separated by a comma.
(1,2) (2,1)
However:
(1,2) \neq (2,1)
Cartesian Product
Suppose A and B are sets.
A cartesian product is simply the multiplication of sets denoted as A \times B and defined as
A \times B = \{(a,b): a \in A, \ b \in B \}
A = \{a, b, c\}, \ B = \{1, 2, 3\}
A \ \times \ B = \{ (a,1), (a,2), (a,3), (b,1), (b,2), (b,3), (c,1), (c,2), (c,3) \}
Ordered tripples such as (x,y,z) are also possible.
A = \{a, b\}, \ B = \{1, 2\}, \ C = \{I, II\}
A \ \times \ B \ \times \ C = \{ (a,1,I), (a,1,II), (a,2,I), (a,2,II), (b,1,I), (b,1,II), (b,2,I), (b,2,II) \}
Cartesian Power
A cartesian power is also possible for any integer n as
A^n = A \ \times \ A \ \times \ \ldots \ \times \ A = \{ (x_1, x_2, \ldots, x_n):x_1,x_2,\ldots,x_n \in A\}
One famous cartesian power is \mathbb{R}^2, also known as the cartesian plane or a two-dimensional plane.
\mathbb{R} \ \times \ \mathbb{R} = \mathbb{R}^2
\mathbb{R}^3 three-dimensional planes are also possible.
\mathbb{R} \ \times \ \mathbb{R} \ \times \ \mathbb{R} = \mathbb{R}^3
And we can generalize up to n dimensions.
\mathbb{R} \ \times \ \mathbb{R} \ \times \ \ldots \ \times \ \mathbb{R} = \mathbb{R}^n
In Data Science, we often work in high-dimensional spaces—sometimes with thousands or even millions of dimensions. GPT-4, for example, is rumored to have over a trillion \mathbb{R}^{1,000,000,000,000,000}.