Cartesian Product of Sets (original) (raw)
Last Updated : 8 Oct, 2025
The Cartesian product of two sets, denoted by A × B, is the collection of all possible ordered pairs (a, b) such that the first element a belongs to set A and the second element b belongs to set B. It is written in set builder form as:
A × B = {(a, b) : a ∈ A and b ∈ B}
**Example:
Let A = {1, 2} and B = {4, 5, 6}
A × B = {(1, 4), (1, 5), (1, 6), (2, 4), (2, 5), (2, 6)}Sets
**Note: To understand the Cartesian product of sets, one must first be familiar with basic set operations such as union and intersection, which are applied to two or more sets. The Cartesian product is an operation performed on two sets that returns a set of ordered pairs.
Cartesian Product Formula
For two sets A and B:
A × B = {(a, b) ∣ a ∈ A, b ∈ B}
Number of ordered pairs in A × B:
∣ A × B ∣ =∣A∣ ⋅ |B|
Where:
- ∣A∣ = number of elements in set A
- ∣B∣ = number of elements in set B
**Example: If A = {1,2,3} and B = {x, y} then:
A × B = {(1, x), (1, y), (2, x), (2, y), (3, x), (3, y)}
∣A × B∣ = 3⋅2 = 6
Cartesian Product of Three Sets
The Cartesian product of three sets (A, B, and C) is simply the set of all possible ordered triples (a, b, c), where the first element a comes from A, the second b from B, and the third c from C. We write it as A × B × C.
A × B × C = {(a, b, c) ∣ a ∈ A, b ∈ B, c ∈ C}
**Number of Ordered Triples:
The total number of ordered triples is the product of the number of elements in each set:
∣A × B × C∣ = ∣A∣⋅∣B∣⋅∣C∣
**Example:
If A = {5, 6, 7}, B = {x, y} and C = {p, q, r}, then:
A × B × C = {(5, x, p), (5, x, q), (5, x, r), (5, y, p), (5, y, q), (5, y, r), (6, x, p), (6, x, q), (6, x, r), (6, y, p), (6, y, q), (6, y, r), (7, x, p), (7, x, q), (7, x, r), (7, y, p),(7, y, q), (7, y, r)}
Here, ∣A × B × C∣ = 3⋅2⋅3 = 18.
Properties of Cartesian Product
**1. Cartesian Product is non-commutative: A × B ≠ B × A
**Example:
A = {1, 2} , B = {a, b}
A × B = {(1, a), (1, b), (2, a), (2, b)}
B × A = {(a, 1), (b, 1), (b, 1), (b, 2)}
Therefore as A ≠ B we have A × B ≠ B × A
**2. A × B = B × A, only if A = B
**Proof:
Let A × B = B × A then we have
A ⊆ B and B ⊆ A, it follows that A = B
**3. Cardinality of Cartesian Product is defined as the number of elements in A × B and is equal to the product of the cardinality of both sets, i.e., |A × B| = |A| × |B|
**Proof:
Let a ∈ A then the number of ordered pair (a, b) such that b ∈ B is |B|
Therefore we have |B| choices for b for each a where a ∈ A therefore the number of element in A × B is |A| × |B|
**4. A × B = ∅, if either A = ∅ or B = ∅
**Proof:
Suppose A × B = ∅. This means there are no ordered pairs (a, b) where a ∈ A and b ∈ B.
If A is non-empty, then there exists at least one element a ∈ A. For any such a, there should be an ordered pair (a, b) for some b ∈ B, as B is not empty. But since we have assumed A × B = ∅, this is a contradiction. Hence, A must be empty.
Similarly, if B is non-empty, then there exists at least one element b ∈ B. For any such b, there should be an ordered pair (a, b) for some a ∈ A, as A is not empty. But since we have assumed A × B = ∅, this is a contradiction. Hence, B must be empty.
Therefore, if ? × ? = ∅, either A or B must be empty
Hence, the statement ? × ? = ∅ if and only if either A = ∅ or ? = ∅ is proven.
Related Articles
**Solved Problems on Cartesian Product of Sets
**Problem 1. If A = {9, 10} and B = {3, 4, 6}, find A × B and |A × B|?
**S**olution:
A × B = {(9, 3), (9, 4), (9, 6), (10, 3), (10, 4), (10, 6)}
|A × B| = |A| * |B| = 2 * 3 = 6
**Problem 2: Find the value of x and y given (2x - y, 25) = (15, 2x + y)?
**Solution:
As we know from the property of ordered pairs, 2x - y = 15 and 25 = 2x + y.
Solving the linear equations we have x = 10 and y = 5.
**Problem 3. Given A = {2, 3, 4 , 5} and B = {4 , 16 , 23}, a ∈ A, b ∈ B, find the set of ordered pairs such that a2 < b?
**Solution:
As 22 < 16 and 23, 32 < 16 and 23, 42 < 23
We have the set of ordered pairs such that a2 < b is {(2, 16), (3, 16), (2, 23), (4, 23)}
**Problem 4. If A × B = {(a, x), (a, y ), (b, x ), (b, y)}, find A and B?
**Solution:
We know A is the set of all first components in ordered pairs of A × B and
B is the set of the second component in the ordered pair of A × B.
Therefore A = {a, b} and B = {x, y}
**Problem 5. Given A × B has 15 ordered pairs and A has 5 elements, find the number of elements in B?
**Solution:
We know |A × B| = |A| * |B|, 15 = 5 * |B|
Therefore B has 15 / 5 = 3 elements.
**Problem 6: Let A = {1, 2, 3}, B = {x, y, z}. R = {(a, b) ∈ A × B ∣ a is odd and b ≠ y}.
**Solution:
Identify odd elements of A : 1 and 3.
For each odd a, allowed b are elements of B except y, i.e. {x, z}.
Form ordered pairs: for a = 1: (1, x), (1, z). For a = 3 : (3, x), (3, z).
So R = {(1, x), (1, z), (3, x), (3, z)}.
Cardinality: ∣R∣ = 4.
Practice Problems on Cartesian Products of Sets
**Problem 1: Find the values of x and y given the equation (3x + y, 40) = (20, 3x − y).
**Problem 2: If A = {5, 6} and B = {2, 4, 8}, find A × B and ∣A × B∣.
**Problem 3: Given A = {1, 2, 3, 4} and B = {5, 25, 30}, where a ∈ A and b ∈ B, find the set of ordered pairs such that a2 > b.
**Problem 4: If A × B = {(p, 10), (q, 15), (r, 20), (r, 10)}, find the sets A and B.
**Problem 5: Given A × B has 20 ordered pairs and A has 4 elements, find the number of elements in B.