# Learning operator priorities by drawing trees

As far as I know (and here I am refering to my own math education), operator priorities of $$+$$, $$-$$, $$\cdot$$, $$\div$$, power and parenthesis are taught via some simple phrases like

• "pointy" operators ($$\cdot,\div$$) before "dashy" operators ($$+,-$$),
• powers before both,
• parentheses before everything.

But for many students a formula like $$1 + 3 \cdot 4 \div 7 - 2^2$$ is nothing more than a confusing sequence of symbols. I (as a mathematician and partially computer scientist) think more in terms of trees when seeing something like this. My brain automatically inserts the parenthesis and I have a feeling for how to type this into my calculator to get the result that is implied by these symbols.

However, we all know that students often struggle with applying these rules. My conjecture here is (and please correct me) that they see the above formula as a linear object instead if a tree like structure:

Questions:

1. What do you think about this approach of teaching operator priorities, or the structure of a formula in general? Could it be helpful when student are taught to draw these trees like they were initially taught schemes for addition, multiplication, etc.?
2. Is such an approach already in use? If not, do you think it would be useful? If yes, does it help?
3. At which stage of learning math do you think it is important to start teaching this? Maybe elementary school is too early, maybe university is too late.
• Observing a correct statement of the order-of-operations (in, say, 3 ordered phases) has the advantage of also cluing learners into relations like (1) shortcuts for operations and powers, (2) what operations distribute over others, (3) being able to reverse the order when solving equations, etc., etc. my blog Commented Jul 5, 2017 at 16:49
• @DanielR.Collins I think for reversing compounds of operations it is necessary to know which you have to reverse first. Something absolutely obvious from the tree representation - the operation of the root. But also something students struggle with usually. Commented Jul 5, 2017 at 17:19
• If students are familiar with diagramming sentences in English, then it could be pedagogically useful for them to be introduced to "diagramming expressions". From my perspective as a university teacher, I would love for this to be taught in high school or earlier. It is distressingly common to observe students in lower-level courses for non-majors exhibit a basic misunderstanding of order of operations. Even more students have a tendency to use $=$ as the mathematical equivalent of a comma rather than as the verb in a sentence which asserts equality. Students need to know the grammar of math. Commented Jul 7, 2017 at 11:19
• @JohnColeman: I was going to mention that, but the fact is that English sentence diagramming is not presented in schools any more. Even most young English teachers don't know what it is at this point, and it's not even mentioned in the Common Core. npr.org/sections/ed/2014/08/22/341898975/… Commented Jul 7, 2017 at 18:22
• A trivial point, but isn't the standard name "precedence"? As in "operator precedence"? In U.S. English I think it is. But maybe kids would understand "priorities" better, anyway, ... Commented Jul 15, 2017 at 23:49

It is nice, but I suspect nice for an adult or at least a much older child who is moroe used to these graphical structures. I'm sorry but sometimes ust having extra ways of showing something is not helpful, is actually the opposite. And this would be my take on the operator priority since you are making kids learn complicated logic trees at the same time they learn the basic syntax. I think instead having them draw in the parentheses is more intuitive and readable.

The answer might be different for an adult looking at the order of operations in Excel, which annoyingly is different from standard order (for no good reason just MSFT messed up and now there is too much code written to change back).

• I will point out that this critique is almost identical to that often directed at diagramming sentences, e.g., "... they point out that it involves mastering not one skill but two: the rules of grammar and syntax and the making of diagrams, which is something like baking a loaf of bread and cutting it into fancy shapes before you can make a sandwich." opinionator.blogs.nytimes.com/2012/06/18/taming-sentences Commented Jul 8, 2017 at 21:39

It is rather interesting to note how parallel this suggestion runs to the idea of diagramming sentences in English grammar classes at around the same age, historically. I say "historically" because (as noted in comments) my understanding is that diagramming sentences is very much in disrepute, no longer taught, and mostly unknown by current education-school graduates. More generally, even the very idea of dedicated grammar lessons has been officially frowned upon for the last few decades. It is claimed that a multitude of studies show no relation between diagramming sentences/grammar lessons and educational outcomes. Some articles with summaries and links to such meta-studies:

Among the most common criticisms are (very similar to the answer here by user guest): "... On a less emotional level, they point out that it involves mastering not one skill but two: the rules of grammar and syntax and the making of diagrams, which is something like baking a loaf of bread and cutting it into fancy shapes before you can make a sandwich." (This by sentence-diagramming enthusiast Kitty Burns Florey).

Generally speaking, I think this is a loss, and personally I refer to the twinned removal of grammar/algebra skills around the junior-high level as part of the "War on Structure". However, before pushing for this particular CS search-tree-like method, you should at least be aware that such methods are explicitly frowned upon in many educational circles, lack any analog that students are familiar with from grammar lessons, and supposedly have hundreds of studies showing that they do not benefit students.

Personally I do drill students on the order-of-operations by asking them to write out in a linear list the order of the operations as they will be performed. To my mind, this does address somewhat more directly the fact that operations have an order that will occur one at a time. For example, it's how the quiz on my drill site Automatic Algebra is structured.

• Actual linguists haven't given up on structure, but they have no use for the old-fashioned "sentence diagramming" that you probably remember from school (Reed-Kellogg diagrams). They prefer straightforward trees! Quote from linked Language Log article: The second remarkable thing about Reed and Kellogg diagrams is that they are not in fact part of the tool-kit of any academic linguists. They belong to the world of school-teaching.
– user5114
Commented Jul 9, 2017 at 3:41
• @WumpusQ.Wumbley: Thanks that, it's an interesting article. The one thing I wish the author could edit is the math analog to a diagram being "mathematicians have equations" (I'd say: equations are to sentences as diagrams are to graphs). The interesting this is the example tree having the linking verb "are [is]" at the root, which is identical to the equals sign in an equation, surely the most important symbol in math. I like it; I wish this were actually taught in schools. Commented Jul 9, 2017 at 6:07
• Apparently the author assisted in the effort to bring back grammar in the U.K. (my 2nd link above points out this is resurging in the U.K. but still not the U.S.) Commented Jul 9, 2017 at 6:08
• As a budding mathematician with a taste for the fascinations of linguistic complexities, I would have loved to have been offered examples of complex structural sentence analysis when I was at school. I ended up writing my own parsing system based on an article in Scientific American on embryonic attempts to get a machine to write coherent prose. Teachers and other authority figures, e.g. sperm donor and embryo-carrier, just laughed at it. Commented Jul 1, 2022 at 15:12

I wonder if you can make an inroad by pointing out that every calculator they use employs some order of operations (e.g., BODMAS), and actually builds the tree and then evaluates the expression following its structure. So you could mix the math with the "how-does-a-calculator-work" discussion. Maybe that would be more impactful than just introducing trees as a convenient mental technique—tree expressions are actually used by their phone calculators.

Image from Order of Operations Calculator.

• Thought about something similar. Maybe they even need this to let the calculator compute what they actually want it to compute. Many students get wrong results and blame their calculator. This might help understanding how to use this machine. Commented Jul 9, 2017 at 12:14
• Algebraic calculators honor the order of operations - HP made a big deal of it 50 years ago, or was it TI? - but most simple calculators do not. Commented Jul 4, 2022 at 6:42

There is an iPad app that does this: DragginMath. Does what you envision. See the tree being built step by step. See the hierarchy explicitly. Then drag tree nodes around to invoke the various rules of algebra. I had this idea about 30 years ago, finally did something about it.

Another answer mentions GraspableMath, which is significantly different from DragginMath. DragginMath solves equations, too. It does this using the standard algebraic properties only. GraspableMath takes a lot of liberties with mathematical language to try to get things to happen somehow, where somehow is often hard to explain in terms of actual algebra.

Acutally, I learned order of operations this way in school; even nowadays you find 'operator-diagrams' in school books, starting in primary school (only addition, multiplication; use of brackets).

Next to the iPad app 'DragginMath' mentioned in the answers, there is an app online named GraspableMath. I use it not only to teach order of operation, but also equation solving. You can 'scrub' the parameters and look what happens to the result.