Parsing mathematical expressions which have omitted multiplication signs

SmartmanAppsSmartmanApps AUMember ✭✭✭
edited August 2019 in General

Hi all,

I am also a Maths teacher, and I've just discovered widespread incorrect parsing of mathematical expressions, courtesy of this "what does 8÷2(2+2)=?" which is going around at the moment. My (physical) scientific calculator gives the correct answer (1). Google, Bing, and my Android calculator ALL give the wrong answer (16), due to incorrect parsing of the expression. Here's why the answr IS 1 (the question isn't ambiguous nor open to interpretation - there is only 1 correct way to read it)...

2(2+2) is subject to the distributive law. The omitted multiplication sign means this is NOT optional. i.e. in this context, with a preceding "÷", 2(2+2) != 2x(2+2). This is where people are going wrong, because they rewrite it as 8÷2x(2+2), and through BEDMAS come up with 16, because they do (8÷2)x(2+2). This is incorrect because you've ignored the distributive law. i.e. a(b+c)=ab+bc. a is what's known as a co-efficient, and it belongs exclusively to (b+c). To solve (b+c) you MUST distribute a first. On the other hand, ax(b+c), a can be treated as a separate term, and, written out fully, the co-efficient is 1 in this example, and obviously is already distributed - ax1(b+c). 1xa(b+c) is different.

So what Google/Bing/Android are doing, is forcibly adding a "x" where it doesn't belong, then failing to add a bracket to compensate. i.e. (ax(b+c)) would be valid. ax(b+c) is not valid (not in this context where it's preceded by a "÷"). On my (physical) scientific calculator, I can type in exactly "8÷2(2+2)", and it gives me the correct answer, 1. Google and Bing are adding a x (but not extra brackets) after I have typed the expression in full. My Android calculator won't even let me type in 2(2+2) to begin with! As soon as I hit that first bracket it inserts a "x" right away! WRONG! Wrong, wrong, wrong, wrong, wrong. :-( If you want to insert a multiplication sign then you must ALSO add extra brackets in order not to change the value.

Step-by-step, applying the distributive law (which is part of solving the brackets) looks like...

Alternatively, in programming, you could do it this way...
(parse as) =8/(2x(2+2))

More generally, this applies to ANY instance of omitted multiplication signs. This is a rule of algebra.
i.e. 1÷2a=1÷(2xa) != 1÷2xa. 1÷2a=1/2a (i.e. 1/(2a)). 1÷2xa=a/2 - quite obviously a different result, the wrong result. Have a look at a graph of 1/2a vs. a/2. 1÷2a is ALWAYS equal to 1÷(2xa) in algebra. 2a is a single term. Just like 2 dozen is a single term (representing 24). If you don't treat 2 dozen as a single term, and divide by it, then with this faulty logic you would have 1÷2x12=1/2x12=6, which is multiplying by 6, not dividing by 24! Any term which has omitted multiplication signs MUST BE treated as single terms within brackets. 2a=(2xa), a(b+c)=(ax(b+c)), etc.

Specifically in terms of the distributive law, the reason it is so is as follows...

Let's say we had an expression ab+ac. Some of you may recognise right away "Hey! There's a common factor of a that we can pull out there", and you'd be right, giving us a(b+c)... and THERE'S your precise reason it's written without a multiplication sign, and why it's inseparable from (b+c) - it was part of (b+c) to begin with! i.e. ab+bc was our original term. Those who have parsed this as ax(b+c) have ended up with the wrong answer (because when you prefix the a with a "÷", the (b+c) ends up in the numerator, instead of in the denominator where it belongs).

Finally, for those who are interested, let's prove this using algebra...
Let a=2. That gives us...
Let's simplify using well-defined algebraic rules...
1. distributive law (first step in solving the brackets)
2. collect like terms (completes solving the brackets)
3. expand top and bottom
4. cancel common factors top and bottom (2xa)
So, 4a÷a(a+a)=2÷a, and a=2, so 2/2=1! We just proved, using algebra, that 8÷2(2+2)=1.

I finish off by noting that, as we just saw, this is very much a high school Maths problem. i.e. you can't solve it using primary school BEDMAS-alone Maths, as it very much involves algebra. i.e. 1÷2a=1/(2xa), always! In this case we had 8÷2a, where a=2+2.

Now, PLEASE go and check your algorithms! a(b+c) must ALWAYS be parsed (ax(b+c))! Simply using ax(b+c) leads to incorrect answers.

Thanks for your time,

Sign In or Register to comment.