In mathematics, the Cartesian product is a binary operation that returns a set from multiple sets. If you have two sets A and B, their Cartesian product, denoted as A×Bs the set of all possible ordered pairs where the first element comes from set A and the second element comes from set B.For example, if
�={1,2}A={1,2} and �={�,}B={a,b}, then �×�={(1,�)(1,�),(2,�),(2)}A×B={(1,a),(1,b),(2,a),(2,b)}.