# 6÷2(1+2)=?

Discussion in 'Mathematics and Physics' started by Gobbledok, May 2, 2011.

Not open for further replies.
1. ### GobbledokActive Member

Joined:
Mar 9, 2008
Messages:
452
Likes:
34
Location:
Toowoomba, Australia
Hi guys,

On another forum of which I am a member, we are having a discussion about the above equation.

Some people read the equation as:

(6÷2)(1+2) in which case the answer is 9.

6÷(2(1+2)) in which case the answer is 1.

Google and Microsoft (and other computer) calculators show the answer as 9 whereas good scientific calculators show the answer as 1.

Anyway i thought what better place to ask than here.

So go ahead guys, is the answer 1 or 9 and why?

2. ### Dr_DoggyWell-Known Member

Joined:
Aug 11, 2007
Messages:
1,718
Likes:
37
1.....those are 2 different equations, watch you notation, equation 1 & 3 are the same(equal) the brackets are not needed in #3 since equation follows order of operations, the second equation is a quadratic, way different.....the brackets hold it "apart", if someone is mixing the 2 it is wayyy wrong.....

to answer the question, just work it out using BEDMAS,

3. ### PommieWell-Known MemberMost Helpful Member

Joined:
Mar 18, 2005
Messages:
10,161
Likes:
340
Location:
Brisbane Australia
I agree with doggy, the answer is 1.

Mike.

Joined:
Jan 12, 1997
Messages:
-
Likes:
0

5. ### GobbledokActive Member

Joined:
Mar 9, 2008
Messages:
452
Likes:
34
Location:
Toowoomba, Australia

I agree with you 2.

Juxtaposition (multiplication without the sign) takes precedence over the division.

Therefore 1 is the result.

However this question has returned over 20 pages of replies in the other forum, some saying 1, most saying 9.

6. ### KeepItSimpleStupidWell-Known MemberMost Helpful Member

Joined:
Oct 30, 2010
Messages:
9,968
Likes:
1,099
a1.

a2.
; did nothing but removed the parenthesis. This is the same as

a3.
; Nothing but left to right evaluation

a4.

Way B:

b1.

b2.

The answer is 9. Rewriting a1 as b1, I think, makes it obvious. If you make division have a higher priority than addition, you get eqn B1. B1 is easy to solve.

A is harder to understand. If you want, I'll go through it.

adding and subtracting have the SAME precedence. Multiplication and division have the SAME precedence. Expressions are evaluated left to right.

Last edited: May 2, 2011
7. ### GobbledokActive Member

Joined:
Mar 9, 2008
Messages:
452
Likes:
34
Location:
Toowoomba, Australia
But that's where you went wrong.

6/2(1+2) does not equal 6/2*(1+2)

Juxtaposition (in this case, multiplying using brackets instead of the x sign), takes precedence over multiplication and division.

Also, on my Casio scientific calculator:

6/2*3 = 9

and

6/2(3) = 1

.

Last edited: May 2, 2011

Joined:
Oct 30, 2010
Messages:
9,968
Likes:
1,099
9. ### PommieWell-Known MemberMost Helpful Member

Joined:
Mar 18, 2005
Messages:
10,161
Likes:
340
Location:
Brisbane Australia
I can see this getting to 20 pages as well.

Mike.

10. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,049
Likes:
961
Location:
NJ
Hello there,

Lets see if we can cut the pages down right now

Sometimes the answer to a question depends on the background context. You can not answer it either way until you decide on a priority, and the priority depends on the context.

For example, if the context is "pure mathematics" then the answer has to be 9 because multiplication and division both have the same priority. This is the same as pure algebra, where the order of operations is multiplication and division before addition and subtraction, but there is no preference for multiplication over division.

On the other hand, if the context is one of those calculators that defines an implied multiplication to have priority over division, then no sign between numbers will be a multiplication that takes priority over division.

It just so happened that in the past i wrote an entire program for a programmable calculator that does scientific calculations and integrations and even solves differential equations, and one of the things i made sure to do was prioritize the multiplications the same as the divisions so the calculator would always handle these operations as close as possible to the way a mathematician would do it. I also took part in the writing of language interpreter programs that had to handle algebraic expressions, and i was sure to do the same there as were all the writers before me. I can say first hand that it is better to program the calculator or programming language interpreter mathematics as pure algebraic, although that's not the only possible way to do it.

The bottom line is you have to know how the device or program will handle your math expressions, and where you are to migrate from one device to another you have to be ready to translate by hand the expressions from one device for use on another. That means if your calculator handles implied multiplications as higher priority (giving you an answer of 1) and you transfer it to another program that does not recognize that, then you have to recode it into 6/(2*(1+2)) or else you will not get the result you are expecting.

Just to illustrate the coding of a math expression handler, one of the first things to do is to encode the priority of each operation, and since each operation is a character, that can be used as an index into an array such as:
p['+']=2;
p['-']=2;
p['*']=3;
p['/']=3;

where you can note that add and subtract have priority 2, while multiplication and division have higher priority but both the same. This method of prioritizing produces a result of 9.

The priority of those above plus a higher priority for implied multiplication might look like this:
p['+']=2;
p['-']=2;
p['*']=3;
p['/']=3;
p[' ']=4;

where the implied multiplication is done with a space rather than '*', and has higher priority so it would be done before operations involving '*'. This kind of prioritizing would produce a result of 1.

So you can see that the result depends on how the guy who programmed it decided to do it, and that's about the end of it.

Of course parens always have higher priority than the other operations.

Last edited: May 2, 2011
11. ### GobbledokActive Member

Joined:
Mar 9, 2008
Messages:
452
Likes:
34
Location:
Toowoomba, Australia

Do distributive rules comes into it at all?

For example:

A(B+C) = AB + AC

Therefore

6÷2(1+2) = 6÷((2*1)+(2*2))

I think the problem comes from what people read A as. Some people read it as A = 6 and some people erroneously (in my opinion) read it as A = 6/2.

I think that if it should be read as A = 6/2, then 6/2 should have brackets.

12. ### misterTWell-Known MemberMost Helpful Member

Joined:
Apr 19, 2010
Messages:
2,697
Likes:
368
Location:
Finland
I sent an email to Wolfram about that one. They have a great tool there, but even the greatest piece of software can have bugs in it.. or a feature if the bug is documented. Lets see if they will answer.

Wolfram Alpha gives different results to

6÷A(1+2)
and
6÷A*(1+2)

But the same result to

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

6÷2(1+2), 6÷2*(1+2), 6÷A*(1+2), 6÷A(1+2), A=2 - Wolfram|Alpha
If it is not a bug, I would like to know the logic behind those results.

Last edited: May 2, 2011
13. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,049
Likes:
961
Location:
NJ
Hi again,

I take it my previous reply helped to clear things up a bit?

There are at least two very different types of calculators, symbolic and numeric. The numeric type handle calculations with actual numbers like 1,2, 3.234, etc., while the symbolic type calculators handle calculations like A*(B+C) => A*B+A*C or the other way around, A*B+A*C => A*(B+C).

The distributive law only comes in for symbolic calculators. For numeric calculations, the part of the expression inside the parens is done first, followed by what is outside of them. It all takes place as part of the parsing of the expression. As each symbol (like +,-, etc) is read and each number is read, it is either used right away or put on a queue for later inclusion depending on the priority list i was talking about in my previous post. It's quite interesting really, and one of the most basic types of calculators uses a sort of 'train track' type algorithm, where one thing comes in and gets used or stored on another 'track' until it is called for later. I think there should be stuff on the web about this kind of algorithm if you are interested. They probably also go into detail about how to handle other operations too like exponentiation (a^b) and function calls ( f(x)=x^2+x+1 for example).

14. ### GobbledokActive Member

Joined:
Mar 9, 2008
Messages:
452
Likes:
34
Location:
Toowoomba, Australia
Well, sortof. I still think the answer is 1

If not because of distribution then because of juxtaposition. Though some people follow different rules for juxtaposition, too. Some take it as meaning exactly the same as multiplied by, and some take it to have a slightly higher priority. I was always taught that it took a higher priority than multiplication and division.

I'm not sure anybody knows what's right

15. ### dougy83Well-Known Member

Joined:
May 18, 2008
Messages:
2,677
Likes:
215
Location:
Brisbane, Australia
So there is no consensus on any forum re the relative precedences of implicit/explicit multiplication...

The link you provided [in a subsequent post] even states that neither approach (i.e. implicit/explicit multiplication equivalence OR implicit multiplication precedence) is universally accepted. Is it not possible that the equation is potentially ambiguous?

Unless you can find a valid reference standard for the actual accepted operator precedences, there's really no point in arguing either side, is there?

Although I would personally expect multiplication by juxtaposition (implicit mult) to have greater precedence than explicit multiplication, that has no bearing on the fact (whatever that may be).

The second is not quadratic (nor are the others).
For BEDMAS/BEMDAS it should be noted that subtraction should generally occur before addition.

16. ### GobbledokActive Member

Joined:
Mar 9, 2008
Messages:
452
Likes:
34
Location:
Toowoomba, Australia
Well it did say "The general consensus among math people is that "multiplication by juxtaposition" (that is, multiplying by just putting things next to each other, rather than using the "×" sign) indicates that the juxtaposed values must be multiplied together before processing other operations." But no, it didn't say that either way is universally accepted.

More than anything, I wanted to see which way was more accepted on here. Also, (I think) it makes interesting conversation.

17. ### stephan.b2hvBanned

Joined:
May 3, 2011
Messages:
1
Likes:
0
Location:
Riedstraße 1 . 6833 Klaus . Vorarlberg/Austria
I believe it is 9 and others think that it is 1. For it to be it should have another set of parenthesis and it would look like 6/(2(1+2)). The way I see it, it would simplify to 6/2*3 and according to Order of Operations, multiplication and Division have equal presidence so you do the problem from left to right. thats in my own opinion.

b2hv.com
high voltage

18. ### misterTWell-Known MemberMost Helpful Member

Joined:
Apr 19, 2010
Messages:
2,697
Likes:
368
Location:
Finland
I investigated this further.

Wolfram Mathematica gives:

[Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode a5e855c1145f8970bbf90a7ca84e2bd4.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o a390a89901f1a1590a1e44e553723ded-2.png a5e855c1145f8970bbf90a7ca84e2bd4.dvi]

[Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode 8964bde1fb6f33423436714d52359193.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 817ad6b2c0082fc68a2deb7252ac0d96-2.png 8964bde1fb6f33423436714d52359193.dvi]

[Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode ad042c331fb909b314c1b6e99effa0c1.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 0fa5b4d4eb6e78c477f261d50207b831-2.png ad042c331fb909b314c1b6e99effa0c1.dvi]

[Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode 38c2b626af84ed8f6837fd2ee50a6fca.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 3de7d16581d282d5ac13b77a451c8de0-2.png 38c2b626af84ed8f6837fd2ee50a6fca.dvi]

Wolfram Alpha gives:

[Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode e998e2cebfa872470f811e11dc9dbe59.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o a390a89901f1a1590a1e44e553723ded-2.png e998e2cebfa872470f811e11dc9dbe59.dvi]

[Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode b46798738235672e15d42436bd821238.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 817ad6b2c0082fc68a2deb7252ac0d96-2.png b46798738235672e15d42436bd821238.dvi]

[Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode b8d0ec62258ba0502c97c1fb26044f72.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 387eb0062ad65a0f4559633b286c133a-2.png b8d0ec62258ba0502c97c1fb26044f72.dvi]

[Error: Syntax\ error : /usr/bin/latex --interaction=nonstopmode 1200e67e509b665619fd1536289b9492.tex && /usr/bin/dvipng -q -D 300 -T tight -gamma 2.0 -bg Transparent -o 3de7d16581d282d5ac13b77a451c8de0-2.png 1200e67e509b665619fd1536289b9492.dvi]

Edit: I noticed that the result is different if there is a space between the symbol A and the term (1+2). Wolfram Mathematica inserts (forces) the space automatically and Wolfram Alpha allows both cases.

Last edited: May 3, 2011
19. ### MrAlWell-Known MemberMost Helpful Member

Joined:
Sep 7, 2008
Messages:
11,049
Likes:
961
Location:
NJ
Hi again,

There wont be any 'consensus' that works in every possible circumstance because as i was saying the software itself decides which way to compute it. There is no real right or wrong here, it's a matter of who programmed it. That's why you'll see a different result for different software.

20. ### aljamriMember

Joined:
Jun 12, 2006
Messages:
694
Likes:
6
B O D M A S

B Brackets ( )

O Of

D Division /

M Multiplication x

S Subtraction -

21. ### dougy83Well-Known Member

Joined:
May 18, 2008
Messages:
2,677
Likes:
215
Location:
Brisbane, Australia
I'm sorry, I got the impression you had an agenda (that you wanted people to agree with your views/beliefs):
As far as interesting.. to me it's about as interesting as a discussion on proving which faith is correct

I think you've added some extra brackets up there... You have done a substitution based on the assumption that the implicit has the higher precedence.

e.g., taking the same approach
if AB + AC = (A(B+C)) -- which it does
Therefore, after substitution:
6/AB+AC = 6/(A(B+C)) -- which it doesn't