UNPKG

@dxzmpk/js-algorithms-data-structures

Version:

Algorithms and data-structures implemented on JavaScript

15 lines (9 loc) 537 B
# Cartesian Product In set theory a Cartesian product is a mathematical operation that returns a set (or product set or simply product) from multiple sets. That is, for sets A and B, the Cartesian product A × B is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B. Cartesian product `AxB` of two sets `A={x,y,z}` and `B={1,2,3}` ![Cartesian Product of Two Sets](https://upload.wikimedia.org/wikipedia/commons/4/4e/Cartesian_Product_qtl1.svg) ## References [Wikipedia](https://en.wikipedia.org/wiki/Cartesian_product)