Cartesian Product in mathematics When using the cartesian product, and you have three collections, do you take two collections at a time OR all three together to calculate the product?
My question is if you have more than two collections, let's say A, B and C
A = {1,2,3}
B = {4,5,6}
C = {7,8}

A x B x C
{1,2,3} x {4,5,6} x {7,8}

Do you with the cartesian product calculate A x B, then B x C? And maybe A x C? Which means you take only two collections at a time.
OR
Do you take all three collections at the same time A x B x C?

The cartesian product is an operation defined on two sets. Given the sets A and B the product A x B is not equal to the product B x A. So you will have to use two sets at a time and you will need to define an order, you want to apply the operation in, since (A x B) x C is not equal to A x (B x C). 
