Skip to main content
Logo image

Section 6.3 Applications of Cartesian Products

We can visualize a Cartesian product of two sets as a raster — a rectangular pattern of points. In Figure 6.25 we represent the set \(\{0,1,2\}\times\{0,1,2,3,4\}\) in this way.
In the video in Figure 6.21 we recall the definitions of ordered pairs and Cartesian products and talk about graphical representation of Cartesian products. It is followed by a more detailed discussion.
Figure 6.21. Cartesian Products by Matt Farmer and Stephen Steward
There are many applications of such a representation of Cartesian products, or rather many real life objects can be represented by Cartesian products.

Example 6.22. Chess board as a Cartesian product.

The squares on a chess board are represented by elements of the Cartesian product \(\{a,b,c,d,e,f,g,h\}\times \{1,2,3,4,5,6,7,8\}\text{.}\)
Most computers display images as a raster of points called pixels that can be addressed by their coordinates. These coordinates are ordered pairs and hence elements of a Cartesian product. We represent an image by coloring in the points that correspond to elements of a subset of a Cartesian product in the raster that represents the Cartesian product.
described in detail following the image
Raster consisting of seven rows and seven columns. T The rows are labeled 3,2,1,0,-1,-2,-3 from top to bottom. The columns are labeled -1,-2,-3,0,1,2 from left to right. The cells or pixels in the raster are all white.
(a) The set \(G\) as a raster of pixels.
described in detail following the image
Raster consisting of seven rows and seven columns. The rows are labeled 3,2,1,0,-1,-2,-3 from top to bottom. The columns are labeled -1,-2,-3,0,1,2 from left to right. The cells or pixels in the raster are black or white.
First row, labeled 3: white, white, white, white, black, white, white; Second row, labeled 2: white, white, black, black, black, white, white; Third row, labeled 1: white, black, white, black, white, black, white; Fourth row, labeled 0: white, black, black, white, black, black, white; Fifth row, labeled -1: white, white, black, black, black, white, white; Sixth row, labeled -2: white, black, black, white, black, black, white; Seventh row, labeled -3: white, white, white, white, white, white, white.
(b) The subset \(I\) of \(G\) as black pixels that produce an image in the raster.
Figure 6.23. The sets from Example 6.24.

Example 6.24. The images in Figure 6.23 as sets of pairs.

Figure 6.23.(a) is a graphical representation of the Cartesian product \(G=\{-3,\dots,3\}\times \{-3,\dots,3\}\) as a raster of rectangles, called pixels, with one pixel for each element of \(G\text{.}\)
Figure 6.23.(b) is an example of an image that could be displayed on a computer screen. The image of the “alien” is formed by black pixels in the raster. Let \(I:=\{ (1,3)\text{,}\) \((-1,2)\text{,}\) \((0,2)\text{,}\) \((1,2)\text{,}\) \((-2,1)\text{,}\) \((0,1)\text{,}\) \((2,1)\text{,}\) \((-2,0)\text{,}\) \((-1,0)\text{,}\) \((1,0)\text{,}\) \((2,0)\text{,}\) \((-1,-1)\text{,}\) \((0,-1)\text{,}\) \((1,-1)\text{,}\) \((-2,-2)\text{,}\) \((-1,-2)\text{,}\) \((1,-2)\text{,}\) \((2,-2) \}\text{.}\) Then, the subset \(I\) of \(G\) defines the set of black pixels that forms the image in the raster.
described in detail following the image
Raster consisting of five rows and three columns. T The rows are labeled 4,3,2,1,0 from top to bottom. The columns are labeled 0,1,2 from left to right. The cells or pixels in the raster are all white.
(a)
described in detail following the image
Raster consisting of five rows and three columns. T The rows are labeled 4,3,2,1,0 from top to bottom. The columns are labeled 0,1,2 from left to right. The cells or pixels in the raster are black and white.
First row, labeled 4: black, black, black; second row, labeled 3: black, white, white; third row, labeled 2: black, black, white; fourth row, labeled 1: black, white, white; fifth row, labeled 0: black, white, white.
(b)
described in detail following the image
Raster consisting of five rows and three columns. T The rows are labeled 4,3,2,1,0 from top to bottom. The columns are labeled 0,1,2 from left to right. The cells or pixels in the raster are black and white.
First row, labeled 4: white, white, white; second row, labeled 3: white, black, black; third row, labeled 2: white, white, black; fourth row, labeled 1: white, black, black; fifth row, labeled 0: white, black, black.
(c)
described in detail following the image
Raster consisting of five rows and three columns. T The rows are labeled 4,3,2,1,0 from top to bottom. The columns are labeled 0,1,2 from left to right. The cells or pixels in the raster are black and white.
First row, labeled 4: black, white, white; second row, labeled 3: black, white, white; third row, labeled 2: black, white, white; fourth row, labeled 1: black, white, white; fifth row, labeled 0: black, black, black.
(d)
Figure 6.25. Graphical representation of the sets from Example 6.26

Example 6.26. Letters as sets of pairs.

In Figure 6.25, we represent the set \(G=\{0,1,2\}\times \{0,1,2,3,4\}\) as a raster with the elements of various subsets given in black.
  • In Figure 6.25.(a) we show the raster representing the set \(G\text{.}\)
  • Let \(F:=\{(0,4),(1,4),(2,4),(0,3),(0,2),(1,2),(0,1),(0,0)\}\text{.}\) In Figure 6.25.(b) the black pixels represent the set \(F\) as a subset of the set \(G\text{.}\) The subset \(F\) of \(G\) forms a picture of the letter F.
  • Let \(H\) be the set that contains all elements of \(G\) that are not in \(F\text{.}\) This is the set of pairs \(H := \{(1,0),(2,0),(1,1),(2,1),(2,2),(1,3),(2,3)\}\text{.}\) In Figure 6.25.(c) the black pixels represent the set \(H\) as a subset of the set \(G\text{.}\) The subset \(F\) of \(G\) forms a picture of the letter F.
  • Let \(L:=\{(0,4), (0,3), (0,2), (0,1), (0,0), (1,0), (2,0) \}\text{.}\) In Figure 6.25.(d) the black pixels represent the set \(L\) as a subset of the set \(G\text{.}\) The subset \(L\) of \(G\) looks like the letter L.
In Checkpoint 6.13 represent the pixels of an image as a Cartesian product.

Checkpoint 6.27. Image to Cartesian product.

The subset of \(\lbrace 1,2,3,4,5\rbrace\times\lbrace 1,2,3,4,5\rbrace\) represented by the black pixels in the raster above is:
\(\lbrace\)\(\rbrace\)
[although it would be mathematically correct, answers with repeated elements will be marked as wrong]
In Example 6.28 observe how changing the graphical representation of a subset of a Cartesian product changes the subset.

Example 6.28.