Cartesian Product and Relations

Cartesian products and relations are fundamental concepts in set theory, used to describe how elements can be combined and connected.

They play an important role in mathematics and computer science because they form the basis for coordinate systems, graphs, functions, and databases.

 

 

Cartesian product

The Cartesian product of two sets is the set of all ordered pairs, where the first element comes from one set and the second element from the other.

This easily extends to three or more sets.

 

 

Ordered pairs and tuples

An ordered pair is a pair of elements where the order matters. The generalization to more elements is called a tuple. Tuples are widely used in mathematics and computer science, e.g. for coordinates and data structures.

 

 

Relations

A relation between two sets is a subset of their Cartesian product. Relations can describe concepts such as “less than”, “equal to” or “is adjacent to”. Many structures in mathematics and computer science are built on relations.

 

 

Applications

Cartesian products and relations form the basis for a wide range of applications:

 

  • Points in the plane (\( \large \mathbb{R}^2\)) and in space (\( \large \mathbb{R}^3\)).
  • Graphs, where relations connect nodes.
  • Relational databases, where tables can be seen as sets of tuples.