Sums and Products
Summation notation writes repeated addition compactly.
The symbol means "sum".
A Small Sum
This expression
means:
add x_1, x_2, and x_3
So if
then:
If , , and , what is ?
Compute it first, then check your number.
HintExpand first
Write the sum as .
SolutionExpansion
Expand the summation:
The first equality expands the notation. The second substitutes the given values. Keeping those steps separate prevents many mistakes.
Reading the Parts
In
read the parts like this:
i = 1 start with i equal to 1
n stop at n
x_i add the i-th value of x
The index is a counter. It moves from the starting value to the ending value.
The counter is temporary. After the sum is complete, has done its job.
How many terms are in this sum?
Compute it first, then check your number.
HintList the counter values
The counter starts at 1 and stops at 5.
SolutionCounter values
The counter takes the values:
so there are 5 terms. The upper limit is included because the sum runs from
1 through 5.
Product Notation
The symbol means repeated multiplication.
For example:
If
then:
Product notation appears less often at the beginning than sums, but it is useful in probability.
If , , and , what is ?
Compute it first, then check your number.
HintExpand first
Write the product as .
SolutionMultiplication
Product notation works like summation notation, but the repeated operation is multiplication instead of addition.
Why Sums Matter in ML
Sums appear everywhere:
- dot products
- averages
- losses over a dataset
- probabilities over possible outcomes
- gradients that collect many contributions
For example, an average loss often has this shape:
Read it as:
add the loss for each example
divide by the number of examples
Three examples have losses , , and .
What is the average loss?
Compute it first, then check your number.
HintUse the average pattern
First compute , then divide by 3.
SolutionAverage
The numerator is the total loss across the three examples. Dividing by 3
turns that total into an average.
Next, we turn these habits into a practical method: reading formulas aloud.