Australasian Science: Australia's authority on science since 1938

Your guide to solving the next online viral maths problem

By Craig Anderson, Postdoctoral Research Fellow in Statistics, University of Technology Sydney

You need to think like a mathematician to solve those viral maths problems. Shutterstock/Dean Drobot

How many times have you seen a post online or part of your social media feed that says something like “This Math Problem Is Stumping the Whole Internet. Can You Solve It?” or “Apparently 9 out of 10 people get this wrong. Do you know the answer?

At the heart of the post is usually a problem involving numbers and symbols, such as this one:

They’re usually followed by plenty of discussion online about the various possible answers to the problem, including questions about why some people think even Google’s online calculator gets the wrong answer.

This is just one of many examples of similar problems that have been doing the rounds for years but still continue to baffle some people. Here’s another:

No matter how hard you try, it’s impossible to resist that challenge. You give it a go and then look at the comments section only to find some people agree with your answer while others have something completely different.

So let me outline the correct way to approach these online equations with the minimum of fuss. I’ll explain why in some cases there may be more than one possible correct answer.

The language of mathematics

In the English language we read from left to right. It therefore seems very natural to look at mathematical equations in the same way.

But you wouldn’t try to read Mandarin or Arabic like this, and nor should you attempt to do so with the distinct language of mathematics.

To be maths-literate, it is important to understand the relevant rules about “spelling” and “grammar” in mathematics.

A strict set of rules known as the order of operations defines the correct arithmetical grammar. These rules tell us the order in which we must perform mathematical operations such as addition and multiplication when both appear in an equation.

In Australia, the mnemonic BODMAS (Brackets, Order, Division, Multiplication, Addition, Subtraction) is typically taught to students to help them remember the correct order. Here, the ‘Order’ in BODMAS refers to mathematical powers such as squared, cubed or square root.

In other countries, this may be taught as PEMDAS, BEDMAS or BIDMAS, but these all boil down to exactly the same thing.

This means that if, for example, we have an equation that contains both addition and multiplication, we always carry out multiplication first regardless of the order in which they are written.

Consider the following equations:

(a)     3×4+2

(b)     2+3×4

When we apply BODMAS, we can see that these equations are exactly the same (or equivalent) – in both cases we begin by calculating 3×4=12, then compute 12+2=14.

But some people are likely to get the wrong answer for the second equation because they will try to solve it from left to right. They will do the addition first (2+3=5) and then multiplication (5×4) to obtain an incorrect answer of 20.

Brackets can make a difference

This is where brackets (or parentheses) can be a very useful part of arithmetical punctuation. In English, a well-placed comma can be the difference between saying “Let’s eat, John” and “Let’s eat John”.

The same applies in maths, where a well-placed bracket can completely change our calculation. Brackets are used to give priority to a particular part of an equation – we always carry out the calculation inside the bracket before dealing with what is outside.

If we introduce brackets around the addition in equations (a) and (b) above, then we have two new equations:

(c)     3×(4+2)

(d)     (2+3)×4

These equations are no longer equivalent to each other. In both cases, the brackets tell us to do the addition before we do the multiplication. This means we have to calculate 3×6 for (c) and 5×4 for (d). We now get different answers, (c) is 18 and (d) is 20.

Note that for equations (a) and (b), brackets were not necessary because BODMAS tells us to carry out multiplication before addition anyway. However, adding brackets that reinforce the BODMAS rules can help to avoid any confusion.

More rules

Understanding BODMAS gets us most of the way there in terms of solving these problems, but it also helps to be aware of the commutative and associative properties of mathematics.

A mathematical operation is commutative if it does not matter which order the operands (numbers) are written in. Addition is commutative, since a+b=b+a.

But subtraction is not, because a-b is not the same as b-a. It is also straightforward to show that multiplication is commutative, but division is not.

Such distinctions exist in the English language too. Ordering “vodka and orange juice” is the same as ordering “orange juice and vodka”, but “shaken not stirred” is not the same as “stirred not shaken”.

An operation is associative if, when we have multiple consecutive occurrences of this operation, it does not matter which order we carry them out in.

Again, addition and multiplication have this property, while subtraction and division do not. If we have the equation a+b+c, then it does not matter whether we solve it as (a+b)+c or a+(b+c).

But if we have a-b-c then the order is important, as (a-b)-c is not the same as a-(b-c) and we should always work from left to right. See for youself:

      (3-2)-1=0

      3-(2-1)=2

Again, English language implicitly has such concepts; “rum and coke and lime” is the same product regardless of whether rum is added to (coke and lime), or lime is added to a (rum and coke).

But we cannot rearrange any of these operations in “order then drink then leave” – a successful trip to the pub relies on these actions being carried out in exactly that order.

Once we understand the correct order of operations and the associative and commutative properties, we have the toolbox to solve any simple, well-defined arithmetical equation.

So do you know the answer?

So let’s return to the original problem:

      6÷2(1+2)=?

The equation has more than one legitimate meaning. Some might believe the answer is 1, others might think the answer is 9. And neither answer is really wrong.

After carrying out the addition inside the brackets, we are left with 6÷2(3). Some people will argue that we should work from left to right, calculating 6÷2=3 and then multiplying 3×3=9, which is the answer given by Google’s calculator.

Others, and I consider myself part of this camp, would argue that 2(1+2) should be computed in its entirety first, since the juxtaposition of these terms without a × sign implies that it consists of a single element.

A mathematician would more normally express the equation as follows:





That leaves us with 6÷6=1.

The problem here is a poorly constructed equation, and the ÷ is the main culprit. Mathematicians rarely use this sign (or the multiplication sign ×); in practice, they prefer to use clear, unambiguous notation such as fractions.

If we want to convey the first meaning above, it would be more common to write the equation with extra brackets as (6/2)(1+2), which gives the answer 9. To convey the second meaning, we would write 6/(2(1+2)) as shown in the equation above, which gives the answer 1.

By writing things this way, we can eliminate the whole debate and save everyone a lot of time and energy.

Online puzzles can be a great way to refresh your mathematical skills, but it’s important to watch out for the deliberately confusing ones.

The next time one pops up on your timeline, remember BODMAS and you should be fine.

But if the answer is still not clear, then it’s best to avoid the debate and instead step back, take a deep breath and say: “They haven’t spelled that correctly!”

The Conversation

Craig Anderson does not work for, consult, own shares in or receive funding from any company or organisation that would benefit from this article, and has disclosed no relevant affiliations beyond the academic appointment above.


Originally published in The Conversation.