The Cartesian product produces a new set from two or more sets.
In set-builder notation the Cartesian product of A and B is:
A × B = { (a, b) : a ∈ A, b ∈ B }
Example
For P = {x, y} and Q = {1, 2, 3} the Cartesian product P × Q is:
{
(x, 1),
(x, 2),
(x, 3),
(y, 1),
(y, 2),
(y, 3)
}
Note that (x, 1) is an ordered pair so (1, x) is not a member.
However the order of the members in the set is not important.
The set here has been spread over two lines for easier reading.