What is the logic behind PEMDAS?

1.17K views

I know some places use BIDMAS as well. Overall though, to someone who knows little about mathematics, why is this the correct order? What’s the exact logic behind it

In: 6

54 Answers

Anonymous 0 Comments

It is a convention that, if followed, mathematical expressions can be written in a certain way without ambiguity. There could well be other conventions but this would require the expressions to be written differently. It just happens that for most mathematics, the agreed upon convention is PEMDAS or BODMAS (just different names for the same thing).

We follow conventions all the time especially in languages. They’re mostly the product of some logic and some tradition and, as long as they’re agreed upon, they make life simpler.

One could try to speak like Yoda, “the egg, red is” and more or less be comprehensible but, for most, the conventional “the egg is red” sounds more natural and more easily comprehended.

Mathematics is somewhat more precise and unforgiving because expressions can get fairly long. So without a convention, they add to errors and ambiguities.

So if someone writes 3 * x + 5, the convention is that multiply x by three then add 5. If we reversed the priority 3 * x + 5 becomes add five to x then multiply the sum by 3. Both conventions are workable if used consistently but if the order is interchangeable arbitrarily, math would be more confusing.

Anonymous 0 Comments

It is not the correct order, it is the agreed upon order.

If we did not have an agreed upon order, math problems would all have to have some sort of key with them, kind of like a map. In other words you take a test, and on the test you have the order of operations to use for all your problems.

It’s kind of like the qwerty keyboard we type on. If you had a different layout on every keyboard you used, it would be really difficult to write. Similar for PEMDAS just on a smaller scale.

Anonymous 0 Comments

Without having an order of operations, you would need to have parentheses everywhere, because all the basic arithmetic operations are only defined on two things at a time. Further, two different orders of doing the operations usually yields different results, so it does matter.

But why the particular order that we picked? The glib answer is “because people agreed.” A more insightful answer is that the more complicated operations happen sooner. Multiplication is repeated addition, so more complicated than addition, and happens sooner. Exponentiation is repeated multiplication, so more complicated than multiplication, and happens sooner. This makes the order of operations consistent, and does a good job of eliminating the need for many uses of parentheses.

Anonymous 0 Comments

We all just agreed on it, there’s also no reason why we spell things the way we do, we could use an entirely different alphabet but we decided this is how we use and how we spell things, doing things differently will cause problems for those who aren’t aware you’re doing things differently.

But there is a certain logic behind how it’s ordered, you notice how it follows a certain rule, parenthesis are obviously first since they only exist to override the rest of the rules.

As for the others, exponentials are just a bunch of multiplications together, multiplication is just a bunch of additions together, division and subtraction are just the opposite of multiplication and addition respectively, you could argue that you aren’t “subtracting 2” but instead just “adding -2”.

Anonymous 0 Comments

It is not the correct order, it is the agreed upon order.

If we did not have an agreed upon order, math problems would all have to have some sort of key with them, kind of like a map. In other words you take a test, and on the test you have the order of operations to use for all your problems.

It’s kind of like the qwerty keyboard we type on. If you had a different layout on every keyboard you used, it would be really difficult to write. Similar for PEMDAS just on a smaller scale.

Anonymous 0 Comments

BIDMAS and PEMDAS is the same thing, one just use Brackets, Indices the other Parentheses, Exponents for the exact same thing.

It is a question of what words are used to describe something, English is not identical in all countries. Just compare it to if the sidewalk, pavement, or footpath is correct, they are different names for the same thing in different countries

If we just use Parentheses, Exponents, Multiplication/Division, Addition/Subtraction and look at the logic.

Having parentheses first makes sense because they is the symbol we use when the normal order of operation is incorrect. How would you represent (7+3) /10 if the division had higher priority? If it had () would be meaningless.

The next part is the exponent. It is simply more common that 2 * 3^5 is the same as 2*(3^5) compared to (2*3)^5 like if you what to write down the prime factors of a number this case it is 486

for the same reason, we give multiplication and division the same priority as addition and subtraction. It is not uncommon that you have two parts with some operation and add them there then multiple

If you purchase times like a carrot that cost 5 and 2 apples that cost 3 each the expression is 5 + 2*3 which would be 5 + (2*3) if addition is higher than multiplication You would need more parenthesis if you did it the other way around.

There is not really a correct order except for parentheses that need to be the highest for them to work. For the rest, the important part is the one that writes the expression agrees with the one that read it. There is one common standard so it is not a good reason to avoid it

You need an order of operation if the operators are between the operands (what is operating on like numbers), this is called infix notation. You can have postfix notation, commonly known as https://en.wikipedia.org/wiki/Reverse_Polish_notation where the operators are after the operations.

3 + 4 become 3 4 +

You put the number in a stack and use them on the top values in the order they come

2*(3^5) will be 2 3 5 ^ *

(2*3)^5 will be 2 3 * 5 ^

It might not be as simple to read but it has been used on some calculators especially early ones because it is simpler to implement and the number of buttons you need to press can be reduced. Handling parenthesis can be quite hard if the calculator can just show one number at a time. It was really popular with HP calculators that still support that type of operation

Anonymous 0 Comments

While it is absolutely true that the most important thing is that it’s a convention that we all agree on, there is some logic behind it.

Expressions in parentheses are evaluated first, because that’s why they were introduced in the first place: to let you change the priority of operations.

Multiplication and division have the same priority, because they are basically the same operation: division is just multiplication by the reciprocal of the divisor. The same is true for addition and substraction. (Before someone comes here to nitpick this, yes, I know, it depends on the precise semantics of the operations and the underlying field, but I think we all know what OP is talking about.)

Multiplication has a higher priority than addition, because it makes intuitive sense. This is kinda subjective, I suspect this perception is mostly formed by the fact that we are used to it being this way (sort of circular, it comes back to this being a convention that we are taught at a young age). I think of it this way: you are multiplying a single term (you’re just making more of it, you’re not adding anything new), so it makes sense to perform that operation before adding new stuff – the terms are sort of glued by multiplication. This doesn’t make a whole lot of sense when you’re just thinking of numbers, but it starts to be useful when you start giving the numbers names (like variables for example).

It also makes sense when you think of how we use units. When you write 20m, what you’re really saying is that you’re multiplying *a meter* (which is some distance) by twenty. It makes sense to do that before you start adding other stuff in. If the priorities were reversed, then something like “20m + 2cm” would mean “20 * cm * (2 + m)” in our system, which doesn’t make much sense (also it’s obviously not what we wanted, suddenly we have 20cm instead of 20m). To get the same thing, you’d have to write “(20m) + (2cm)” and that’s much less elegant.

That’s really what it comes down to: how elegant and readable the expression ends up being. Other operations also have priorities that are chosen based on this principle. For example, in programming languages, you usually have an operator called “function call”, which looks like two parentheses after a function name (foo(), for example), and it has a higher priority than addition for example. This is because when you write something like “2 + foo()”, you probably don’t want to add 2 to the function foo and then call the result, you want to add 2 to the result of the function foo (sometimes you want the opposite, but it’s less common, so it earns the more cumbersome notation).

Anonymous 0 Comments

We all just agreed on it, there’s also no reason why we spell things the way we do, we could use an entirely different alphabet but we decided this is how we use and how we spell things, doing things differently will cause problems for those who aren’t aware you’re doing things differently.

But there is a certain logic behind how it’s ordered, you notice how it follows a certain rule, parenthesis are obviously first since they only exist to override the rest of the rules.

As for the others, exponentials are just a bunch of multiplications together, multiplication is just a bunch of additions together, division and subtraction are just the opposite of multiplication and addition respectively, you could argue that you aren’t “subtracting 2” but instead just “adding -2”.

Anonymous 0 Comments

We all just agreed on it, there’s also no reason why we spell things the way we do, we could use an entirely different alphabet but we decided this is how we use and how we spell things, doing things differently will cause problems for those who aren’t aware you’re doing things differently.

But there is a certain logic behind how it’s ordered, you notice how it follows a certain rule, parenthesis are obviously first since they only exist to override the rest of the rules.

As for the others, exponentials are just a bunch of multiplications together, multiplication is just a bunch of additions together, division and subtraction are just the opposite of multiplication and addition respectively, you could argue that you aren’t “subtracting 2” but instead just “adding -2”.

Anonymous 0 Comments

BIDMAS and PEMDAS is the same thing, one just use Brackets, Indices the other Parentheses, Exponents for the exact same thing.

It is a question of what words are used to describe something, English is not identical in all countries. Just compare it to if the sidewalk, pavement, or footpath is correct, they are different names for the same thing in different countries

If we just use Parentheses, Exponents, Multiplication/Division, Addition/Subtraction and look at the logic.

Having parentheses first makes sense because they is the symbol we use when the normal order of operation is incorrect. How would you represent (7+3) /10 if the division had higher priority? If it had () would be meaningless.

The next part is the exponent. It is simply more common that 2 * 3^5 is the same as 2*(3^5) compared to (2*3)^5 like if you what to write down the prime factors of a number this case it is 486

for the same reason, we give multiplication and division the same priority as addition and subtraction. It is not uncommon that you have two parts with some operation and add them there then multiple

If you purchase times like a carrot that cost 5 and 2 apples that cost 3 each the expression is 5 + 2*3 which would be 5 + (2*3) if addition is higher than multiplication You would need more parenthesis if you did it the other way around.

There is not really a correct order except for parentheses that need to be the highest for them to work. For the rest, the important part is the one that writes the expression agrees with the one that read it. There is one common standard so it is not a good reason to avoid it

You need an order of operation if the operators are between the operands (what is operating on like numbers), this is called infix notation. You can have postfix notation, commonly known as https://en.wikipedia.org/wiki/Reverse_Polish_notation where the operators are after the operations.

3 + 4 become 3 4 +

You put the number in a stack and use them on the top values in the order they come

2*(3^5) will be 2 3 5 ^ *

(2*3)^5 will be 2 3 * 5 ^

It might not be as simple to read but it has been used on some calculators especially early ones because it is simpler to implement and the number of buttons you need to press can be reduced. Handling parenthesis can be quite hard if the calculator can just show one number at a time. It was really popular with HP calculators that still support that type of operation