The Cartesian product of two sets is the set of all possible ordered pairs whose first element is from the first set and the second element is from the second set. In simple language, the Cartesian product is the direct product of the elements of two sets. If A and B are two non empty sets, then the Cartesian product is defined as follows:
A x B = {(a,b) | a ∈ A and b ∈ B}
If the first and second elements are taken from a set of Real numbers, then it is known as the Cartesian product of Real numbers.

Definition of Cartesian Product

Before learning the definition of a Cartesian product, lets refresh our basics.

Set : A well-defined collection of objects is called a set.

Example:
A={Tom, Dick, Harry}
B={1,2,3,4,5}
Here A and B are two sets. Tom, Dick and Harry are elements of A and 1,2,3,4,5 are the elements of B.

Pair: A set having two elements is called a pair.

Example:
(1,2), (2,1)

Ordered Pair

Ordered pairs are a set having two elements, where the numbers are written in a particular order. The ordered pair with the first element x and second element y is written as (x, y).
(x, y) and (y, x) represent different ordered pairs unless x = y.
Cartesian Product
The Cartesian product of two sets A and B, denoted by A x B is defined as the collection of all ordered pairs (a, b) such that 'a' is an element of A and 'b' is the element of B.
In set theoretic notation, the Cartesian product is given by
A x B = {(a, b) | a $\epsilon$ A, b $\epsilon$ B}

Examples on Cartesian Product

Example 1:
Let A = {1,2,3} and B={a, b, c}
Then A x B={(1,a), (1,b), (1,c), (2,a), (2,b), (2,c), (3,a), (3,b), (3,c)}

Example 2:
Let A = {Book, Pen, Pencil} and B={1,2}
Then A x B ={(Book, 1), (Book, 2), (Pen, 1), (Pen, 2), (Pencil, 1), (Pencil, 2)}

Cartesian Join

A Cartesian Join is another name for a Cartesian product. Cartesian Join of two sets A and B is the set of all ordered pairs (a, b) such that a belongs to A and b belongs to B.
The Cartesian join or Cartesian product can be extended to any number of sets. If there are three sets, instead of ordered pairs, we write ordered triples. If there are 'n' sets, then instead of ordered pairs, we write ordered n-tuples.

Examples on Cartesian Join

Example 1:
Let A={1,2,3} B={a, b} C={#}
Then Cartesian Join A x B x C = {(1,a, #) (1,b, #), (2,a, #) (2,b, #), (3,a, #) (3,b, #)}

Example 2:
Let A = {x, y, z} and B = {2, 1}
Then Cartesian Join A x B = {(x, 2), (x, 1), (y, 2), (y, 1), (z, 2), (z, 1)}

Properties of Cartesian Products

1) Cartesian product is not Commutative (except for empty Sets)
A x B ≠ B x A
2) A x B = B x A =>A = B (A and B are equal Sets)

3) Cartesian Product of Empty Set

The Cartesian product of any set A with the empty set ∅ or { } is an empty set, since we cannot form any ordered pairs.
A x ∅ = ∅ x A = ∅

Examples on Cartesian Product of Empty Set

Example 1: If A = {a, b, c} and B = { }
then Cartesian Product of A x B = { }, since set B is an empty set.
Example 2: If C = { } and D = {1, 2, 3, 4}
then Cartesian Product of C x D = { }, since set C is an empty set.
4) Cartesian product is not Associative
(A x B) x C ≠ A x (B x C)
5) (A ∩ B) x (C ∩ D) = (A x C) ∩ (B x D)
6) (A ∪ B) x (C ∪ D) = (A x C) ∪ (B x D)
7) A x (B ∩ C) = (A x B) ∩ (A x C)
8) A x (B ∪ C) = (A x B) ∪ (A x C)

Cartesian Product of Two Sets

If A is any set, then the Cartesian product or Cartesian Join of set A to itself, denoted AxA, is the set of all ordered pairs of the form (a, b) such that both a, b belong to A. In set theoretic notation, the Cartesian product or Cartesian join of a set A to itself is given by, A x A = {(a, b) | a, b $\epsilon$ A}

If there are two sets A and B, then the Cartesian product or Cartesian Join of set A to B, denoted AxB, is the set of all ordered pairs of the form (a, b) such that a belongs to A and b belongs to B. In set theoretic notation, the Cartesian product or Cartesian join of a set A to itself is given by, A x B = {(a, b) | a $\epsilon$ A, b $\epsilon$ B}

Examples on Cartesian Product of Two Sets Example 1:

If A ={1,2} B={a, e}

Then B x A = {(a,1),(e,1),(a,2),(e,2)}

Example 2:
If C = {3, 4, 6, 8} and D = {x, y, z}
Then Cartesian product of C x D = {(3, x), (3, y), (3, z), (4, x), (4, y), (4, z), (6, x), (6, y), (6, z), (8, x), (8, y), (8, z)}