6

I hold a masters in computer science from one of the worlds top universities and until today I thought I more or less know basic math.

I'm sure you guys all know these click-bait simple "90% of people can't solve this equation" posts on facebook where everyone starts to argue over a simple equation (and I DEFINITELY don't want to kick off one of those - but I'd like to discuss the roots of this confusion).

So today there was another one of those:

6/2(1+2)

Based on what I learned and applied throughout all my years in university, this equals 9, since brackets are evaluated first and then it's left to right, since division and multiplication have the same operator precedence.

Google agrees with that: enter image description here

Wolfram Alpha agrees with that: enter image description here

and my texas instruments agrees with that too. So it's 9, right?

Well today I came across a claim I hadn't heard before, which is "implied multiplication takes precedence over both explicit multiplication and division" - so by that rule it would not be left to right in the above example, but the implied multiplication would be evaluated before the division, which would mean that

6/2(1+2) == 1 != 6/2*(1+2)

So, are google, wolfram alpha and my calculator all wrong (they by the way also yield 9 if ÷ is used instead of /)?

The only thing i found on the issue so far is this statement on Wikipedia (https://en.wikipedia.org/wiki/Order_of_operations):

Mixed division and multiplication: Similarly, there can be ambiguity in the use of the slash symbol / in expressions such as 1/2x.[5] If one rewrites this expression as 1 ÷ 2x and then interprets the division symbol as indicating multiplication by the reciprocal, this becomes:

1 ÷ 2 × x = 1 × 1/2 × x = 1/2 × x.

With this interpretation 1 ÷ 2x is equal to (1 ÷ 2)x.1[6] However, in some of the academic literature, multiplication denoted by juxtaposition (also known as implied multiplication) is interpreted as having higher precedence than division, so that 1 ÷ 2x equals 1 ÷ (2x), not (1 ÷ 2)x. For example, the manuscript submission instructions for the Physical Review journals state that multiplication is of higher precedence than division with a slash,[7] and this is also the convention observed in prominent physics textbooks such as the Course of Theoretical Physics by Landau and Lifshitz and the Feynman Lectures on Physics.[a]

So one thing this tells me is clearly AVOID IMPLIED MULTIPLICATION

but what is internationally actually 'more correct and less wrong'? Also, I don't fully see how ÷ vs. / is relevant to this question?

By the way, some calculators do seem to evaluate to 1: enter image description here

Aweygan
  • 23,232
  • 9
    What you should take away from this is that the order of multiplication and division is always ambiguous (regardless of whether the multiplication is implicit or explicit), and you should use parentheses and fractions to avoid any potential confusion when a division is performed to the left of a multiplication. If you come across an ambiguous expression someone else has written, then it's ambiguous, so you will have to use your powers of mind reading to induce what the author probably meant (or, if possible, all them directly). – Arthur May 19 '19 at 09:39
  • 1
    The notation is as ambiguous as "Buffalo buffalo Buffalo buffalo Buffalo buffalo buffalo buffalo buffalo" as long as no agreement on the correct interpretation has been reached. Instead of inventing new rules for such corner-cases, it is much more advisable to resort to formulations that are unambiguous within sufficiently simple agreed-upon rules of interpretation, so either "\frac62(1+2)$ or $\frac 6{2(1+2)}$. After all, the goal is to transport information from the author to the reader. But once all use unambiguous notation, the need to agree upon rules for no-longer-used cases has gone ... – Hagen von Eitzen May 19 '19 at 10:08
  • I try to write things so that division doesn't come before multiplication, but if that's unavoidable, then you can still ensure that you never see the ambiguous $a/bc$. Either write $(a/b)c$, $a/b\cdot c$, or at least $a/b,c$ if you want division first, or $a/(bc)$ if you want multiplication first. (This is all assuming that you can't write $\frac abc$ or $\frac a{bc}$ for reasons of limited formatting availability.) – Toby Bartels Dec 25 '21 at 21:11
  • Those two Casio calculators coming up with a different answer are a clear demonstration how one program can parse an expression in one way, and another program parse that very same expression in a different way. And no, there are really no universally agreed conventions regarding operator precedence. Sure, almost everyone will parse 3+47 as 3+(47) rather than (3+4)*7, but even there you will find people or treatments or programs or what have you that will parse it in the latter way. And with division and multiplication it is even more ambiguous. Best to just use parentheses! – Bram28 Apr 12 '22 at 16:39
  • 1
    Try the following: https://www.wolframalpha.com/input?i=6%2Fxy+where+x%3D2%2C+y%3D%281%2B2%29 – Antony Aug 07 '22 at 13:44
  • See also https://math.stackexchange.com/questions/33215/what-is-48-div293/ – Gerry Myerson Aug 07 '23 at 02:49
  • Why isn't Reverse Polish more popular? https://en.wikipedia.org/wiki/Reverse_Polish_notation – TurlocTheRed Aug 29 '23 at 02:46

5 Answers5

3

While the rules of mathematics are usually very precise, this is more of a grammar issue. Once the written form is correctly parsed, then you can apply precise and well-known rules to solve it. The problem is that there's no consensus on the right way to parse implied multiplication in the context of a larger expression.

There's a good analysis here, in which the author basically asserts that both answers are right, and the question is wrong.

My personal theory is that because many of us see polynomial terms as being discrete things, we tend to treat similar structures in other places as being discrete. When I see something that looks like a polynomial term, my inclination is to treat it as if it has parentheses around it. So, I see 2/4x as 2/(4*x), while others may see (2/4)*x. Both interpretations can be found in different textbooks.

You could avoid the ambiguity by rewriting the question without implied multiplication. An even better approach would be to change the way you represent division, and put the numerator above the denominator.

mrog
  • 131
  • 4
0

I've seen many of these clickbait problems on Facebook. Sometimes they add extra operators, but it always boils down to how you interpret an expression of the form a/bc. This doesn't have a widely agreed-upon answer because it's just not a part of formal mathematical notation.

  • In proper mathematical typesetting, you'd use fraction notation, and thus write $\frac{a}{bc}$ or $\frac{a}{b} c$, depending on the intended meaning. The top and bottom sides of the fraction bar serve as implicit grouping brackets, so $\frac{N}{D} = \frac{(N)}{(D)} = (N) / (D)$. There is no ambiguity.
  • In most computer programming languages, implicit multiplication isn't allowed (mainly because this would prevent having descriptive multi-letter variable names). You have to write a/(b*c) or a/b*c, with an explicit * for multiplication. The latter form is parsed as (a/b)*c due to the rule of left-to-right evaluation of * and / operators (which are at the same precedence level). So again, no ambiguity.

Ambiguity shows up when expressions are typed in a “linear” format (with division written as $a/b$ or $a \div b$, instead of as $\frac{a}{b}$) while also using implicit multiplication ($bc$ instead of $b \times c$, $b \cdot c$, or $b * c$). There are two main schools of thought on operator precedence (often inaccurately called “order of operations”). One is the familiar PEMDAS:

  1. Parentheses
  2. Exponentation (right to left)
  3. Multiplication and Division (left to right)
  4. Addition and Subraction (left to right)

The other is PEJMDAS, which breaks out juxtaposition (implicit multiplication) into its own level.

  1. Parentheses
  2. Exponentation (right to left)
  3. Juxtaposition
  4. (explicit) Multiplication and Division (left to right)
  5. Addition and Subraction (left to right)

There really isn't a strong argument for preferring one to the other.

  • The main argument for PEMDAS, which interprets a/bc as (a/b)c, is that it treats explicit and implicit multiplication uniformly, thus making things easier for compiler developers.
  • The main argument for PEJMDAS, which interprets a/bc as a/(bc), is that bc being written as one “word” just makes it look more tightly bound as a unit than an operation written with punctuation. This is especially true when spaces are added in a / bc.

As you have noted, both interpretations are used by various calculators and computer algebra systems. So what should you do?

“Doctor, it hurts when I do this.”
“Then don't do that.”

Make a habit of never writing $a/bc$. Always explicitly disambiguate between $(a/b)c$ and $a/(bc)$. And when someone else asks a math question with $a/bc$, ask them to clarify.


As for why the confusion occurs, I think it's a educational issue. When students are first introduced to multiplication in elementary school, it's always using an explicit operator (usually $\times$): $2 \times 2 = 4$, $7 \times 8 = 56$, etc. Only when they get to (pre-)algebra, with its concept of “variables”, is implicit multiplication introduced. “Hey, it's getting annoying to use all these $\times$'s, so from now on let's just write $ab$ instead of $a \times b$.” But then they never go back and revisit Aunt Sally to see how she likes this new type of multiplication.

Perhaps we should change the mnemonic to replace the term “parentheses” with “grouping”. The “grouping” symbols will of course include parentheses (...) and the similar bracket pairs [...] and {...}. But it also includes “hidden” grouping brackets in notations like fractions ($\frac{a}{b} = \frac{(a)}{(b)}$) and radicals ($\sqrt{x} = \sqrt{(x)}$). And when implicit multiplication is introduced, let's ask: Does juxtaposition count as “grouping”?

Dan
  • 14,978
-2

In your picture of the $2$ calculators the one with the $9$ answer was only programed for order of operations. The calculator with the answer of $1$ was also programed to consider the distributive property. A calculator is only as good as its programming and only as intelligent as its user.

When I went to school we were taught implied multiplication took precidence because of the distributive property. And the order of operations was a suggestion not concrete.

Parcly Taxel
  • 103,344
  • The distributive law is the reason that we choose to define the order of operations so that multiplication takes precedence over addition and subtraction. (If you really want to do addition or subtraction first and don't want to use brackets, then you can distribute instead, and for this reason you're more likely to want to multiply first anyway.) It doesn't tell us anything about whether multiplication (implicit or explicit) should be done before division. – Toby Bartels Dec 25 '21 at 21:07
-2

The problem lies with the current definition of what constitutes a term or rather, what separates a term. In my time we learned terms were separated by any operator. Today they are teaching only [+ or -] So now they take things in bigger bites. I believe this loses the minutia of things. 6 / 2(1+2) I see as plainly two terms so left divided by right. But there is no + or - not enclosed in parenthesis so to the new definition it is one term. So they do not know where to start and instead of starting with the parenthesis just go L to R and associate the 2 with the division rather that the parenthesis. They also see 2x3 and (2x3) both to be one term. But then they see 6/2x3 as three operations but 6/(2x3) as two operations, they do not see the inconsistency here. So you see my concern with only + or - separating terms. Is this the basis for dyscalculia suffered by many young people trying to learn math. ?? Well if you don't know what constitutes a term, I couldn't think you would go far.

My responder says I need to provide references and footnotes for my observations to be true. WOW, I have seen this discussion on YouTube and from the many conversations I have read, I have reached this conclusion. I have watched this thread for several years. People who properly define terms get one answer and people who do not get the other answer. By properly I mean ALL operators separate terms. [As per the understanding of my generation, I'm 73]

I have been told that 2(3)=2x3 and also that 2x3 and (2x3)are both one term and both are the same.

I also see it being taught that (2x3)=2x3=6 Instead of (2x3)=(6)=6 Sorry but folks of my generation have NOT been taught to see (2x3) as being the same as 2x3. I doubt anyone has written a book about this. Maybe they should.

As for my qualifications to make these observations, I do have a BSEE and attended a prestigious university. Is that good enough, Mr Stucky?

  • 3
    This Answer concludes that a shift of terminology in classrooms about parsing four-operations expressions is [emphasis mine] "the basis for [many young learners'] dyscalculia". This is an extraordinary claim, but unfortunately the evidence provided is lacking. If you have any references you'd like to point me to, I'd certainly be interested. – Eric Nathan Stucky Aug 07 '23 at 02:52
  • The point here can be summarized: Students not being able to decern the difference between 2x3 and (2x3) as being two terms vs one term, or that being taught (2x3)=2x3 is a problem at the most basic level. This is my opinion and it speaks for itself. No references needed. – Mike Stuart Aug 29 '23 at 02:49
-3

@Robert w Shull is correct,

Implied multiplication in this instance comes from the Distributive Law.

Distributive law, in mathematics, the law relating the operations of multiplication and addition, stated symbolically, a(b + c) = ab + ac; that is, the monomial factor a is distributed, or separately applied, to each term of the binomial factor b + c, resulting in the product ab + ac.

–Encyclopedia Britannica

Because Parenthesis have the highest priority in the order of operations, the equation is correctly solved as follows:

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

Because there is only one "explicit" operator (division) outside of the parenthetical term, the equation is a simple fraction...

$$ \frac{6}{2(1+2)}$$

which we can then reduce... $$ \frac{3}{(1+2)}$$

finally... $$ \frac{3}{3}=1$$

Updated: Implied multiplication is everywhere, 1x = x and x/1=x. Any number times 1 is that number and any number divided by 1 is that number. We can use this fact to maintain that the given equation is an implicit explicit division problem.

6÷2(1+2)=?
3÷1(1+2)=?
3÷1(3)=?
3÷3=1

More support here:https://producers.wiki/wiki/The_equation_that_broke_the_Internet

  • The distributive law is the reason that we choose to define the order of operations so that multiplication takes precedence over addition and subtraction. (If you really want to do addition or subtraction first and don't want to use brackets, then you can distribute instead, and for this reason you're more likely to want to multiply first anyway.) It doesn't tell us anything about whether multiplication (implicit or explicit) should be done before division. – Toby Bartels Dec 25 '21 at 21:06
  • 1
    @TobyBartels

    In this case, because the implied multiplication is attached to the parenthetical expression as the coefficient, it clearly precedes multiplication and division because of the distributive law.

    I suggest that there is no hard and fast rule about implied multiplication because it is everywhere.

    1x = x

    and

    x/1 = x

    Every number is presumed to have an implied multiplier of one.

    – Steven Kritzer Dec 25 '21 at 22:26
  • If you think that the distributive law is the reason that multiplication should be done before division in 6÷2(1+2), then what do you think about 6÷2(3)? – Toby Bartels Dec 26 '21 at 02:08
  • Parentheses are used to enclose the variables of a function in the form f(x), which means that values of the function f are dependent upon the values of x. –Wolfram Parenthesis – Steven Kritzer Dec 26 '21 at 03:06
  • Whenever you see parenthesis, you do the entire parenthesis operation first. The implied multiplication means that the f is to be multiplied by x before proceeding to lower priority operations. – Steven Kritzer Dec 26 '21 at 03:13
  • While that is one use of parentheses, none of the parentheses appearing anywhere in this question, either of its answers, or any of the many comments on the question and its answers (before your last comment just now) have this meaning; nor does that use of parentheses related to the distributive law. [You did another comment while I was writing this, so I'm referring to the one just above. Anyway, it's clear that this conversation is pointless.] – Toby Bartels Dec 26 '21 at 03:14
  • 1
    What does consensus have to do with the established rules of math? – Steven Kritzer Dec 26 '21 at 03:24
  • 1
    What implied multiplication means is that you cannot add implicit operator without maintaining the factor's relationship with its coefficient. Your example 6÷2(3) == 6÷(2*(3)). – Steven Kritzer Dec 26 '21 at 03:35