# 2 + 4 x 3 = ?

There are innumerable Facebook posts posing the above question (or similar). It usually results in more or less acrimonious discussions. There are two main camps: those who believe that the answer is fourteen (14), and those who believe that the answer is eighteen (16).

So, which camp is correct? Well, the answer is that the question is not complete. It doesn’t specify the way that the answer should be evaluated. If you do it one way, you get one answer, and if you do it another way, you get a different answer.

How can this be? The answer lies in how we break down the question in order to evaluate it. A mathematician or a computer programmer would perhaps ask how we intend to ‘parse’ the question.

When we learn arithmetic, we learn how to add and subtract, and how multiply and divide. For instance, we learn that:

7 + 6 = 13
4 x 8 = 32

Simple! A crucial point here is that it doesn’t appear to matter which way round the numbers appear.

6 + 7 = 13
4 x 8 = 32

If we want to add three numbers together or multiple three numbers, it doesn’t matter what order we perform the operation:

6 + 7 + 12 = 12 + 6 + 7 = 25
4 x 8 x 3 = 3 x 8 x 4 = 96

It also doesn’t matter if we work from left to right, or from right to left. If we start from the right we have the number 12, we add the number 7, giving the number 19, then finally we add the number 6, giving the final result. So far, so simple.

But if we had an arithmetic problem which involves subtraction or division, then things start to become complex. The order of symbols used and the direction in which the problem is processed does matter.

8 - 3 = 5          (Left to right)
8 - 3 = -5         (Right to left)
2 / 4 = 0.5        (Left to right)
2 / 4 = 2          (Right to left)

OK, a convention is called for. If I pose you an arithmetic question, I don’t want to have to tell you how I want it to be processed. So the convention, at least in languages which are written from left to right, is that arithmetic problems are also processed in the direction that the language is written. So from now on, I will assume that any arithmetic problem is processed from left to right.

I’d like to add that, though I’ve chosen the convention that the expression is processed from left to right, the issue can be resolved in other ways. For instance, I could suggest a convention that a bare number is always associated with the operator that precedes it. In other words:

8 - 3 = 8 + (-3) = 5 (LTR or RTL)

But this could cause other issues for more complex expressions.

If we mix addition and subtraction with multiplication and division, we get something like our original problem:

2 + 4 x 3 = ?

We can, some people may be surprised to learn, get more than one answer to this problem, depending on how we process the expression.

2 + 4 x 3 = 6 x 3 = 18 (proceeding strictly from left to right)
2 + 4 x 3 = 2 + 12 = 14 (using the BODMAS convention, see below)

Many people would argue that the first answer is correct. Why jump to the multiplication first in the second example? The answer is that it is simply a convention among mathematicians and computer scientists and programmers use. It’s the answer that you would get if you put those numbers and symbols into most calculators.

Some calculators (eg Microsoft’s Windows Calculator) can give either answer depending on what mode the calculator is set up to use. There’s a simple explanation in the linked article on why that is. Maybe too simple.

The convention that mathematicians and computer scientists use is not a law of arithmetic or mathematics, as some people believe. So, why is a convention necessary? The real answer is so that you can pass a random piece of mathematics to someone else and they will understand how to process it unambiguously, if there is a commonly used convention for processing such expressions.

In particular, in algebra and computer science, using the common BODMAS conventions actually reduces the complexity of the strings of symbols necessary to express a mathematical idea. Einstein’s famous equation would be more complex without the convention – there would need to be a multiplication symbol between the ‘m’ and the ‘c’, if the equation was to be understood strictly left to right.

E = mc2 is more explicitly E = m*(c2)

The convention that I’m using here is that if two non-operator symbols are adjacent to one another, there is an implied multiplication operator between them. e.g.

2ab is equivalent to 2 x a x b
2a + b is equivalent to 2 x a + b

This convention is, strictly speaking, not part of BODMAS.

Notice the brackets around the exponentiation. Brackets are the ‘B’ of BODMAS, and are always evaluated first. The ‘O’ stands for ‘orders’ or powers, so an expression with multiplication and powers is interpreted as follows:

3 * 24 = 3 * 16 = 48

It is not interpreted as follows:

3 * 24 = 64 = 1,296 (Wrong!)

The D and M of BODMAS stand for division and multiplication. If there are both multiplications and divisions in an expression, division is not always done first. The multiplications and divisions are processed, by convention, from left to right, and the same holds for addition and subtraction, but multiplications/divisions are done before additions/subtractions. I’ve seen explanations of BODMAS that say that divisions should precede multiplications and subtractions should be carried out before additions, but this is not so, and gives wrong answers. Or rather answers that don’t really comply with the BODMAS convention, as understood by most people.

Fine, that’s all sorted. Except that it isn’t. There are cases where the simple BODMAS, left to right, convention is insufficient. One such case is the case of exponentiation on exponentiation:

2 ^ 3 ^ 4 interpreted as 2 ^ (3 ^ 4) = 2 ^ 81 = 2.417x10^24
2 ^ 3 ^ 4 interpreted as (2 ^ 3) ^ 4 = 8 ^ 4 = 4096
Note: The '^' is used here for the exponentiation process, because it is difficult to apply superscripting twice. It also makes things a little clearer.

This case is usually interpreted by the first method, above. Such cases aside, the BODMAS convention clearly describes how to evaluate any arithmetic or mathematical expression. If you are not sure of the correct methods to use to create a complex expression, you should use brackets to clarify matters, whichever convention is used. If you are trying to evaluate a dubious one, you are out of luck, unless you can contact the author of the expression!

So, given that mathematicians and computer scientists (and many others) use the BODMAS conventions, what does that say about the expression ‘2 + 3 x 4’? Is the correct answer fourteen (14)?

The problem is posed ambiguously on purpose. The original setter was not really requesting an answer. He/she was inciting debate. Therefore the ‘solution’ doesn’t really matter. For what it is worth, I understand and use BODMAS, so I favour the answer of 14, but if the poser of the conundrum really wanted a unique answer, then they would have included brackets. Either:

2 + (4 x 3) = 14 or (2 + 4) x 3 = 18

Unfortunately the debate often quickly becomes acrimonious, with one side or the other hurling insults. But that’s the Internet for you.