From time to time, a mathematical question of some sort will make its rounds on Facebook and other social media platforms. For instance, the one making the rounds most recently in my portion of the blogosphere was: \[5 + 5 + 5 – 5 + 5 + 5 – 5 + 5 \cdot 0 = ?\]
with the offered answers being 0, 15, 20, and 40. The most common answer (at this point) is 0, although the “correct” answer is 15. There is much weeping and rending of hair and moaning about the future state of humanity that apparently hinges on this particular question.
I have scare quotes around “correct” in the previous sentence for a reason. Technically, according to the conventions used in standard mathematical notation, the answer to the problem is 15. The Order of Operations, also known by the acronym PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction), says that we ought to first perform any multiplications first, and then proceed with the additions and subtractions. One weakness of PEMDAS as an acronym is that it doesn’t capture the fact that we also move from left to right; if we were to take PEMDAS entirely literally, we would perform the additions before the subtractions, hence:
- Multiplication: \(5 + 5 + 5 – 5 + 5 + 5 – 5 + (5 · 0) \\ = 5 + 5 + 5 – 5 + 5 + 5 – 5 + 0 \\ = 5 + 5 + 5 – 5 + 5 + 5 – 5\)
- Addition: \((5 + 5 + 5) – (5 + 5 + 5) – 5 = 15 – 15 – 5\)
- Subtraction: Since there’s no directionality and since subtraction is not associative, this could be either \((15 – 15) – 5 = 0 – 5 = -5\) or \(15 – (15 – 5) = 15 – 10 = 5\)
… but of course we don’t do that. We perform additions and subtractions at the same time, and move from left to right. Hence:
- Multiplication: \(5 + 5 + 5 – 5 + 5 + 5 – 5 + (5 · 0) \\ = 5 + 5 + 5 – 5 + 5 + 5 – 5 + 0 \\ = 5 + 5 + 5 – 5 + 5 + 5 – 5\)
- Addition and subtraction: \(5 + 5 + 5 – 5 + 5 + 5 – 5 \\ = 10 + 5 – 5 + 5 + 5 – 5 \\ = 15 – 5 + 5 + 5 – 5 \\ = 10 + 5 + 5 – 5 \\ = 15 + 5 – 5 = 20 – 5 \\ = 15\)
However, my reason for bringing this up at all is because the people who see this problem and conclude that the answer is 0 do not make me weep for the state of humanity, or even for the state of mathematical education, except perhaps from the standpoint that so many people seem to think this is a question about mathematical theory.
For one thing, this is a very unnatural question, especially out of context. I can visualize a context in which someone might want to do a task like this, more or less. I often do math like this, except for the last times-zero bit, when I’m trying add a series of numbers. For instance, if I had occasion to add prices such as $4.95, $3.95, $5.25, and $6.90, I might well think, “That’s $5 + $4 + $5 + $7, and then add – 5 – 5 + 25 – 10 cents, for $21.05.” However, in such a context, it would be obvious how each of the additions and subtractions interacted. And in such a context, why would I be multiplying anything by 0?
The last question there goes to the heart of the history of zero. For a great deal of human history, mathematics was a very pragmatic field. If I’m doing an inventory of my livestock, my need for 0 is fairly dubious. If I don’t have any sheep, the only real reason I’d have to comment on this fact is that I feel like I’m expected to have sheep and happen not to have any. If I have ten sheep and you buy ten sheep from me, then once I deliver them to you I don’t have “zero” sheep, I have no sheep.
In other words, the problem in question looks like a pragmatic real world problem, but I can’t easily imagine such a context in which I’d be multiplying only the last unit by 0. If I’m going to multiply by 0, why bother including it at all?
Of course, zero does have a role in mathematics. Once we get out of simple, pragmatic arithmetic and wander into the realm of algebra, we need to know how to multiply by 0, if only because we need to know how to multiply by any real number on demand, and 0 is a real number.
Furthermore, this is not in my mind a question about mathematical theory. It’s a question about mathematical convention. We happen to like to write expressions out in such a way that ambiguities arise, and so we have ways of resolving those ambiguities. We could instead write expressions in a non-ambiguous way, such as by always using parentheses except for scopes where associativity fully holds or by using so-called Polish notation, developed by Jan Łukasiewicz. Let’s look at each of those in turn.
Associativity: Operations are associative if it doesn’t matter which elements you combine first. Addition is associative: \(3 + 4 + 5 = 12\) whether you add the 3 and 4 first or the 4 and 5 first. Multiplication is associative: \(3 \cdot 4 \cdot 5 = 12 \cdot 5 = 3 \cdot 20 = 60\). Subtraction, division, and exponentiation are not associative. So if we wanted to rewrite the problem to make PEMDAS unnecessary (except the parentheses), we could do so: \[(5 + 5 + 5) – 5 + (5 + 5) – 5 + (5 \cdot 0)\]
We could go a step further. Theoretically, subtraction is a historical artifact that persists because educators feel that children have an easier time with positive numbers than with negatives. I’m not entirely convinced, but at any rate anyone who’s made it through high school mathematics should have been exposed not only to negative numbers but to the reality that subtraction can be represented by adding negatives. That is to say, \[5 – 3 = 5 + -3 = 2\]
which means that we could replace any subtraction signs with negative signs, and that would let use get rid of some of those pesky parentheses: \[5 + 5 + 5 + -5 + 5 + 5 + -5 + (5 \cdot 0)\]
I’m not suggesting that we do this; my point is that we could, and that it would make the problem less controversial. No mathematical theory has been laid by the wayside in the rewrite.
Polish notation: First, a bit of background; feel free to skip this paragraph. Jan Łukasiewicz’s notation was originally designed primarily for logic, and rather than traditional operators, he used capital letters. These weaknesses which got in the way of its being adopted for general use, which would have been an uphill climb in the first place. Even though our current notation system is only a few centuries old (the modern equal sign, for instance, was first used in 1557, while the x for multiplication, the oldest of our current signs, dates to 1631), it’s become very entrenched in that time. Furthermore, I do think there’s a cognitive bias towards having the operators and the equal sign between the various elements, based on how most Indo-European languages work; this, however, is a subject best approached in a separate item. Suffice to say, while Łukasiewicz’s notation is superior in terms of clarity from the perspective of pure mathematical theory, it’s probably too awkward to supplant traditional notation for the general populace (and hence, is unlikely to work its way solidly into the academic echelons either, since by the time mathematicians get there, they’ve been exposed to traditional ordering for two decades or so).
Anyway, Polish notation works thus: Each operator precedes the values. It’s used more in its reverse form, where the operator comes last; while mathematicians tend to shy away from it, computer programmers embrace it.
For instance, the expression \(+ 3\, 4\) is equal to 7, while \(\cdot 3\, 4\) is equal to 12. While \(3 + 4 \cdot 5\) is ambiguous without a convention like PEMDAS (do we add first and get 35, or do we multiply first and get 23?), the Polish notation equivalent is completely unambiguous: \(\cdot + 3\, 4\, 5\) says to add first (in English, “Multiply the sum of three and four with five”), while \(+ 3 \cdot 4\, 5\) says to multiply first (“Add three to the product of four and five”).
The problem in question in this post, written in Polish notation, is likewise unambiguous: \[+ – + + – + + 5\, 5\, 5\, 5\, 5\, 5\, 5 \cdot 5 0\]
To those of us who are used to standard notation, though, while this may be unambiguous, it is also extremely confusing.
Again, the point is not to recommend a notation different from what’s considered the standard convention, but rather to illustrate that people who conclude that \(5 + 5 + 5 – 5 + 5 + 5 – 5 + 5 \cdot 0 = 0\) are not failing at understanding mathematical theory, but rather at parsing conventional mathematical notation. Given the inherent unnaturalness of the expression \(5 + 5 + 5 – 5 + 5 + 5 – 5 + 5 \cdot 0\) in the first place, I don’t find this particularly troubling.