Course contentsShow
← Mathematics
Lesson 2535 of 3,12151. Discrete Math — Sets, Relations, FunctionsFree lesson

Computing Cartesian Products

Practice constructing Cartesian products of finite sets and visualize them using tables and coordinate grids.

Computing Cartesian Products

You'll learn how to systematically construct Cartesian products of finite sets and represent them visually using tables and coordinate grids.

What Is a Cartesian Product?

The Cartesian product of two sets A and B, written A × B, is the set of all possible ordered pairs (a, b) where a comes from A and b comes from B. The key word is "ordered"—the pair (2, 5) is different from (5, 2).

If A = {1, 2} and B = {x, y, z}, then: A × B = {(1, x), (1, y), (1, z), (2, x), (2, y), (2, z)}

Notice the pattern: for each element in A, we pair it with every element in B.

Computing by Enumeration

The systematic approach:

  1. Fix the first element from A
  2. Pair it with each element from B in turn
  3. Move to the next element in A
  4. Repeat until all elements of A are exhausted

Size formula: If |A| = m and |B| = n, then |A × B| = m × n.

Visual Representation: Tables

Create a table with A elements as rows and B elements as columns. Each cell contains the ordered pair:

     x       y       z
1  (1,x)   (1,y)   (1,z)
2  (2,x)   (2,y)   (2,z)

Visual Representation: Coordinate Grids

Plot A on the horizontal axis and B on the vertical axis. Each ordered pair becomes a point on the grid—perfect for when both sets are numeric, like {1, 2, 3} × {1, 2}.

Key Takeaway: The Cartesian product A × B systematically pairs every element of A with every element of B, creating |A| × |B| ordered pairs that can be organized using tables or coordinate grids for clarity.