3

Something that's been bugging me for a fairly decent while is the order of operations - not so much using it, however, as to understanding where it comes from.

Typically we're introduced to it in the "PEMDAS" order in school (or "BEDMAS" or whatever acronym you were given):

  • First: Parenthetical/bracketed expressions
  • Second: Exponentiation (and its inverse, roots)
  • Third: Multiplication (and its inverse, division)
  • Fourth: Addition (and its inverse, subtraction)

...all typically done in a left-to-right order. But this seems arbitrary in a sense - why this particular ordering of steps, as opposed to any other particular ordering? Why should I calculate $4+5\times 6$ by finding $5\times 6$ first, as opposed to $4+5$ first?

Obviously, we adopted a standard in order to prevent ambiguity - but then, why this standard?

I could not find anything on the matter that felt really satisfying. For example, a lot of the previous discussion on MSE ultimately boiled down a few points:

  • It was agreed upon by mathematicians. (Okay, but why did they agree on this?)
  • It makes for more efficient notation once everyone is on the same page. (Yes, but would that not also hold for any ordering?)
  • Furthering the previous, it leads to more efficient notation for polynomials. (But as noted in the comments, Polish/reverse Polish notation also can resolve a lot of that.)
  • Our end goal is an order of operations that drops a lot of the parentheses, for readability's sake. (Understandable but then why is this convention the most efficient in that regard?)

However, recalling a video by the Taylor series on hyperoperations, I did notice a bit of a pattern (which I later found touched on in opening of the Wikipedia article on hyperoperations).

Consider characterizing each of our operations by what they basically are: exponentiation is repeated multiplication, which is repeated addition, which is basically repeated application of the successor function. So we can sort of call our operations this:

  • Operation $0$ - Successor function (repeated addition of $1$ in effect)
  • Operation $1$ - Addition (repeated succession - repetitions of operation $0$)
  • Operation $2$ - Multiplication (repeated addition - repetitions of operation $1$)
  • Operation $3$ - Exponentiation (repeated multiplication - repetitions of operation $2$)

The pattern becomes evident if we adopt this scheme:

  • Operation $n$ is just repeated applications of operation $n-1$
  • Equivalently, repeated application of operation $n$ yields operation $n+1$

So we ask - what is operation $4$? Of course, in this scheme, it's repeated exponentiation - that is to say, tetration! Rather fitting since "tetra-" is the prefix for $4$, but I digress.

Of course, then, this sequence of hyperoperations also uses pentation, hexation, and so on, as repeated applications of the previous.


All of this, then, begs a couple of questions:

  • Is this "sequence of operations" the reason we define the order of operations as we do - that is, we do exponentiation before multiplication, because the former is a repetition of the latter? Or is it just a "happy consequence" of whatever the reason is?

  • Where do these hyperoperations, e.g. tetration and pentation, fit into the scheme? If the previous is true, then this suggests that we would handle all bracketed expressions, then the highest $n$-ations, then the $(n-1)$-ations, and so on - that is, we would handle hexation, then pentation, then tetration, then exponentiation, and so on.

PrincessEev
  • 43,815
  • 3
    I don't know the history, but it's also worth noting that $(a\cdot b)+c$ is not "immediately reexpressible" but $a\cdot (b+c)$ is. That might be part of it - the idea may be that "$a\cdot b + c$" should be "maximally simple" in some sense. – Noah Schweber Feb 28 '19 at 01:25
  • 2
    You are asking a question about the history of mathematics, so you should really do some research into that history for yourself before asking for mathematical explanations for historical decisions. Here is a fun link to start from https://blogs.scientificamerican.com/roots-of-unity/an-italian-poem-about-solving-the-cubic-equation/ which demonstrates how before algebra a univariate polynomial was read out as a sum of monomials (implying a bit of BODMAS, particularly when you typeset $1 + x^2$ as $1 + xx$ as was done in days gone by to reduce the cost of typesetting). – Rob Arthan Feb 28 '19 at 01:54
  • 1
    Read A History of Mathematical Notations, by Florian Cajori for answers to most of your questions. – Somos Feb 28 '19 at 03:00
  • You're right that the successor operation is exactly the same operation as addition of 1. However, whether you define addition in terms of the successor operation or in terms of addition of 1 matters. If you say that by definition, $\forall x \in \mathbb{N}\forall y \in \mathbb{N}x + (y + 1) = (x + y) + 1$ and $x + 0 = x$, then the definition of addition is circular. What is 0 + 1? It's (0 + 0) + 1. Now how do you compute what (0 + 0) + 1 is? We see that 0 + 0 = 0 so (0 + 0) + 1 = 0 + 1 which in turn by definition is (0 + 0) + 1 so you never really defined addition. If you instead define – Timothy Sep 17 '19 at 00:09
  • addition in terms of the successor operation, that resolves the problem. It can then be shown that the successor operation is equivalent to addition of 1. – Timothy Sep 17 '19 at 00:13
  • Something important to note is that this is convention, not rule. When inputting ambiguous expressions, some calculators will disagree with each other because it's not actually a standard. Using brackets to avoid ambiguity is generally a better approach. As to why this convention or another... it's a fun exploration for sure. Just don't hold it to tightly as rule. – spex Mar 27 '22 at 23:33

1 Answers1

1

Eevee Trainer,

The order of operations was established by Leonhard Euler in the 18th century. The reasons behind it are related to what the Taylor series video explains. In order to understand it, first we must to realize the following:

Division can be transformed into multiplication:

$$ 3 / 5 = \frac{3}{1} * \frac{1}{5} $$

Subtraction can be transformed into addition: $$ 5 - 3 = (5) + (-3) $$ This is the reason why in Bemdas (multiplication/division) have the same precedence and (addition/subtraction) are also taken to have the same precedence.

With this in consideration Bemdas is actually BEMA:

Brackets -> Exponents -> Multiplication -> Addition.

The idea of this order is to translate the whole expression into an Addition.

In an expression with Exponents, Multiplication, and Addition, when we simplify all the Exponents first, the result of this simplification would become elements of the Multiplication binary operators in the expression, by solving then for the Multiplications, the results of these simplifications would become elements of the binary operators of Addition, leaving the whole expression converted into an Addition.

As you mention in your question:

Operation 0 Counting

Operation 1 Addition

Operation 2 Multiplication

Operation 3 Exponentiation

Operation 4 Tetration

Operation 5 Pentation

. . .

What Bemdas is doing is simplifying repeated operations from the Higher to the Lowest until all become an Addition.

So if you encounter an expression that involves Hyperoperations such as Tetration and Pentation, BEMDAS then becomes BPTEMDAS:

Brackets -> Pentation -> Tetration -> Exponentiation -> Multiplication -> Addition

And so on.

Note that the inverse operations for Exponentiation and its correlatives for hyperoperations can also be converted into its principal operation. A root can be transformed into an Exponentiation with a fractional exponent:

$$ \sqrt[3]{4} = 4^\frac{1}{3} $$

In the same way we can interpret Divisions as Multiplications, and Subtractions as Additions, we can interpret Roots as Exponentiations.

This also apply for Hyper operations and their Super Roots.

As to why (Multiplication/Division) and (Addition/Subtraction) are performed left-to-right, is related to the Associativity of Division and Subtraction.

Addition and Multiplication have the associative property, which means that simplifying an expression with multiples Multiplications or Additions, the order in which each binary operator is simplified does not alter the result:

Ex: $$ 5 + 4 + 3 + 2 $$

Left-to-Right: $$ {[(5 + 4) + 3] + 2} = 14 $$

Right-to-left: $$ {5 + [4 + (3 + 2)]} = 14 $$

Any other order: $$ {[5 + (4 + 3)] + 2} = 14 $$

The same for Multiplication.

But when it comes to Division and Subtraction the order in which we simplify an expression with these operators repeated, gives different results:

Ex:

$$ 5 - 4 - 3 - 2 $$

Left-to-Right: $$ {[(5 - 4) - 3] - 2} = -4 $$

Right-to-left: $$ {5 - [4 - (3 - 2)]} = 2 $$

Other Order: $$ {5 - [(4 - 3) - 2]} = 6 $$

And the same with Division.

So, mathematicians needed to choose an order to simplify expressions where these operators were repeated (this is what is called the associativity of the operator), so everyone could arrive to same answer.

Note that any direction could have been chosen, but mathematicians realized that if you choose a left-to-right associativity for Division and Subtraction, you would obtain the same result as if you convert them into Multiplications or Additions.

Ex: $$ 5 - 4 - 3 - 2 $$

If converted into an Addition:

$$ (5) + (-4) + (-3) + (-2) = -4 $$

As a Subtraction performed Left-to-Right:

$$ {[(5 - 4) - 3] - 2} = -4 $$

But as a Subtraction performed Right-to-Left: $$ {5 - [4 - (3 - 2)]} = 2 $$

So, it was more useful to assign a Left-to-Right associativity to Subtraction, since it arrives at the same result as if you transform the Subtraction into an Addition. To be able to transform a Subtraction into an Addition is useful because you could make use of the Commutative and Associative Properties of Addition.

The same idea applies for Division. Mathematicians assigned Division a Left-to-Right Associativity, because it leads to the same result as if you convert the division into a Multiplication, which also would allow you to use the Commutative and Associative Properties of Multiplication.

So, in BEMDAS, multiplication/division have the same precedence, and are performed from left-to-right, because it is the same as to convert all the division into multiplications, and the left-to-right simplification keeps the left associativity of Division which was explained above.

The same concept applies for Addition/Subtraction.

As to the 'B' in BEMDAS (brackets), comes before all other operators, because Brackets are used when we want to let know others of an operation that must be performed in a way that breaks with the common order (exceptions). So we first solve the 'exceptions' and then simplify using the above rules. Always with the goal to simplify the expression into an Addition.