# Basic error in order of operations [duplicate]

I know this is a very serious place to put this basic question. But I didn't find an explanation for the same.

I know that $ab/ab=b^2$ for all reals with $a\neq0$. But some of my students believe that answer is 1. I know this is only a convenion, but what is the reason for take such convenion in order of operations like "$ab/ba$ means $a*b*a^{-1}*b$" and it does not $ab/ab$ mean $a*b*a^{-1}*b^{-1}$"? Is there a really mathematical reason? That is: if "$ab/ab$ means $a*b*a^{-1}*b^{-1}$", is there a type of contradiction to some law?

## marked as duplicate by Hans Lundmark, user91500, Jyrki Lahtonen, Strants, mathematics2x2lifeSep 10 '18 at 17:51

• There is no "deep" reason behind why the multiplication operator $\cdot$ takes precedence over division operator $/$. – parsiad Sep 10 '18 at 7:22
• @parsaid: The standard convention is that they have equal precedence. What you describe is (presumably) the student's misinterpretation. – Hurkyl Sep 10 '18 at 7:25
• See also math.stackexchange.com/questions/33215/what-is-48%c3%b7293 and the linked questions there. – Hans Lundmark Sep 10 '18 at 7:28

The convention of doing multiplication and division in order from left to right follows the same pattern as with addition and subtraction:

$$1 - 2 + 3 \text{ means } (1-2) + 3$$ $$1 \div 2 \times 3 \text{ means } (1 \div 2) \times 3$$

This is described as multiplication and division having equal precedence (meaning you do them at the 'same time'), and being left associative (meaning you add implicit parentheses as indicated above)

I used the alternate notation above ($\times$ and $\div$) for clarity; they should have the same meaning as the notation you used (juxtaposition and $/$). Although do be aware that occasionally there are people who think the two alternatives should have different precedence rules.

Without knowing actual history, I imagine the need for a convention only surfaced with the advent of computers, and specifically:

• Digital calculators in which users have to enter a sequence of numbers and operations
• Writing formulas in text documents in the form of an ordered sequence of basic symbols

which lacks all of the cues present in handwritten formulae that indicate the intended meaning, such as graphical arrangement and spacing.

There is a huge amount of inertia behind the chosen convention since it is codified in nearly every programming language that has infix operators. There may have even been performance reasons to adopt this convention, as it's easier for a program to parse through a formula if multiplication and division have equal precedence.

If you're curious about an exception, the worst offender I know is WolframAlpha:

• Excellent answer. Thanks a lot – sinbadh Sep 10 '18 at 8:34
• Don't know about Wolfram Alpha but at least for Mathematica ab is a single variable (named with a 2-letter string). If WA interprets it the same way then your first example becomes less surprising. – Jyrki Lahtonen Sep 10 '18 at 17:22
• @JyrkiLahtonen: WA interprets them as one-letter variables; you can see this when it renders what it thinks the input is. – Hurkyl Sep 10 '18 at 17:24
• Thanks for checking. – Jyrki Lahtonen Sep 10 '18 at 17:40

what you have shown is confusing for all.who knows what you have wanted to mean? $$ab/ab~~means~~\dfrac{ab}{ab}~~~or,~~~\dfrac{ab}{a}.b$$ if you want to mean $\dfrac{ab}{ab}$,then you have to write $(ab)/(ab)$ then it's value will be $1$. But,if want to mean $\dfrac{ab}{a}.b$,then you have to write $((ab)/a)b$ then it's value will be $b^2$