Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have values such as 2,4, 7, 10 , that is not sequential but are stored in array w. Can I use the summation $$ {\sum_{i = 1}^{n} w[i]} $$

or there is another way to write it down ?

share|cite|improve this question
That is OK. Perhaps mathematicians would often prefer $$\sum_{i=1}^n w_i$$ instead of the brackets. – GEdgar Aug 7 '12 at 11:57
As long as you define the notation $w[i]$, you should be fine. – J. M. Aug 7 '12 at 11:57
up vote 1 down vote accepted

in programming if we have array $w={1,2,3,4....}$,then we write $w[i]$,in mathematics you can simple write $w_i$

share|cite|improve this answer

This notation is not considered unusual in computer science. While I don't have an example for the sum over an array handy, the bracket notation occurs, e.g., in Bradley and Manna's "The Calculus of Computation".

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.