In this explainer, we will learn how to perform a Cartesian product and use the operations applied on sets.
Recall that a set is a collection of numbers such as . We denote sets using braces, and the numbers between them are the elements, which can go in any order. Recall that we can also perform operations on multiple sets, such as finding the union, intersection, or difference between them. If we let , then we have
The symbol denotes the union and is the set of all elements that belong to either set, which in this case is 1, 2, 3, and 4 (the 2 is repeated but we do not have to include it twice). The symbol is for the intersection, and this means the set of elements that are common to both sets, which is just 2 since it is the only element in both sets. Finally denotes the subtraction of one set from another, which means taking away any elements from the first set that are present in the second set. Here, this just means taking the 2 away from , leaving only 1.
Let us now consider a fourth operation, the Cartesian product, which we define as follows.
Definition: Cartesian Product
The Cartesian product of two sets and is the set of all ordered pairs such that and .
To demonstrate how this works, let us take the Cartesian products of our example sets, and . To take an ordered pair using these sets, we take one element from and one element from and put them into a pair in brackets. Taking the first element from each set, we have . We want to take every possible combination of pairs between the two sets, which we illustrate in the following arrow diagram.
The Cartesian product is therefore
Note that this gives us 6 different elements, which means the size of the set is equal to 6. It is worth noting that we can also take the opposite product, :
It is important to realize that the two sets and are not the same, since the order of the pairs matters. For example, . In this situation, the only pair that is common to both sets is . In general, we note that , which means that Cartesian products are noncommutative.
It is also possible to take the product of a set with itself, which we denote by . In this case, we would have
We note that is one of two exceptions where the Cartesian product is commutative (i.e., ), since if , then clearly the order does not matter. The other case is when either or is the empty set (the set with no numbers in it) denoted by , since and . In this sense, it is basically the same as multiplying by 0.
Considering the size of set , both in the above case and in general, we can see that
That is, the number of elements in is equal to (the number of elements in ) (the number of elements in ), since it is the total number of ordered pairs we can make between the two sets. Note that if we reverse the order, we have
So we can see that , which means and always have the same number of elements.
To practice taking the Cartesian product of two sets, let us consider an example similar to the one above, where we are given the Cartesian product in arrow diagram form.
Example 1: Finding Cartesian Products Using Arrow Diagrams
Use the arrow diagram below to find .
Recall that the Cartesian product of two sets and is the set of all ordered pairs such that and .
To form these pairs, we take each element belonging to , follow the arrows connected from it to each element in , and for each such arrow, construct a pair of the form .
To begin, we see that 4 is connected via the orange arrows to 9, 3, and 8, resulting in the ordered pairs
Next, 0 is connected via blue arrows to 9, 3, and 8. This gives us the ordered pairs
Combining these elements into one set, we have
As we have just seen, using an arrow diagram to find the Cartesian product is fairly straightforward. In some cases, however, we have to find the Cartesian product of sets given in set notation. We may also have to combine the Cartesian product with other set operations. The following example will help us test these skills.
Example 2: Finding the Cartesian Product of a Set and an Intersection of Sets
If , , and , find .
Here, we have a question involving three different sets. Considering , we see that since is in parentheses, due to the order of operations, we must calculate it first. After this, we can take the Cartesian product of the result to get the solution.
Now, is the intersection of and . The intersection of these sets is the set of elements that are in both and . Since 7 is in both sets but 6 is not, we have
In other words, .
Now we must calculate , or . As this is the Cartesian product, this means we make a set containing every ordered pair of the two sets. This results in a set containing three pairs as follows:
Thus, we have the solution, .
Sometimes we are given sets in set notation, but other times we have to work out what the sets are using diagrams. Let us consider an example that uses Venn diagrams to represent the sets.
Example 3: Finding the Cartesian Product of the Difference and Union of Sets given Their Venn Diagram
Determine using the Venn diagram below.
When faced with a question involving a diagram, the best thing to do is to start off by writing down what the sets are. We can see that
Now, in order to find , we must first work out what and are.
is the set of elements in after we have taken away any elements that are also in . Here, that is
We have obtained by subtracting 7 from , since it is the only element present in both sets. We can see that, in the diagram, this corresponds to the light-blue region of that does not intersect with .
Next, we must find , which is the combined set of points that are in either or . This is where we have simply combined the two sets together. Finally, we must calculate , that is, . As this is the Cartesian product, we must make a set containing all possible ordered pairs between the two sets. This gives us
In conclusion, the solution is .
We have now seen how to construct Cartesian products between sets in different ways. Sometimes we might have questions where we have the inverse problem; given a set that is a Cartesian product, can we reconstruct the original sets? As we will see in the following example, this is a fairly straightforward thing to do, due to the nature of the Cartesian product.
Example 4: Finding a Set given Its Cartesian Product with Another Set
If , find .
Let us recall that for a Cartesian product , its elements are of the form , where and . We note that only elements of go into the first component, and only elements of go into the second. Let us consider only the first components of each element of , since these are elements that correspond to . This gives us
Now we know that contains every possible combination of ordered pairings between elements of and . This means that the above set of numbers must contain every element of in some combination. Removing the repeated numbers, this gives us the set in its entirety,
Having found the solution, we could stop here, but let us verify that it is correct by finding too and calculating their Cartesian product. Considering the second components of each element of in the same way as before gives us
Next, taking , we get
This is indeed the same set as we were given originally. Therefore, we can conclude that .
Let us continue to develop our understanding of how Cartesian products work by looking at another example where we have to carefully consider how the sets are interacting.
Example 5: Identifying Which Cartesian Product of Two Given Sets Would Contain a Given Element
Given that and , then which of the following relations would be an element of?
One possible approach to this question is to calculate each of the four options and check which set belongs to.
Let us start with . Recall that , which is the set of all ordered pairs of with itself. Since , is given by
We can see that is not an element of this set. Moving on, let us calculate . Since , we have to take every ordered pair between the two sets, which is pairs in total. This gives us
Here, we find that is the sixth element in our list, so at this point we could conclude that the answer is B. However, for the sake of completeness, let us continue calculating the other sets. For , we must find , which is actually just the elements of but with the order of the pairs swapped around. Specifically, we have
Note that this gives us , which is almost . However, since the order of the pair matters, they are not the same. Finally, we have . Since this set has 16 elements, it is probably easiest to represent it in a table:
Here is the set of all the elements in the table. As expected, we do not see among the elements.
Therefore, as we found earlier, the solution is B: .
Further Comments: Although we have calculated all the sets for completeness, it is important to note that we could have found the solution to this problem much more simply if we used our knowledge of the positions that elements of and take in each pair. Considering , we see that is only an element of , and is only an element of . The only Cartesian product that assigns an element of to the first position, and an element of to the second position, is .
We have now seen how the Cartesian product works in a variety of examples, but perhaps the most important application of the Cartesian product is Cartesian coordinates. Cartesian coordinates is another term for the coordinate system used to plot graphs and points.
As we can see from the diagram, Cartesian coordinates are ordered pairs, with the first component relating to the -axis and the second relating to the -axis. The three points plotted on the diagram are
This coordinate system can in fact be defined in terms of the Cartesian product. If , the set of real numbers, represents the -axis and also represents the -axis, then their product, , or , is the 2-dimensional plane with which we can represent points of the form and functions of the form . We note that is in fact an infinite set, which slightly differentiates it from the finite sets we have considered so far, although the concept is still the same.
The following example will demonstrate exactly how a Cartesian diagram relates to the Cartesian product.
Example 6: Finding the Cartesian Product from a Cartesian Diagram
Using the Cartesian diagram below, determine the relation .
It is important to realize exactly what the question is asking us here. We are being asked to find a set such that when its elements are plotted on a Cartesian diagram, it produces the points that are shown. To do this, we have to find what the points are and then how they are represented as a Cartesian product.
To find the values of the points on the diagram, we just have to find what their - and -values are by looking at how they line up with the - and -axes.
- For the bottom-left value, we have a value of 1 for and a value of 1 for , giving us the point .
- For the top-left value, and , giving us .
- For the bottom-right value, and , giving us .
- Finally, for the top-right value, and , giving us .
Now we have to represent these points as a set . Firstly, let us note that the sets and in this product represent the - and -axes respectively. Thus, if we wanted to express and separately, we would have
Their product , is the collection of these points as ordered pairs. Therefore, our answer is
Let us finish by summarizing the main properties of Cartesian products that we have learned.
- The Cartesian product of two sets and is the set of all ordered pairs such that and .
- The operation of taking the Cartesian product is noncommutative (so in most cases).
- We can combine the Cartesian product with other set operations such as , and . The order of operation is important to consider.
- Cartesian products can be represented using arrow diagrams and Cartesian diagrams. The plane is a form of Cartesian product.