Is there a math function, similar to sigma, that can run down? For example instead of $\sum\limits_{i=1}^{10}i$ ,
something that adds from 10 to 1 (like a backwards run)...
- 24,472
- 137
-
31Umm... addition is associative and commutative so what would the difference be? – Derek Elkins left SE Mar 26 '16 at 17:05
-
In Mathematica it would look like Sum[i,{i,10,1,-1}] (I think). – Steven Alexis Gregory Mar 27 '16 at 00:30
-
7Summation isn't a for-loop. – David Richerby Mar 27 '16 at 05:32
-
1@DerekElkinsleftSE Addition isn't necessarily commutative in a computation mathematical setting when dealing with finite decimal precision. – Zed1 Jan 30 '20 at 01:35
6 Answers
Sure:
$$\sum_{i=0}^{9}(10-i)=10+9+8+\ldots+1$$
- 211,718
- 17
- 136
- 287
-
6More generally, what OP wants is $\sum_{i=0}^n f(i)=\sum_{i=0}^n f(n-i)$. – YoTengoUnLCD Mar 26 '16 at 17:08
The problem with your example is that addition is commutative, so it is not really useful to have a distinction for a sum from $1$ to $10$ or from $10$ to $1$.
However, your question makes sense in a noncommutative setting. Suppose for instance you have 10 matrices $A_1$, ..., $A_{10}$. Since the product of matrices is not in general commutative, the product $A_1 \dotsm A_{10}$ is in general different from $A_{10} \dotsm A_1$. In this case, you may consider writing $\prod_{i=1}^{10}A_i$ in the first case and $\prod_{i=10}^{1}A_i$ in the second case, but this is probably not the most satisfying solution.
A better solution is to consider a totally ordered finite set $(I, \leqslant)$ and to write $\prod_{i \in I}A_i$. The first case of my example can now be obtained by considering the set $\{1, \ldots, 10\}$ ordered by $1 \leqslant 2 \dotsm \leqslant 10$ and the second one by considering the set $\{1, \ldots, 10\}$ ordered by $10 \leqslant 9 \dotsm \leqslant 1$.
- 40,163
-
9I think that rather than resorting to unusual orderings, most people would simply write $\prod_{i=1}^{10} A_{11-i}$ as suggested by other answers. – Nate Eldredge Mar 27 '16 at 04:32
-
1Or just consider a list / tuple of indices $(10,\ldots,1)$. I think the notation $\prod_{i\in (10,\ldots,1)}A_i$ should be clear enough, though it may not quite be standard. – leftaroundabout Mar 27 '16 at 13:34
Try $$ \sum_{i=1}^{10} (11 - i) $$ There is no reason to introduce another symbol when a simple subtraction can do the work.
- 18,694
-
2Doing subtraction like this isn't necessary the best notation. If $(11 - i)$ appears twenty times in your summand, it's probably best to think of an alternative. – Tanner Swett Mar 26 '16 at 18:49
-
2@TannerSwett Actually, in cases such as J.-E. Pin mentions where it actually makes a difference which order you do something in, This is exactly the sort of notation I would expect to see: $$\prod_{i=1}^{10}A_{11-i}$$. It is quite common. For example, the binomial theorem:$$(x + y)^m = \sum_{n=0}^m {m\choose n}x^ny^{\color{red}{m-n}}$$. – Paul Sinclair Mar 27 '16 at 02:05
-
But that's why I said "if it appears twenty times in your summand". In your two examples, the subtraction only appears once. If it appeared twenty times, it would start to get cumbersome. – Tanner Swett Apr 03 '16 at 05:36
If $a, b > 0$ then you can say
$$\sum_{k=a}^b a_k = \sum_{k=0}^b a_k - \sum_{k=0}^{a-1} a_k. $$
For example:
\begin{align} \sum_{k=3}^7 k &= \sum_{k=0}^7 k - \sum_{k=0}^2 k\\[0.3cm] &= (0+1+2+3+4+5+6+7) - (0+1+2)\\[0.3cm] &= 3 + 4 + 5 + 6 + 7\\[0.3cm] &= 25 \end{align}
And: \begin{align} \sum_{k=7}^3 k &= \sum_{k=0}^3 k - \sum_{k=0}^6 k\\[0.3cm] &= (0+1+2+3) - (0+1+2+3+4+5+6)\\[0.3cm] &= -(4 + 5 + 6)\\[0.3cm] &= -15 \end{align}
There is nothing wrong with writing $$ \sum_{i=10}^1 i $$
- 2,781
-
7In many cases, there's a convention that a sum where the upper limit is smaller is interpreted as 0. This is sometimes convenient because, for instance, one can write "The sum of the first $n$ positive integers is $\sum_{i=1}^n i$" and still be correct when $n=0$. So your suggestion could be misleading to someone who's used to this convention. – Nate Eldredge Mar 27 '16 at 04:35
-
3It depends. One often sees the convention that the empty sum is assumed when the upper limit is less than the lower one. – J. M. ain't a mathematician Mar 27 '16 at 04:38
You could use the following notation (here for matrix products):
\begin{align} &\prod_{i=1}^{10} A_i = A_1 A_2 \dotsm A_{10} \\ \\ &\prod_1^{i=10} A_i = A_{10} A_9 \dotsm A_1 \end{align}
The first means "for $i$ from 1 up to 10".
The second means "for $i$ from 10 down to 1".
- 111