6
$\begingroup$

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)...

$\endgroup$
4
  • 30
    $\begingroup$ Umm... addition is associative and commutative so what would the difference be? $\endgroup$ Mar 26, 2016 at 17:05
  • $\begingroup$ In Mathematica it would look like Sum[i,{i,10,1,-1}] (I think). $\endgroup$ Mar 27, 2016 at 0:30
  • 7
    $\begingroup$ Summation isn't a for-loop. $\endgroup$ Mar 27, 2016 at 5:32
  • 1
    $\begingroup$ @DerekElkinsleftSE Addition isn't necessarily commutative in a computation mathematical setting when dealing with finite decimal precision. $\endgroup$
    – Zed1
    Jan 30, 2020 at 1:35

6 Answers 6

16
$\begingroup$

Sure:

$$\sum_{i=0}^{9}(10-i)=10+9+8+\ldots+1$$

$\endgroup$
1
  • 5
    $\begingroup$ More generally, what OP wants is $\sum_{i=0}^n f(i)=\sum_{i=0}^n f(n-i)$. $\endgroup$ Mar 26, 2016 at 17:08
11
$\begingroup$

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$.

$\endgroup$
2
  • 9
    $\begingroup$ I 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. $\endgroup$ Mar 27, 2016 at 4:32
  • 1
    $\begingroup$ Or 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. $\endgroup$ Mar 27, 2016 at 13:34
7
$\begingroup$

Try $$ \sum_{i=1}^{10} (11 - i) $$ There is no reason to introduce another symbol when a simple subtraction can do the work.

$\endgroup$
3
  • 2
    $\begingroup$ Doing 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. $\endgroup$ Mar 26, 2016 at 18:49
  • 2
    $\begingroup$ @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}}$$. $\endgroup$ Mar 27, 2016 at 2:05
  • $\begingroup$ 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. $\endgroup$ Apr 3, 2016 at 5:36
2
$\begingroup$

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}

$\endgroup$
2
$\begingroup$

There is nothing wrong with writing $$ \sum_{i=10}^1 i $$

$\endgroup$
2
  • 7
    $\begingroup$ In 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. $\endgroup$ Mar 27, 2016 at 4:35
  • 3
    $\begingroup$ It depends. One often sees the convention that the empty sum is assumed when the upper limit is less than the lower one. $\endgroup$ Mar 27, 2016 at 4:38
1
$\begingroup$

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".

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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