Sum of Products — The Intuition First
Imagine you're buying a fruit basket. The shop has a rule: you must pick exactly one fruit from each of several groups. Group A has apples and bananas. Group B has oranges and mangoes. How many different baskets can you make?
You'd list them: (apple, orange), (apple, mango), (banana, orange), (banana, mango). That's 2×2=4 baskets.
Now, suppose each basket has a price that depends on which fruits you pick. The total money you'd spend if you bought every possible basket exactly once is the sum of the prices of all those baskets.
That's the core idea of Sum of Products: when you have a situation where you choose one item from each of several independent categories, the total "value" across all possible combinations is the sum of the products of the individual values.
The Precise Statement
∑i1=1n1∑i2=1n2⋯∑ik=1nk(ai1(1)⋅ai2(2)⋯aik(k))=(∑i1=1n1ai1(1))(∑i2=1n2ai2(2))⋯(∑ik=1nkaik(k))
In plain English: The sum over all combinations of products equals the product of the sums.
Let that sink in. It's not obvious — it's a beautiful distributive property that works because multiplication distributes over addition.
Why It Works — A Simple Example
Take two small groups:
- Group 1: numbers a1,a2
- Group 2: numbers b1,b2
All possible products: a1b1+a1b2+a2b1+a2b2
Factor it: a1(b1+b2)+a2(b1+b2)=(a1+a2)(b1+b2)
That's it. The sum of all products is just the product of the sums. This extends to any number of groups.
This is not the same as "product of sums" (which is a different expression). The order matters: Sum of Products = Product of Sums, but Product of Sums ≠ Sum of Products in general.
Where You'll Meet It
Probability: If you roll two dice, the sum of probabilities of all outcomes is (61+61+⋯)(61+⋯)=1×1=1.
Combinatorics: Counting total number of combinations — each group has ni choices, so total combinations = n1×n2×⋯×nk. That's a special case where each "value" is just 1.
Algebra: Expanding (x+2)(x+3) gives x2+5x+6 — that's a sum of products (each term is a product of one term from each bracket).
When you see a problem that says "find the sum of all possible products formed by taking one element from each set", immediately think: product of the sums. It saves enormous calculation.
A Common Mistake …