# A Matter Of Convention

Subscribe!

My lastest posts can be found here:
Previous blog posts:

## A Matter of Convention - 2011/05/09

A friend of mine, James Grime, is becoming quite well known both for his mathematics presentations, as well as for his videos on YouTube. He's really quite good, but recently he complained that he was getting a lot of requests to settle a matter. He didn't really want to talk about it, but it's this:

What is the value of 6/2(2+1) ??

Some people were claiming it's 9, and others were claiming it's 1. And it all depends on whether you think of it as:

 ``` 6 ------- 2*(2+1) ``` or ``` 6 --- * (2+1) 2 ```

To put it into computing terms, it's the difference between:

 6/(2*(2+1)) and (6/2)*(2+1)

So which is it?

Without prior knowledge, and trying to work it out from scratch, for yourself, with no experience and no advice, there is nothing to choose between these. To reduce ambiguity, and to ensure there is no possibility of misunderstanding, we can bracket the expression fully, and then there is no doubt.

But over time, and performing many calculations, that becomes incredibly tedious. So tedious that a shortcut must be made, and the shortcut that has evolved is to say that

• B : brackets are evaluated first, then
• O : other stuff, like exponentiation and radicals, then
• M & D : multiplication and division, reading left to right, then
• A & S : addition and subtraction, reading left to right.

Using that convention we reduce the expression as follows:

• 6/2(2+1) : First, insert the implied multiplication, giving
• 6/2*(2+1) : Now evaluate the bracket, giving
• 6/2*3 : which contains division and multiplication, which we evaluate left to right, giving
• 3*3 : and then
• 9.

But why is this the convention?

The short answer is that there is no short answer. To some extent you simply need a convention, and this is as good as any other, except that when you deal with many expressions over many calculations, you find that this one is easier. In some sense it feels more natural. Multiplication "binds more closely," and addition comes after. More, there is really no such thing as division or subtraction, there is only multiplying by the inverse, and adding the negative.

In a sense it's like silver service. Food should be served from the left, and plates removed from the right. It is simpler that way, but it could be a different combination. It's a convention. If we all do it the same way, we all know what to expect, and life is made a little easier. There's no reason to drive on the left or the right, so long as we all do the same thing.

So when you have to evaluate 1+2*3 we simply have to remember that we do the multiplication first. We get 1+6, and not 3*3.

When you do it often enough it becomes natural and you stop worrying about it until you have to explain it to someone who doesn't know the convention.

Then suddenly it's hard again.

 6/2(2+1) clearly means 6/(2(2+1)) because writing it without the explicit multiplication clearly means that the 2 and the (2+1) belong as a single entity. Hence the answer is 1.
 6/2(2+1) clearly means (6/2)(2+1) because the multiplication, even though implicit, is still there, and so we should put it in and follow the BOMDAS convention. Hence the answer is 9.

There's still one interpretation missing, though.

 DON'T DO THIS! It's ambiguous, and should not be written like this because it leads to problems.

That sums it up, really.

 <<<< Prev <<<< Do You Nourish Or Tarnish : >>>> Next >>>> Decision Trees In Games ...