Dividing by 2 numbers at once, what is the answer?

Let's say i have 4/1/5. or 4 divided by 1 divided by 5. Are there any rules that i am allowed to use to stop any mistakes?, for example this has 2 solutions, 4/5 , and 20.

Edit: Thanks for your responses. It seems the rule of thumb is to start from the beginning and follow through the numbers, while any brackets should be dealt with beforehand.

In which case something like 1/2/3/4 is in fact 1/24.

Edit2: There's a small bounty for whoever can prove that there solution is always the case, and any misuse of it always fails

• Compare with $4-1-5$ which by convention means $(4-1)-5$, not $4-(1-5)$ – Hagen von Eitzen Oct 21 '14 at 10:22
• This is why schoolchildren should learn math operations with set theory, because it is much easier to understand the abstract concepts. Fractions are only hard because people don't understand what a multiplicative inverse is. – MrDosu Oct 21 '14 at 16:04
• @MrDosu I think the problem there is that set theory is like Greek for the people that are actually overseeing the schools. Hopefully one day this will change – Steven Lu Oct 21 '14 at 16:56
• Aunt Sally would like to have a word with you. – corsiKa Oct 21 '14 at 18:43
• Subtraction is defined the same way as division as addition of the additive inverse [e.g.: 4+(-1)+(-5)] so the - operator needs to be left associative also to have that behaviour. Math is beautiful because the core rules upon which all other rules are build are incredibly simplistic. – MrDosu Oct 21 '14 at 23:43

In the USA and Canada, perhaps other places too, we use the BEDMAS system for interpreting expressions. First, we calculate the result of bracketed sub-expressions. Then exponentiation. Then from left to right, resolving divisions or multiplications as they show up. Then from left to right, resolving additions and subtractions as they show up.

So in the BEDMAS convention, we would deal with your 4/1/5 by doing the divisions left-to-right. 4/5.

Edit:

As the comments point out, some use PEDMAS instead. P for parenthesis instead of brackets ;)

• The first sensible answer I've seen yet. And the only one that's fully correct. This is also the convention used in ALL programming languages. – Clearer Oct 21 '14 at 17:45
• Agree. Note also that "resolving . . . as they show up" is important. An amazing amount of people I've encountered in the USA believe multiplication always precedes division (and that addition always precedes subtraction), due to a misinterpretation/poor-teaching-of the similar "PEMDAS" rule. – imallett Oct 21 '14 at 18:21
• Took me a minute. For others: B is "Brackets" for the US's "Parentheses" in PEMDAS. (Also flipping the M and D made it different enough I was wondering if this was an entirely different rule) – Izkata Oct 21 '14 at 21:05
• Please don't use "equation" when there is no equal-sign in there. Maybe you mean "expression"? – Paŭlo Ebermann Oct 21 '14 at 21:13
• @Clearer: That's not true: Forth, Lisp, APL, and Smalltalk are all exceptions to that. – Michael Shaw Oct 22 '14 at 1:38

The double fraction $a/b/c$ should not be allowed because it does not make sense : which operation should we do first ? To make sense, you must add parenthesis (this way, you specify which operation is done first). There are two ways to do it :

$$\frac{\Big( \displaystyle \frac{a}{b} \Big)}{c} = \frac{a}{bc} = (a/b)/c$$

and

$$\frac{a}{\Big( \displaystyle \frac{b}{c} \Big)} = \frac{ac}{b} = a/(b/c).$$

Therefore, $\displaystyle \frac{\Big( \displaystyle \frac{a}{b} \Big)}{c} \neq \frac{a}{\Big( \displaystyle \frac{b}{c} \Big)}$ in general. Be careful to the way you put parenthesis. In general :

$$\frac{\Big( \displaystyle \frac{a}{b} \Big)}{\Big( \displaystyle \color{red}{\frac{c}{d}} \Big)} = \frac{a}{b} \times \color{\red}{\frac{d}{c}} = \frac{ad}{bc}.$$

• IMHO a/b/c is definitely (a/b)/c and never a/(b/c). Similarly a-b-c is (a-b)-c and not a-(b-c). – TrueY Oct 21 '14 at 13:45
• @jibounet: IMHO a/b/c is as ambiguous as a-b-c. I can be considered ambiguous only if it is written in vertical form (with horizontal divider sings). But rewritten as a÷b÷c or a:b:c looks definite again. – TrueY Oct 21 '14 at 14:19
• @TrueY: The fact alone that jibounet thinks it's ambiguous makes it ambiguous. – gnasher729 Oct 21 '14 at 14:41
• It is in no way ambiguous because algebra isn't imho, it is axiomatic. – MrDosu Oct 22 '14 at 0:01
• A more accurate description is $x/y/z$ is unfamiliar -- it's not written very often and people don't see it very often, so they don't have an instinctive response to read it as left-associative. In fact, they may well have never seen or considered such an expression before! – user14972 Oct 22 '14 at 8:56

Operator Associativity is a core concept of mathematical standard notation. This is a very well defined domain and not the kind of "convention voodoo" implied in many of the answers given here. It is a property of a defined operator that needs to be learned alongside its other properties and cannot be deduced.

Edit:

Most of the confusion here stems from the fact that division is really defined as the multiplicative inverse of a given algebra (which is associcative). Because this abstraction is too hard to grasp for most people the division operator is introduced (non-associative). This needed the inclusion of operator associativity (division is left-associative in school algebra [other systems can define it differently, but its always defined]). Using multiplicative inverse we get:

4 * (1/1) * (1/5)

where order doesnt matter (remember, multiplication is associative).

Edit2:

The multiplicative inverse is defined as that element in a ring that when you multiply the inverse with the original that the result must be the neutral element regarding multiplication. The neutral element is that element that satisfies that being multiplied with anything will result in the same thing. The neutral element of the ring of rational numbers is 1.

So given an element of any ring q, its multiplicative inverse i and the neutral element regarding multiplication e the following must hold:

q * i = e

q * e = q

From this simple rule we define the division operator and it must follow the same behaviour.

• Isn't $1/x$ just notation for the multiplicative inverse of $x$, in which case it is just a tautology that the multiplicative inverse of $x$ is $1/x$? Perhaps I haven't thought about it enough, but doesn't that apply to the reals too? – Joel Bosveld Oct 22 '14 at 2:08
• There is an interesting alternative notation that $/z$ is used for the reciprocal of $z$, so $x/y$ means $x$ multiplied by $/y$ – user14972 Oct 22 '14 at 8:53
• @Taemyr I think Hurkyl's comment suggests one way to interpret $4/1/5$ into $4(1/1)(1/5)$ without explicitly assuming left- or right-associativity, by assuming that $/$ is a prefix operator with higher precedence than multiplication (represented by adjacency here and both left- and right-associative, since it's already an associative operator). – Mario Carneiro Oct 22 '14 at 23:57
• +1 for "convention voodoo" to describe the fabrications "educators" think they need to come up with to avoid teaching real concepts (like multiplicative inverse). – orome Oct 23 '14 at 2:03
• @Taemyr Daniel has correctly interpreted my statement. I mean that $/x$ is to be interpreted as a function of one argument, where the slash comes before the argument, and with value $\frac1x$. Indeed the operator comes before the argument, but since it is arity one there is only one argument after the slash. – Mario Carneiro Oct 24 '14 at 18:31

This isn't really a question of mathematics, but of communication. Some people here are quite sure how to interpret $4/1/5$ correctly, but they don't all agree. Importantly, if I read this expression, even if I know how to interpret it correctly, I don't know if the person writing it knew.

In other words, this kind of expression should be avoided. Either $(4/1)/5$ and $4/(1/5)$ are one hundred percent clear.

• It is not true that "Some people here are quite sure how to interpret 4/1/5 correctly, but they don't all agree", unless some statements arguing that it means --- and must mean --- 4/(1/5) have been deleted. All extant arguments that it has a single meaning also agree on the (4/1)/5 meaning. – Jonathan Cast Oct 21 '14 at 15:48
• Mathematica is quite sure what it means and disagrees. – gnasher729 Oct 21 '14 at 17:56
• Also, we have conventions about this literally to prevent disagreement and confusion. The fact that people still think it means different things only means that some of them are wrong. – imallett Oct 21 '14 at 18:23
• @gnasher729 have a source on that? I would bet big money that Mathematica either interprets 4/1/5 as (4/1)/5, or refuses to evaluate because some people find it confusing. mathworld.wolfram.com/Precedence.html the makers of Mathematica have this site that says they use PEMDAS. – Mooing Duck Oct 21 '14 at 23:06
• @MooingDuck It evaluates it as (4/1)/5 = 4/5. It's not ambiguous at all, multiplication and division are left-to-right associative. Period. If people find it confusing they need to either get comfortable with it or, preferably, use brackets to specify precedence manually. When we say 'ambiguous' we don't mean it's ambiguous with respect to the precedence rules (it is not in this case), just that we are not sure this is what the OP had in mind (we are humans, and humans will err) and don't want to provide help just to be told "oh, yeah, actually I meant <entirely different question>" – Thomas Oct 22 '14 at 0:21

The notation should not be allowed. You should always write $(4/1)/5$ or $4/(1/5)$ (or better, write the fraction vertically).

That being said, at least the way I was taught in school in the US, with no parentheses, you should perform divisions in the order written, so the answer is $4/5$.

Generally speaking, a slash '/' is used to state a denominator. So, by convention a/b/c/d/e... should in most cases be interpreted as a/(b*c*d*e...). However, the statement is inherently ambiguous and ill-advised. The reader will, in almost all cases (be they living or machine) be the ultimate decider as to what it means. Therefore, never use such an expression if its interpretation may not be clear (especially if you know a better way) unless correctly understanding is not important.

• I'm not sure that such a convention actually exists. There's a very strong convention that $a-b-c$ means $(a-b)-c$ but, in mathematics, I've never come across such a convention for division. $a/b/c$ is avoided precisely because it has no conventional meaning. (The syntax of any given programming language will specify what such an expression means but, still, a sensible programmer would insert parentheses to make the meaning of the code clear.) – David Richerby Oct 21 '14 at 12:43
• Mathematica uses $a/b/c=a/(bc)$, for example. – Hans Lundmark Oct 21 '14 at 14:23
• Just want to point out that '/' is not a backslash but rather it is just a slash. '\' is a backslash. – BeaumontTaz Oct 21 '14 at 15:17

It is a matter of notation convention. / is not really much of mathematical notation as it is a typewriter shorthand for a fraction.

But shorthands are not formalized as much as proper mathematical notation. As one interesting data point, see what the METAFONT program designed by none other than Donald Knuth does:

mf
This is METAFONT, Version 2.718281 (TeX Live 2013/Debian)
**\relax

*show 1/2/3/4;
>> 0.66667
*end
Transcript written on mfput.log.


So METAFONT indeed interprets this as (1/2)/(3/4). However, this high affinity for / only works for literal integers: x/y/w/t is interpreted as (((x/y)/w)/t) even when x=1, y=2, w=3, t=4.

Now this is a program written by a renowned mathematician. Morale? Don't rely on any specific interpretation by the reader when using / but rather parenthesize.

• What the hell? Who at Metafont thought that it would be a good idea to interpret $a/b/c/d$ as $(a/b)/(c/d)$? If anyone has info on why this is, I would really like to know how this happens. I'm not even sure how you could write a parser with this semantics - maybe $n/m$ where $n,m$ are integers is a native datatype? – Mario Carneiro Oct 23 '14 at 0:06

According to the international standard ISO 80000,

(…) a solidus (/) shall not be followed by a multiplication sign or a division sign on the same line unless parentheses are inserted to avoid any ambiguity.

$\frac{a/b}{c} = \frac{a}{bc} = ({a/b})/c = a/({bc})$, not $a/b/c$

$\frac{a}{bc} = a/({b \cdot c})$, not $a/b \cdot c$

$4\div1\div5=\dfrac45$, because division (using the division sign) is done from left to right.

$4/1/5$ is more ambiguous and confusing, and should never be written. But if I had to give it a value, I'd go with the above rule and say $\dfrac45$, too.

But writing (4/1)/5 or 4/(1/5) (depending on what you mean) is always preferable to 4/1/5 (unless you don't actually mean fractions—like, if you mean the date or something).

First you have to notice that you are dealing with notation. The problem is not about the meaning of the $/$ symbol. Nor about how to evaluate expressions. Here you are at the step when a sequence of symbols is given and should be interpreted to form a meaningful expression. Notice that while the commutative, distributive and associate laws are mathematical properties of the operations, the evaluation order has nothing to do with the operations involved.

You have three possibilities when parsing the string A/B/C:

1. the string should be interpreted as the expression $(A/B)/C$;
2. the string should be interpreted as the expression $A/(B/C)$;
3. the string is not well formed and should be left undefined.

The correct answer is 1. It is a natural convention to associate simbols on the left, following the order in which they are written. So this was recognized as the correct way to interpret this notation. As @hagenvonheitzen as pointed out, this is very natural if you replace division with subtraction... the use of the / symbol is a little bit less natural because we were used to other symbols when we were first taught division. Maybe A:B:C would be more natural. In the era of computers, the / symbol has been choosen for division in every programming language I know, like * has replaced $\times$. In every programming language the string 'A/B/C' is correctly interpreted from left to right. The shift from mathematics to informatics makes sense, since we are speaking of parsing which is a problem largely studied in this field.

About 2. To my knowledge there is nobody who has deliberately made this choice. This would be against intuition, against other convention and against the vast majority of people who as choosen the first interpretation. No way.

We can speak about 3. One could decide that A/B/C cannot be interpreted as a valid notation. Something like AB/C/. It seems that many people here agree with this answer. However think a bit about how to make it precise. If you make this choice, please tell me: what is the rule to follow to decide when the expression is valid and when it is not? Is such a rule easier to grasp than the rule of left associativity? Do you think that it would be good to teach such a rule at school? If you have common sense the answer should be: no.

Because here the point is not if you should or shouldn't use that expression. We all agree that whenever possible: you should'nt use it! The reason being that some people could interpret that notation in a wrong way. However if you are asked to give your interpretation, the answer is: associate from left to right.

addendum. A different story would be about the notation $A^{B^C}$ where most people agree that the better choice is to associate on the right: $A^{(B^C)}$. But also in this case it is good to make a choice and not let the notation be undefined.

addendum 2. A different story would also be the notation: $$\frac{A}{\frac{B}{C}}.$$ In this case the interpretation is $A/(B/C)$ because the lower bar is shorter than the upper one. For this notation it makes sense to decide that the bar should always be longer than the expressions to which it applies because it cost nothing (non parenthesis are needed) and gives no ambiguity. As a consequence an expression where the two bars have equal length should be rejected as undefined.

• Ironically, your notation AB/C/ is well-formed reverse polish notation for $(A/B)/C$. – Mario Carneiro Oct 23 '14 at 0:03

YouTube: The Order of Operations is Wrong

Take 8-2+1 for example. In reality, it actually equals (8/1)+(-2/1)+(1/1).

Applying the same logic to 4/1/5 you get:

 (4/1)/(1/1)/(5/1)
=(4/1)x(1/1)x(1/5)
=(4x1x1)/(1x1x5)
=4/5


With (P|B)EDMAS, 6/3/3 could be:

 6/(3/3)
=6/1
=6


or

 (6/3)/3
=2/3


whereas 6/3/3 actually equals

 (6/1)/(3/1)/(3/1)
=(6/1)x(1/3)x(1/3)
=(6x1x1)/(1x3x3)
=6/9
=2/3

• +0 This answer contributes nothing not already mentioned. As pointed out in John's answer, PEMDAS includes the specification that operations at the same level are left-associative, so 6/(3/3) is not a correct interpretation under those rules. – Mario Carneiro Oct 23 '14 at 0:10
• You won the bounty sir!! – It'sRainingMen Oct 30 '14 at 14:08
• @MarioCarneiro after looking through the other answers I a.) cannot see John's answer and b.) don't see where PEMDAS "includes the specification that operations ... are left associative". If anything, it separates multiplication from division (MD), and addition from subtraction (AS). If it were PEMDASL (L = left-associative) then you'd be correct, but it's not. PEMDAS provides no explanation why MD before AS, whereas if equations were represented as a combination of all 4 components as described in my answer (PEMA) then left-associativeness wouldn't be necessary – Isaac Oct 17 '16 at 22:02
• It's been so long since I wrote that that I'm not sure who John could be either. I don't see any deleted posts by a John, so he probably changed his username. Perhaps I meant @Lan? Regarding (b): I use the term PEMDAS to refer to the standard of order of operations for arithmetic, of which the acronym PEMDAS itself is only a mnemonic. The full specification will clarify that (MD) and (AS) are each on the same precedence level, left-assoc, while E is right-assoc (and P has no assoc). "There's no explanation" - it's a standard, not a justification. – Mario Carneiro Oct 18 '16 at 4:31
• this bandwagon is insane on math stack exchange – Isaac Nov 10 '16 at 23:10