6
$\begingroup$

What is 9-5+2 ?

9-5+2 = 6; //With Calculator  9-5+2 = 2; //Using BODMAS 

If you evaluate from the right it give you "2" which follows the law: Brackets-Of-Division-Multiplication-Addition-Subtraction

Why don't calculators follow that rule?

Remember:

9-5*2 = -1

  • 0
    @ShreevatsaR The convention is not universal, that is shared by *all*, since the author did not have that convention in the very first place. Second, even if there do exist experts here, and "all" experts agree, the experts can quickly say "we're going to let x-y+z mean x-(y+z)" by fiat and establish a contrary convention also, and write x-y+z without parentheses. If, as Carl Mummert claims, we could no longer worry about these things by prioritizing associative operations, then maybe his explanation would work. But, that doesn't work. What is 4 +$6$MIN 8? โ€“ 2012-04-10

3 Answers 3

15

The rule as I learned it was: do brackets, then do both multiplication and division at the same time from left to right, then do both addition and subtraction at the same time from left to right. I did not learn a rule that would do all subtractions before all additions.

Note that most programming languages also evaluate addition and subtraction from left to right (this is called "left associative" evaluation).

In this case the "calculator" way matches 9 + (-5) + 2 which is how, in some sense, we ought to read expressions that involve subtraction. The motivation is that subtraction is not an associative operation, but addition is, and so if we just rewrite the subtractions as additions then we no longer have to worry about these things. If someone wants to write 9 - (5 + 2) then they will need to use parentheses. Unfortunately, we generally teach subtraction before negative numbers, which leads to this sort of confusion. The same situation exists with division and multiplicative inverses.

  • 0
    And how do you deal with the equivocation that has happened when you have a-b=a+(-b), since on the left - is binary, and on the right - is unary? Is "-" an operation of variable arity? But, "-" isn't this way, unless you have *another* convention which tells us what a-b-c means. And what if we want to consider a system with the same set, those two binary operations "-" and "+", and a third binary operation "x"? Or a fourth, a fifth, a sixth, a seventh, or an eighth? Saying that one has to use parentheses to say something like 9-(5+2), since -9+52, and 952+- both say it! โ€“ 2012-04-09
6

In BODMAS, division and multiplication are to be performed from left to right followed by addition and subtraction from left to right. The scientific calculator has done it correctly.

6

This illustrates an important misconception: BODMAS doesn't work in the way you think it does.

In training for mathematics education, we were told to avoid using BODMAS because it's confusing to most people... nonetheless teachers often use it at a low level of education because it's convenient. Other people may use PEMDAS, which may illustrate to you that the order of M and D is not strict (nor is the order of A and S).

A clear way to consider the situation is to split the expression into separate terms, by the location of $+$ and $-$:

$9$ is one term, $-5$ is another term, $+2$ is another term. We're effectively adding the terms. So we have $9 + (-5) + 2$. This avoids any notion of ambiguity.

A question that will generate more controversy is "What is the value of $1/2\pi$?" ;)

  • 0
    Ronald, please excuse my cynicism! If you would like to petition (for lack of a better word) for a reopening, meta would probably be the best place. โ€“ 2012-04-06