I want to write a summation to count the total number of number of books sold from a list of B different books by P different publishers. That is, there is one list of books and each publisher can sell any of the titles on that list. At any given time, each publisher will no doubt have sold a different number of any given book.

I wonder what would be the correct and understandable notation inside the summation? b = single book, p = single publisher.

$$\sum_{p \in P}\sum_{k=0}^B(p,b_k)$$


$$\sum_{p \in P}\sum_{k=0}^B(f(p,b_k))$$

  • $\begingroup$ Are you saying there is a fixed list of book titles and each publisher sells various numbers of titles from that fixed list? So you could have $b_1$, $b_2$ and $b_3$. Then, $p_1$ sells $1$, $2$, $3$ of each respectively and $p_2$ sells $3$, $0$, $5$. $p_1$ sells $1+2+3=6$ and $p_2$ sells $3+0+5=8$ and finally $6+8=14$. Then your last one would work if $f$ was the number of book $k$ sold by publisher $p$ and $B$ is the number of different books and you start with $k=1$. $\endgroup$ Feb 25, 2014 at 13:38
  • $\begingroup$ yes, you are right! Do you suggest using 1 or 2 summations? $\endgroup$
    – Thomas Lee
    Feb 25, 2014 at 13:52
  • $\begingroup$ Can you reword your question to explain what I've written in my comment, or would you like me to edit it for you? $\endgroup$ Feb 26, 2014 at 0:28
  • $\begingroup$ @GeoffPointer I agree with you that the last summation should be fine. However, rschwieb below said I should use only 1 summation, so I was asking which one should be better? I am not sure how can I explain that more, so feel free to edit it. $\endgroup$
    – Thomas Lee
    Feb 26, 2014 at 3:08
  • $\begingroup$ I've edited your question and I'm waiting for a response from the mods before you will see it. When I get one, hopefully I can post a proper answer to your question. It's probably best to do nothing more until they respond. I'm keeping an eye out for you. $\endgroup$ Feb 26, 2014 at 7:50

2 Answers 2


It seems a little weird to index each book sold if it only counts as $1$ book anyhow. If at all possible, it would be easier to read if written with one summation.

What sounds more plausible is to have a function $f:P\to \Bbb N$ which gives the number of books each publisher sold, and then talk about $\sum_{p\in P}f(p)$. But if you really insist, you could write $f(p)=\sum_{b\in B_p}1$ where $B_p\subset B$ is the subset of books that publisher $p$ sold, and get $\sum_{p\in P}\sum_{b\in B_p}1$.

Summing over books makes more sense if the feature you're asking about differs between books. Say, for example, if each book had a price, and you were summing up the prices of all books from all publishers. Then it would make sense to have some sort of price function $f:P\times B\to \$[0,\infty)$ and then compute $\sum_{p\in P}\sum_{b\in B} f(p,b)$.

  • $\begingroup$ Assume I need the price, which one makes more sense, (1) f(p,b) or just (2) b_p (b subscript p) ? For me the first is more clear but longer, the second is shorter but may be confusing. $\endgroup$
    – Thomas Lee
    Feb 27, 2014 at 13:21
  • $\begingroup$ @ThomasLee Congratulations! You have discovered a fundamental principle of using notation :) I prefer $f(p,b)$. If there were a better alternative for "p for publisher" it would be much nicer to use a $P$ for "price." $\endgroup$
    – rschwieb
    Feb 27, 2014 at 13:24
  • $\begingroup$ OK, would using f(p,b) differ than f(b,p)? $\endgroup$
    – Thomas Lee
    Feb 27, 2014 at 13:27
  • $\begingroup$ @ThomasLee The only difference is that the first function would be recognized as being $f:P\times B\to\ldots$ and the second would be $f:B\times P\to \ldots$. Both are fine: it's up to you, the author, to decide which is easiest for the reader. $\endgroup$
    – rschwieb
    Feb 27, 2014 at 13:38

The problem as now stated has two dimensions. Each publisher has a different set of sales figures of the same set of books. Here, $n(p_j,b_k)$ is the number of copies of title $b_k$ sold by publisher $p_j$.


I believe this would make more sense if these were different bookshops rather than publishers. Publishers would be me more likely to have different books on their lists according to ownership of publishing rights. Then, each publisher's sales figures could be summed across their own list and then these individual totals could be summed, but not using the same indexes, which would not be like a typical double sum.

  • $\begingroup$ Is there a need to use |P|, since P is a set and not size? $\endgroup$
    – Thomas Lee
    Feb 27, 2014 at 13:23
  • $\begingroup$ Not if you've defined P to be the number of publishers. If it's a set name then I suppose yes, $|P|$ is correct. I think it's possible you still haven't a clearly defined question. Is this just some idea you're trying out, did this come from a book or was it homework? Can you provide the full wording of the question if there is one? $\endgroup$ Feb 28, 2014 at 7:30
  • $\begingroup$ It was part of a question and both answers helped in solving it. Thanks! $\endgroup$
    – Thomas Lee
    Mar 3, 2014 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .