Cartesian Product And Ordered Pairs
In set theory, the cartesian product of two sets is the product of two non-empty sets in an ordered way. The Cartesian product comprises two words – Cartesian and product. The word Cartesian is named after the French mathematician and philosopher René Descartes (1596-1650). In this article, you will learn the definition of Cartesian product and ordered pair with properties and examples.
Cartesian Product of Sets
The cartesian product of sets results in a set that includes collections of all ordered pairs.
Suppose A and B are two sets such that A is a set of 3 colours and B is a set of 2 objects, i.e.,
A = {green, black, red}
B = {b, p},
where b and p represent a selective bag and pen, respectively.
Let’s find the number of pairs of colored objects that we can make from these two sets, A and B.
Proceeding in a quite thorough manner, we can recognize that there will be six different pairs. They can be written as given below:
(green, b), (green, p), (black, b), (black, p), (red, b), (red, p)
The above-ordered pairs represent the Cartesian product of given two sets.
What is Cartesian Product and Ordered pairs?
The Cartesian product of two non-empty sets A and B is denoted by \( A × B \) and defined as the “collection of all the ordered pairs (a,b) such that \( a \in A \) and \( b \in B \) “.
\(~~~~~~~~~~~~~~~\) \( A × B \) = { \( ( a,b):a \in A, b\in B \) }
It is also called the cross product, set direct product or the product set of A and B .
Learn more on: Types of Sets
One very important thing to note here is that it is the collection of ordered pairs. By ordered pair, it is meant that two elements taken from each set are written in particular order. So, if a ≠ b , ordered pairs (a,b) and (b,a) are distinct.
Cartesian Square
If both the sets of a cartesian product are same, say set A = set B, then the cartesian product of set C and D is called cartesian square.
A = B
A x B = A2 = {(a,b): a ∈ C, b ∈ C}
Cartesian Product of Empty Set
As we know, an empty set does not have any elements in it. The cardinality of empty set or the size is also zero. The cartesian product of a set, say A and the empty set ∅, is an empty set only.
A x ∅ = ∅
Properties of Cartesian Product
- Cartesian product is not commutative. Thus, if we change the order of sets the result changes. If A and B are two sets, then the cartesian product of A and B, A × B ≠ B × A
- Cartesian product is not associative. If we regroup the sets in the cartesian product, then it will change the result. If A, B and C are three sets, then (A × B) × C ≠ A × (B × C)
- Distribution property of cartesian product over the intersection of sets is given by A × (B ∩ C) = (A × B) ∩ (A × C)
- Distribution property of cartesian product over the union of sets is given by A × (B∪C) = (A × B) ∪ (A × C)
- The result of the cartesian product of sets is a set of all ordered pairs
Cartesian Product and Ordered pairs Solved Examples
Example 1:
To take an example, let us take P as the set of grades in a school from set Q as the sections for the grades. So, we have P and Q as:
\(~~~~~~~~~~~~~~~~~~~\) P = {8,9,10}
\(~~~~~~~~~~~~~~~~~~~\) Q = {A,B,C,D}
So,\( P × Q \) , according to the definition will be equal to,
\( P × Q \) = { (8,A) , (8,B) , (8,C) , (8,D) ,(9,A) , (9,B) ,(9,C),(9,D),(10,A),(10,B),(10,c),(10,D)}
There are a total of 12 ordered pairs. If n(P) and n(Q) represent the number of elements in the sets P and Q respectively, then n(P) = 3 and n(Q) =4. So, n(P×Q) = 3 × 4 = 12. Refer figure 1 for the depiction of the same. In the figure, we can clearly observe how \( P × Q \) forms a plane, also referred to as a Cartesian plane. Each point represents an ordered pair which has first element from set P and second element from set Q. If number of elements in set A and B is p and q respectively, then number of elements in the Cartesian product of sets will be pq i.e.
If n(A) = p and n(B) = q and , then n( A × B) = pq.
From this property, we can draw two conclusions:
- When one or both the sets are empty, A × B = \( \phi\) .
- If anyone of the sets is infinite, even A × B is an infinite set.
Figure 1: Depiction of all possible ordered pairs for \( P × Q \)
Example 2:
For two ordered pairs to be equal, their corresponding elements must be equal. E.g. If ordered pairs (9,13) and (x+3 , y+6) are equal,
\(~~~~~~~~~~~~~~~~~~~~\) x + 3 = 9 ⇒ x = 6
\(~~~~~~~~~~~~~~~~~~~~\) y + 6 = 13 ⇒ y = 7
Facts on Cartesian Product
- The Cartesian product of sets is not limited to only two sets. It also holds for more than two sets. But the complexity increases as we increase the number of sets.
- For three sets A, B and C, an element of A ×B × C is represented as (a, b, c) and it is called an ordered triplet.
- If we take the Cartesian product of two sets as, R × R where R is the set of real numbers, that represents the entire two-dimensional Cartesian plane. Similarly, R × R × R represents three-dimensional Cartesian space.
Cartesian Product in Relational Algebra
Cartesian product in relational algebra is a binary operator. Thus, for the Cartesian product to be determined, the two relations included must possess disjoint headers that mean there should not be a common attribute name. The Cartesian Product in relational algebra is defined on two relations, i.e. on two sets of tuples. It will take every tuple one by one from the left set (relation) and pair it up with all the tuples in the right set (relation).
Cartesian Product of Three sets
The Cartesian product of three sets is explained here using an example.
Consider three sets A = {1, 2}, B = {3, 4} and C = {5, 6}
Now, we need to get the Cartesian product of these three sets.
As we know, the number of ordered pairs in A × B × C = 2 × 2 × 2 = 8 {since the number of elements in each of the given three sets is 2}
Thus, the ordered pairs of A × B × C can be tabulated as:
Elements | Elements to be selected from sets | Ordered pairs |
1st element | {1, 2} × {3, 4} × {5, 6} | (1, 3, 5) |
2nd element | {1, 2} × {3, 4} × {5, 6} | (1, 3, 6) |
3rd element | {1, 2} × {3, 4} × {5, 6} | (1, 4, 5) |
4th element | {1, 2} × {3, 4} × {5, 6} | (1, 4, 6) |
5th element | {1, 2} × {3, 4} × {5, 6} | (2, 3, 5) |
6th element | {1, 2} × {3, 4} × {5, 6} | (2, 3, 6) |
7th element | {1, 2} × {3, 4} × {5, 6} | (2, 4, 5) |
8th element | {1, 2} × {3, 4} × {5, 6} | (2, 4, 6) |
Therefore, A × B × C = {1, 2} × {3, 4} × {5, 6} = {(1, 3, 5), (1, 3, 6), (1, 4, 5), (1, 4, 6), (2, 3, 5), (2, 3, 6), (2, 4, 5), (2, 4, 6)}
Related Articles
Download BYJU’S – The Learning App and fall in love with learning!