# MAT 112 Integers and Modern Applications for the Uninitiated

## Section6.3Applications 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.
There are many applications of such a representation of Cartesian products, or rather many real life objects can be represented by Cartesian products.

### Example6.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.

### Example6.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.

### Example6.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.

### Checkpoint6.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.