Order of operations: does it really matter?

George Orwell

George Orwell

While surfing the webpages of a variety of newspapers this morning, I stumbled on the following….

On the staged-reality-tv show Big Brother (UK version), they gave the housemates a mathematical task: they had to compute three different sums, then use the three resulting answers as the combination to a safe.

Implicit in the problem was that the three calculations should each result in a two-digit integer.

Video posted to the Channel 4 website shows the contestants muttering, struggling, and having an extremely difficult time of it. And with good reason!

Here are the three calculations they were given, as posted on the Channel 4 website:

Sum#1: 3 x 17 – 24 + 78 x 9 ÷ 5 – (13²) + (65 – 29) ÷ 4 + (4²) – (7 x 3) + (3²) + 99 – (7²) – 49

Sum#2: 1396 x 2 ÷ 4 — (12²) + 46 x 2 ÷ 40 x (5²) – (7 x 99) x 3 – (11²) x 5 – 219

Sum#3: 100 – 33 x 5 + 665 ÷ (5²) x 17 – 248 x 3 ÷ (4²) + 52 ÷ 7 + (273 – 217)

From the look of things on the on-line video, I’m guessing that the contestants had no writing implements, and had to do all of this in their head. That makes this challenging enough, I suppose.

Making matters worse is that none of the three sums is integer valued; they work out to 62/5, -4583/2, and 26189/70   28289/70. Rather, these are their values if one computes using the usual order of operations, where exponents have precedence over other operations, where multiplication and division take precedence over addition and subtraction, where calculations are performed left-to-right, and parentheses can be used to override this sequencing. (“PEMDAS” is a popular acronym with my students, standing for “Parentheses, Exponents, Multiplication and Division, Addition and Subtraction”, and sometimes recalled using the mnemonic “Please Excuse My Dear Aunt Sally”)

Apparently the folk who created this puzzle expected their contestants to work left-to-right, ignoring operator precedence, in the way that a $1 calculator might do. (Calculators that do pay heed to order of operation conventions are often marketed as “scientific” calculators.)

For example, the first sum should go as follows:

3 x 17 – 24 + 78 x 9 ÷ 5 – (13²) + (65 – 29) ÷ 4 + (4²) – (7 x 3) + (3²) + 99 – (7²) – 49

= 3 x 17 – 24 + 78 x 9 ÷ 5 – 169 + 36÷ 4 + 16 – 21 + 9 + 99 – 49 – 49

= 51 – 24 + 702/5 – 169 + 9 + 16 – 21 + 9 + 99 – 49 – 49

= 62/5

But I suspect the intended calculation was instead:

3×17 = 51, 51-24 = 27, 27+78 = 105, 105×9 = 945

945÷5=189, 189-(13²)=20, 20+(65-29)=56. 56÷4=14,

14+(4²)=30, 30-(7 x 3)=9, 9+(3²) + 99 – (7²) – 49 = 19

Similar (incorrect!) computations for sum #2 and sum #3 yield 31 and 75, respectively.

Clearly it is important that we agree on our order of operations.  But why do we prefer one over the other? Is this merely a cultural convention?  One stock answer to this is to point to the algebra of polynomials: our conventions regarding operator precedence play a central role in how we interpret linear equations (e.g. what is the slope of the line y=3+4x?), how we interpret polynomials (e.g. is 4 - 3x + 7x^2 a quadratic or a cubic polynomial?), and how we compute sums and products of polynomials.

But this morning, having not yet had my first cup of coffee, I wonder: is it possible to change the rules of arithmetic, so that all operations have the same precedence (unless exceptions are forced by parentheses), and to develop a meaningful algebra based on similar principles? It seems to me that the answer is yes, and I wonder exactly what is lost by doing so, other than familiarity.

12 Responses to “Order of operations: does it really matter?”

  1. Isabel Lugo Says:

    In attempting to do the arithmetic myself, I was surprised to see just how deeply I internalized order of operations; it was quite difficult to turn off the part of my brain that wanted to apply the usual precedence rules and just move left-to-right instead.

  2. samjshah Says:

    That’s horrifying!

    I know this isn’t what you mean when you’re trying to find an meaningful algebra, but the first thing I thought of was my old HP graphing calculator, which does things in reverse polish notation (http://en.wikipedia.org/wiki/Reverse_Polish_Notation). Which sort of does that left-to-right thing.

  3. Red Wolf Says:

    I think RPN as referenced in samjshah’s comment is what adding machines are fond of abusing.

    If it is possible to change precedence of operations, you’d have to turn just about everything we know about mathematics on its head. Would it be possible for algebra? Quite possibly. But, would it be possible for calculus? As a current student of university calculus, I’d have to say that it wouldn’t work out too well. At least, not initially.

    Feasibility, though, is another matter. Not only would we be re-learning 400 years worth of Calculus, but, really, how many years of Algebra? How many years of simple arithmetic? We would have to change how physics, chemistry, and all the other physical sciences operate. Not that anything real would change, just our understanding of these things.

    Just my (longish) thoughts.

  4. jd2718 Says:

    I think the objection is precedent.
    And the next objection is convenience, all those extra parentheses.

    Think about 3x^2 – 5x + 7

    We need two sets of parentheses, instead of none

    3(x^2) -(5x) + 7

    But we could… if we really wanted to…

  5. jd2718 Says:

    So I liked your correction. 3x – 5x + 7

    Do we lose our distributive property? Nope, we gain a new, right handed version
    a(b + c) = b + ca

    and a left handed version? Nope. We’d have to get used to writing (b+c)a

  6. TwoPi Says:

    (I had emailed jd2718 in response to his comment about 3x^2 – 5x + 7, noting that it can be represented without parentheses in this LR world:
    3x-5x+7 gets computed as if it were (3x-5)x+7.)

    Additive inverses become strange:
    3x-3x is equivalent to our (3x-3)x.
    (So here we really do need to insert parentheses: 3x – (3x).

    Or if we ban parentheses, then 3x does not have a polynomial additive inverse.

    I like the right handed distributive property! Very cool. And there is a comparable left handed one: (b+c)a would just be b+ca.

    However, both of these versions of the distributive property assume that “a” is a monomial. A more general distributive property would be:
    (x+y)(a+b) = x + yb^(-1)a + x + yb
    since working LR we have (in our usual notation):
    x, x+y, xb^(-1)a + yb^(-1)a, xb^(-1)a + yb^(-1)a +x,
    xb^(-1)a + yb^(-1)a +x+y, xb^(-1)ab + yb^(-1)ab +xb+yb

    Urgh. Not pleasant, but possible.

  7. TwoPi Says:

    Here is something significant that is lost: addition isn’t going to be commutative anymore: 3+5x is not equal to 5x+3.

  8. Ξ Says:

    Hmm….but 3+5x=5+3x, so the commutativity is just different.

  9. TwoPi Says:

    Ah, yes. Addition as a binary operation ought to still be commutative….

    What had bothered me was seeing x + yb^{-1}a+x+yb and knowing I couldn’t combine together the x terms, so I starting thinking about associativity and commutativity.

    I guess what this arithmetic is helping me appreciate is the role that order of operations plays in our own polynomial arithmetic. PEMDAS makes monomials act as single objects within an additive group. Going to a pure LR order of operations breaks that structure.

  10. polymath Says:

    IIRC, the conventions of notation and order of operations were not completely fixed yet in the middle ages, and in some manuscripts, two items placed side-by-side with no operation in between were meant to be added, not multiplied. A relic remaining from that time is the convention for mixed numbers–like 3 and 2/5–which really means to add 3 and 2/5, but which is taken in the order of operations as having precedence even over exponents!

  11. thoughtcounts A Says:

    Just a note – I’m hosting the next Carnival of Mathematics at thoughtcounts.net tomorrow. The carnival page lists no host, so I have a lower than usual number of submissions. If you have anything to submit, I’d love to hear from you.

  12. Ξ Says:

    Excellent! The submission form seems to be temporarily down and I can’t find an email address for you, but we’ll try to find a way to submit.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: