Cartesian product

Every possible pairing of one item from each of two sets, so the number of pairs is the product of the two sizes.

In more detail

For sets of sizes m and n it contains m times n pairs, so three values times two values gives six pairs. In SQL, a join with a missing or incomplete join condition produces an accidental Cartesian product, which quietly multiplies sums and averages instead of failing. Build systems use the same idea to expand a matrix of settings into one job per combination.

Related terms

Taught in

References

Certification courses