In mathematics, a Cartesian product is a mathematical operation which returns a set (or product set or simply product) from multiple sets. That is, for sets A and B, the Cartesian product is the set of all ordered pairs where and . Products can be specified using set-builder notation, e.g.