[Math] the summation operator used for in Mathematics

notationsequences-and-series

I am quite experienced in programming and I know that summation in math is similar to a for loop: It runs the specified operations for $x$ amount of times. What I want to know is how this is useful in mathematics. I don't see what effect recursively running operations in math could yield that could be any different from doing so manually. Why does the variable that is incremented by one each loop have to do so? I'm currently in 11th grade and my class has not yet touched upon this topic, but I have seen it across this site a plethora of times and would like to know more about it.

Best Answer

There are many formulas in which an operation is repeated over and over. Addition and multiplication are so common that we have corresponding summation and product notations. These are convenient ways to give compact expressions for various formulae.

For example: Instead of writing $1^2+2^2+3^2+\cdots+n^2$ we can write $\sum\limits_{i=1}^n i^2$

The first place most students see summation notation used in any serious manner is in calculus when Riemann sums are defined. A Riemann sum approximates areas under curves using rectangles.

For example: If we want to approximate the area under $y=x^2$ where $0 \leq x \leq 3$ using 6 rectangles. Then we break the interval $[0,3]$ into 6 pieces: $[0,1/2]$, $[1/2,1]$, $\dots$, $[5/2,3]$. If we use $y=0^2$ as the height of the first rectangle, $y=(1/2)^2$ as the height of the second, and so forth, then noting that the width of each of these rectangles is $1/2$ we have that the area under the parabola is approximately $\frac{1}{2}(0)^2+\frac{1}{2}(1/2)^2+\frac{1}{2}(1)^2+\frac{1}{2}(3/2)^2+\frac{1}{2}(2)^2+\frac{1}{2}(5/2)^2$. Summation notation lets us write this much more compactly as $\sum\limits_{i=0}^5 \frac{1}{2}\cdot \left(\frac{i}{2}\right)^2$. Now what if we wished to approximate with $n$ rectangles? We have $\sum\limits_{i=0}^{n-1} \frac{3}{n}\cdot \left(\frac{3i}{n}\right)^2$ (nice and compact).

Similarly mathematicians use product notation to express repeated multiplications.

For example: $\prod\limits_{i=1}^4 i^2=1^2\cdot2^2\cdot3^2\cdot4^2$.

Or you may be familiar with the factorial function: $n! = \prod\limits_{i=1}^n i = 1\cdot 2\cdot 3 \cdots n$

By the way, the analogy with for loops is a good one. However, for loops allow you to repeat a plethora of operations. Summation and product notations are far more specialized (summations and products can both be computed using for loops). Also, not all for loops increment the index by 1 each time. Most programming languages allow for more complicated increments. In the same way summations and products are sometimes done over sets (other then ${1,2,\dots,n}$).

For example: If $S = \{1,2,4,8\}$, then $\sum\limits_{x \in S} \frac{1}{x} = \frac{1}{1} + \frac{1}{2} + \frac{1}{4} + \frac{1}{8}$.

In calculus (often second semester calculus) one learns about series where you are essentially summing over infinite sets [summing over infinite sets gets a little tricky -- there are issues of convergence and problems when shuffling the order of the summation around].

Related Question