Summations / Sigma Notation

A few years ago I had a job interview with a company that ended up being pretty math focussed. I had been out of college for a while at the time, and on a day to day basis in doing software development I hadn’t had the opportunity to exercise a lot of the math that I had learned while in college. At some point in my life I had taken: Calc, Calc II, Linear Algebra, Discrete Math, and some others…but because I haven’t been using it, my math knowledge had kind of gone down the tubes.

So when I was asked a question about summations, I was kind of stumped. Now that I’ve started reading a algorithms text book, I’m running into summations all over again. In my search to re-learn them, I’ve found the following sites useful:

  • Paul’s Online Math Notes – Prof. Paul Dawkins, of Lamar University, has a great math site, and has a good, short, re-introduction to summations here.
  • PlanetMath’s Summation Page – PlanetMath has a good page on summations that goes a little more into detail on some summation properties and useful formulas
  • Summation Formulas – Good outline of summation formulas

What I haven’t been able to find is a page explaining how the solutions for common summations is found, such as the one for a simple summation:

\sum_{i=1}^{n} x_{i} = \dfrac{n (n + 1)} {2}

I’m not sure how that formula is reached, but I’m sure I’ll be trying to figure it out soon.

Update: Finally found a good description of the steps in solving the summation above, here’s my attempt at explaining it:

The simple summation above can be thought of as the series:

1+2+3+\cdots+n

It can also be thought of (in reverse) as:

n+(n-1)+(n-2)+\cdots+1

Now, imagine writing each of the terms of those two series above eachother, then adding the ones that are above and below eachother.  You would end up with something like:

(1+n)+(2+n-1)+(3+n-2)+\cdots+(n+1)

This can be simplified by doing the math inside the parens to:

(n+1)+(n+1)+(n+1)+\cdots+(n+1)

Which is simplified even further to:

n(n+1)

At this point, you’ve basically described adding the summation twice, or

2(\sum_{i=1}^{n} x_{i}) = n(n+1)

Divide each side by two, and you’ve got the solution we were looking for:

\sum_{i=1}^{n} x_{i} = \dfrac{n (n + 1)} {2}

I finally found this explanation at the Math Refresher weblog.  The article I linked to goes into a lot more detail, so I would suggest reading it if you want to know more.  I tried, but my eyes are getting tired from math at ths point in time, and his equation representations are a little hard to read.

Tags: ,

This entry was posted on Friday, May 1st, 2009 at 1:10 pm and is filed under Learning, Math. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “Summations / Sigma Notation”

scott March 23rd, 2010 at 12:55 am

awesome, used you algorithm in one of my java applications! thanks

Leave a Reply

Spam Protection by WP-SpamFree