What is the logic behind PEMDAS?

1.51K 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

There are two other ways of writing equations that don’t have order of operations. They are called prefix and postfix notation, the normal way is called infix notation. for example: “3x^2+2x+1” becomes “x 2 ^ 3 * 2 x * + 1 +” in postfix. you read left to right and when you encounter an operation you take the previous two things and do that operation. There operation and it’s operands are”replaced” with the result value. It looks strange since we’re so use to the normal infix notation. But the intended order is unambiguous. Though there are at least a couple of ways to write that order in postfix. “3 x 2 ^ * 2 x * + 1 +” is another that days the same thing.

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

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

Parenthesis or Brackets
The purpose is to group and create a higher order operation, so they need to go first since that’s their whole job.
If this were lower than it makes the problem harder because you have to add, multiply, etc over every term inside it.

Exponents
This is basically shorthand for self-multiplication, so it seems reasonable that we need to work it out earlier.
This could happen before parenthesis, but that get notibly harder to do. Could also happen after multiplication, but then if you divide first you’ll have to apply it to fractions which isn’t always fun.

Multiplication and Division
These happen together because they are similar but inverse operations; and because of certain properties of the operations they need to happen before addition and subtraction.

Addition and Subtraction
These can basically be done whenever, but because everything else was more important, they get shoved to the lowest priority.

In the end this priority is agreed upon because if you change the order, then you don’t always get the same result from the same equation everytime.

Anonymous 0 Comments

There are two other ways of writing equations that don’t have order of operations. They are called prefix and postfix notation, the normal way is called infix notation. for example: “3x^2+2x+1” becomes “x 2 ^ 3 * 2 x * + 1 +” in postfix. you read left to right and when you encounter an operation you take the previous two things and do that operation. There operation and it’s operands are”replaced” with the result value. It looks strange since we’re so use to the normal infix notation. But the intended order is unambiguous. Though there are at least a couple of ways to write that order in postfix. “3 x 2 ^ * 2 x * + 1 +” is another that days the same thing.

Anonymous 0 Comments

Everything in the way we represent mathematics is convention. There is no true natural and correct way to write the concept of adding two numbers together. We have agreed to use “+” to convey that, but we could just as easily have decided upon “×” instead. The symbols only have the meaning we assign to them – but consider how confusing it would be if half the world used “+” for addition and “×” for multiplication, and half used the reverse. So – we agree on a consensus for what the symbols mean and the order to apply them so that we can share and communicate mathematical concepts with less confusion.

Anonymous 0 Comments

It has to do with how we decided to write equations, as other people have stated. What I haven’t seen stated is why that order.

Basically, you can build operations out of “smaller” or “weaker” operations. Multiplication is just repeated addition, exponentiation is just repeated multiplication, tetration is just repeated exponentiation, pentration is just repeated tetration, and so on. Technically, addition is just repeated counting.

If you want to take a LONG time, you can reduce each operation down to addition or even counting, but that is a lot of effort. Instead, you start with the “highest order” operation and work your way down. If you don’t have any tetration or higher, you start with exponents, then multiplication, then addition.

Subtraction, division, exponential roots, and so on are inversions of operations, so they are done at the same time as their “parent” operation.

Anonymous 0 Comments

There are two other ways of writing equations that don’t have order of operations. They are called prefix and postfix notation, the normal way is called infix notation. for example: “3x^2+2x+1” becomes “x 2 ^ 3 * 2 x * + 1 +” in postfix. you read left to right and when you encounter an operation you take the previous two things and do that operation. There operation and it’s operands are”replaced” with the result value. It looks strange since we’re so use to the normal infix notation. But the intended order is unambiguous. Though there are at least a couple of ways to write that order in postfix. “3 x 2 ^ * 2 x * + 1 +” is another that days the same thing.

Anonymous 0 Comments

Parenthesis or Brackets
The purpose is to group and create a higher order operation, so they need to go first since that’s their whole job.
If this were lower than it makes the problem harder because you have to add, multiply, etc over every term inside it.

Exponents
This is basically shorthand for self-multiplication, so it seems reasonable that we need to work it out earlier.
This could happen before parenthesis, but that get notibly harder to do. Could also happen after multiplication, but then if you divide first you’ll have to apply it to fractions which isn’t always fun.

Multiplication and Division
These happen together because they are similar but inverse operations; and because of certain properties of the operations they need to happen before addition and subtraction.

Addition and Subtraction
These can basically be done whenever, but because everything else was more important, they get shoved to the lowest priority.

In the end this priority is agreed upon because if you change the order, then you don’t always get the same result from the same equation everytime.