The Cartesian product of two sets \boldsymbol{A} and \boldsymbol{B}, denoted as \boldsymbol{A\times B} , is the set of all ordered pairs where the first element is from \boldsymbol{A} and the second element is from \boldsymbol{B}.