In mathematics, when we learned to multiple expression such as (a + b) (c + d), we learned to do it with the mnemonic FOIL: first, outside, inside, last.
That is, the result is ac + ad + bc + bd: ac is the product of the first operand in each pair of parentheses (a, c), ad is the product of the "outside" ones (a, d), bc is the product of the "inside" ones, and bd is the product of the last operand (b, d).
Basically, a systematic way to ensure that you don't miss any combinations by doing them in a specific order each time.