Inspired by this post at Education Week, by David Ginsburg, and a fruitful discussion in the comments, I thought I’d make my own post about the order of operations. I feel the need to do this because of my own experiences teaching Algebra 1 and correcting the habits of Algebra 2, Precalculus, and Calculus students. The problem is often with their misunderstanding of the ubiquitous “PEMDAS” approach to order of operations (parentheses, exponentiation, multiplication, division, addition, subtraction).
The classic example given by those who have discussed this before is an expression like the following. This example shows the problem with instructing students to simply “add then subtract”:
You can easily see that blindly following PEMDAS would give you an answer of 3, not 5. In reality, addition and subtraction can be done in any order, provided that you think of the expression this way:
I have to constantly reinforce in my students the notion that the “-” goes with the 4. It owns it. That’s the right way to think of it, since subtraction (and division) are just shorthand for addition by the additive inverse (and multiplication by the multiplicative inverse). That’s right kids, subtraction is an illusion. The typical Real Analysis approach is to use the field axioms to define the properties of addition. Here they are:
- If and are in the field, so is (closure).
- There exists an element such that for all (identity)
- For each there is an element called such that (inverse)
There are almost identical ones for multiplication, and then one more axiom for distribution. Just listing the field axioms for addition helps us in the discussion of order of operations. As I said above, subtraction is never really mentioned. We only later define to mean .
Similarly, division is an illusion. Or more precisely, it is defined in terms of multiplication. We define to mean .
The other important thing to notice is that addition and multiplication are binary operations, meant to be functions of two variables. So the expression is defined to mean .
But the problems with PEMDAS don’t stop with multiplication and addition. There are many other issues with the order of operations as well. We lie to students when we just tell them they’ll encounter those limited operations in tidy situations. Here’s a perfectly legitimate expression with which PEMDAS would flounder:
The reason the expression is so difficult for PEMDAS is because PEMDAS doesn’t acknowledge the existence of other functions or grouping symbols, and ignores the possibility of nested exponentiation.
As another somewhat related example, I often have Calculus students who evaluate the following expression incorrectly (because they misuse their calculator):
And some high school students at every level still struggle with evaluating these expressions:
- Given , evaluate .
The wikipedia article on Order of Operations is very clear on all this, but I wanted to just highlight some of the common misconceptions. For more, feel free to check out that article. I’m in no way recommending that PEMDAS be removed from math curriculum, but that it be used with great care. And by the way, the expression above evaluates to 1.
Curious on your thoughts regarding quaternions & matrices where multiplication isn’t commutative and how it interplays with your discussion
Good addition to the discussion, brother! Yes, maybe I should have gone into that a bit. Quaternions, matrices, symmetry groups, the ring of integers mod n, the group of rationals with addition…all examples of things that aren’t fields. We’d have to generalize the discussion of order of operations to handle other algebraic structures. In every discussion of order of operations, though, I think you’d need to go all the way back to the axioms and definitions for the algebra.
For the specific examples I gave, I have in mind the reals. But everything I’ve said immediately generalizes to any other field, like the complex numbers.
There was a time, the “new math” era, when mathematics educators recommended that the additive inverse of y, namely -y, be written
to emphasize your point about the fact that x – y is x + ¯y. Such pedantry was abandoned for the same reason that we are careless in casual English speech about ambiguity. “The old men and women left the room.” could mean “The old (men and women) left the room.” or “The (old men) and women left the room.” We can clarify by context or by intonation. So we don’t want students to react mechanically to that other language, algebra, either but to think about the meaning of the mathematics that they write.
We do in fact have a list of conventions that covers all the cases you mention, even though they don’t exactly fit PEMDAS. By convention “x^y^z” means “x^(y^z)”. Treating [ ] and | | like parentheses makes them fit PEMDAS, as long as we realize that [(]) doesn’t make sense. “x+yz!” means “x + (y * (z!))”. Some parens mean function application: “(mod x)” and “f(x)”. But we still need conventions beyond all your examples.
For the same reason–context–we don’t devise a separate symbol for addition of functions, but write f + g to mean “the function which is defined pointwise as follows: (f+g)(x) is defined to evaluate to f(x) + g(x)”. Formally, that’s nonsense. Addition of functions is not the same thing as addition of numbers, so a new symbol, say ⊕, “should” be used.
We count on context to deal with these things. That’s good, unless we’re trying to write an “artificially intelligent” computer programming, which requires all context to be explicit.
So in my humble opinion, I think that the difference between ⊕ and + ought to be pointed out, and then dismissed with this encouraging, humanizing word: “But you’re not machines, so we won’t be so pedantic.”
You may have to define the word “pedantic.” 🙂
Thanks for the comments, dad! You make some excellent points.
One point I should have made clearer is that teachers shouldn’t assume these conventions are known by their students, teachers need to teach them explicitly. You mentioned that is shorthand for . That convention should be taught to students, not assumed to be obvious. Likewise, students should at some point be explicitly taught that really means . And the list could go on.
It’s interesting you mention the whole definition. I go over function operations in Algebra 2 and in Precalculus. In Algebra 2, I gloss over the fact that we’re ‘overloading’ the operators a bit. But in my Precalculus class, I always make a point of mentioning what you said.
Pingback: Looking back on 299 random walks | Random Walks