1

What's the correct way to do division using a slash? If I write $a/bc + d$, will that be equal to $(a/(bc))+d$?

Basically, if I place a slash, will I divide by what's directly behind the slash $(b)$, the term that's behind the slash $(bc)$, or everything after the slash $(bc+d)$?

Jeroen
  • 127
  • 6
    Upshot: Don't do it unless you have no choice. The inherent ambiguity means that any text that uses "the slash" will either have to use more parentheses than otherwise necessary, or will have to develop a convention specific to that text for how it should be read. – Cameron Buie Jan 15 '14 at 14:23
  • 2
    Where does $d$ come from? – mathlove Jan 15 '14 at 14:25
  • @CameronBuie I figured that out, but I'm still curious to how it should be read. – Jeroen Jan 15 '14 at 14:40
  • 1
    Well, the typical convention is that $a/bc=a/(bc)$ and $a/b\cdot c=(a/b)c$. But I would rely on it. – yo' Jan 15 '14 at 14:54
  • 1
    Anyway, slash, not backslash. – MattAllegro Apr 11 '20 at 14:11

4 Answers4

4

We use the order of operations:

  1. parentheses/brackets

  2. exponents

  3. division, multiplication applied left to right

  4. addition, subtraction applied left to right

$$a/bc = \frac ab \cdot c$$

Since division and multiplication have equal precedence, we apply division only for $a/b$, then multiply by $c$.


Since parentheses have highest precedence, we compute, first, $bc$, then divide $a$ by $(bc)$.

$$a/(bc) = \frac a{bc}$$


$$a/bc + d = \frac ab \cdot c + d$$ $$a/(bc) + d = (a/(bc)) + d = \frac a{bc} + d$$

$$a/(bc + d) = \dfrac{a}{(bc) + d}$$

When in doubt, use parentheses! The few extra keystrokes it takes makes certain how the expression is to be evaluated is worth sparing you from ambiguity or unintended calculations, etc.

amWhy
  • 209,954
  • So 11Ω = 100W/3.0²A² would be incorrect? – Jeroen Jan 15 '14 at 14:29
  • 1
    If you mean to divide $100W$ by $3.0^2A^2$, then yes, that would be incorrect. (In that case, you'd want to use $$100W/(3.0^2A^2)$$ What you've written is $(100W$ divided by $3.0^2)$ all multiplied by $A^2$. – amWhy Jan 15 '14 at 14:33
  • 1
    @amWhy: I think you're wrong on this count. But let's be sure to distinguish between how computer languages may interpret an expression, and what commonly accepted notation means. The whole problem is that, yes, there is ambiguity in the notation. But nobody would ever take $1/2x$ to mean $\frac{1}{2}x$ instead of $\frac{1}{2x}$. For that, you must explicitly write $(1/2)x$. – MPW Jan 15 '14 at 14:41
  • I should add that this is a purely typographical problem. – MPW Jan 15 '14 at 14:42
  • 1
    You're wrong, @MPW. $1/2 x = \frac 12 x$, and that's how most of us would see it. – amWhy Jan 15 '14 at 14:50
  • I would be very interested to see an example of that, because last time I looked for one, I cpuld not find any. I can produce examples of published math texts that use $1/2\pi$ to mean $\frac1{2\pi}$ and not $\frac\pi 2$, which is an example contrary to your claim. – MJD Jan 15 '14 at 17:16
  • 1
    @MJD: In fact, it seems to me that when $a=1$, then $\frac 1{bc}$ is usually intended. Maybe because it is easy to change it to $\frac cb$ if not. But of course $4/3 \pi$ must be $\frac 43 \pi$ and $3/2 (x+1)$ could easily go either way. This is why I rag on parentheses a lot. – Ross Millikan Jan 15 '14 at 17:23
  • I am not trying to make an argument. I just want to see an example because I am trying to study the question. I would be very interested to see an example of $4/3\pi$ used to mean $\frac43\pi$. Do you have one ready to hand? – MJD Jan 15 '14 at 17:25
  • 1
    The notation is inherently ambiguous. Parenthesize, parenthesize! – Lubin Jan 15 '14 at 17:28
  • I think that as a group we are pointing up something significant here: it is ambiguous; we seem to agree on that. And I will yield a little and admit that I myself use it both ways as MJD and Ross Millikan suggest, making peace with @amWhy I hope. Yep--the cure is a nice juicy pair of parentheses. – MPW Jan 15 '14 at 17:39
3

It is a long-standing convention of mathematics that $a/bc$ means $a/(bc).$ By reducing the clutter of parentheses, this convention, along with writing $\sin 2x$ rather than $\sin(2x)$ and so on, makes mathematics more readable for humans. However, spacing is important here, and you need to check that the LaTeX output is right in this respect if you use these conventions. For example, $a\!/\!b\,c$ suggests $(a/b)c$ rather than $a/bc$. Notice that, in this simple example as in other cases, the default settings of LaTeX respect the conventions, as Donald Knuth doubtless intended.

Quite the opposite is the case for computers. They need to parse their input strings character by character, and are unfazed by unnecessarily cluttered notation.

In real-life mathematics, a fine balance has to be struck. Too much emphasis on ever-present nailing down of meaning in notation will daunt and slow the reader (perhaps to a grinding halt), while eloquently spare notation may baffle the reader as to what interpretation is intended.

John Bentin
  • 18,454
  • 2
    By $\sin 2x$, I presume you don't mean $s\cdot i \cdot n \cdot 2 \cdot x$. :P – MPW Jan 15 '14 at 17:49
  • 2
    And yes, haven't we all seen desperate students solve $\sin x = 0.5$ by writing $x = \frac{0.5}{\sin}$ ? – MPW Jan 15 '14 at 17:51
  • !long-standing convention of mathematics that a/bc means a/(bc)": I agree with you, and see it in my field (medical/public health/epidemiology). But I am intrigued by this statement: would you have literature or other material that you could provide a link to or reference? thank you – Abdul-Kareem Abdul-Rahman Nov 15 '20 at 19:20
2

Use parentheses. Often it is clear what is meant, but not always. Computer languages I know are explicit that $a/b*c=(a/b)c$ . Definitely the $+d$ gets added at the end.

Ross Millikan
  • 374,822
  • In programming there would be the extra '*' though. – Jeroen Jan 15 '14 at 14:27
  • 2
    @JeroenBollen Not always, e.g. in Mathematica you may just have a space instead of *. – Ruslan Jan 15 '14 at 14:32
  • 2
    $(a/b)c$, actually. That's often different from $(ac)/b$ – Daniel Fischer Jan 15 '14 at 14:33
  • 3
    If I recall correctly, on the TI-82 calculator, a/bc evaluates to $(a/b)\cdot c$, whereas on the TI-83 calculator, it evaluates to $a/(b\cdot c)$. – Samuel Jan 15 '14 at 14:34
  • @Ruslan Sorry, did not know that. – Jeroen Jan 15 '14 at 14:56
  • 1
    I am not aware of any computer language that allows one to abut $b$ and $c$, as in your example, with no intervening multiplication sign. What languages do you know that do this? – MJD Jan 15 '14 at 17:18
  • @MJD: True, though Mathematica lets it be a space. I put in a multiply. – Ross Millikan Jan 15 '14 at 17:20
  • To add to this, programming languages also cannot do the implicit multiplication in (a/b)c, nor the reverse c(a/b). Your tools, whether computer or calculator, are only as good as your input. –  Aug 02 '19 at 22:07
1

It's not often taught but there's a usage difference between "a ÷ b" and "a / b". This usage difference is the source of the complaints about how PE(MD)(AS) is applied. When "÷" is used, PE(MD)(AS) works exactly as it is taught in school. No parenthesis necessary. The "÷" is just a simple binary division operator, accepting only the terms to the immediate left and right of the symbol. On the other hand "/" is a bit different.

Unlike "÷", "/" is used for linear fraction notation. As such, where a+b÷c-d is processed as a+(b÷c)-d, a+b/c+d is processed as (a+b)÷(c-d), treating everything left of the "/" as a numerator and everything right as a denominator. While this difference isn't officially documented anywhere, this is precisely how it is used in the vast majority of scientific and mathematical papers.

In general, it's always better to just use parenthesis to clarify the intent when it comes to division.

Arkain
  • 111