# Order of operations and multiplication by juxtaposition

**URL:** <https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034>\
**Category:** Factual Questions\
**Created:** [June 13, 2012, 5:24pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034 "2012-06-13T17:24:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [June 13, 2012, 5:24pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/1 "2012-06-13T17:24:23Z")

</div>

As a kid I was taught that juxtapositional multiplication (i.e. 2x meaning 2 \* x, and (3-y)(4+2) meaning (3-y) \* (4+2)) takes precedence, in the order of operations, over other multiplications.

Is this a universally followed convention among mathematicians? If so, is this documented somewhere? If not, is _that_ documented somewhere?

---

<div class="post-metadata">

**Author:** ![Keeve](https://avatars.discourse-cdn.com/v4/letter/k/f07891/32.png) [@Keeve](https://boards.straightdope.com/u/Keeve)\
**Post date:** [June 13, 2012, 5:28pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/2 "2012-06-13T17:28:08Z")

</div>

I don’t recall ever hearing that rule.

I don’t recall ever hearing the phrase “juxtapositional multiplication” before.

Perhaps most important, I don’t think I’ve ever seen the two notations in the same place at the same time, such as “2x + 3\*y”.

---

<div class="post-metadata">

**Author:** ![KneadToKnow](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/kneadtoknow/32/3999_2.png) [@KneadToKnow](https://boards.straightdope.com/u/KneadToKnow)\
**Post date:** [June 13, 2012, 5:31pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/3 "2012-06-13T17:31:37Z")

</div>

3concur

---

<div class="post-metadata">

**Author:** ![Quartz](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/quartz/32/267_2.png) [@Quartz](https://boards.straightdope.com/u/Quartz)\
**Post date:** [June 13, 2012, 5:32pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/4 "2012-06-13T17:32:38Z")

</div>

> [@Frylock](#):
>
> As a kid I was taught that juxtapositional multiplication (i.e. 2x meaning 2 \* x, and (3-y)(4+2) meaning (3-y) \* (4+2)) takes precedence, in the order of operations, over other multiplications.

Multiplication is commutative so precedence over other multiplications doesn’t apply.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [June 13, 2012, 5:33pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/5 "2012-06-13T17:33:47Z")

</div>

[Another discussion along these lines.](http://boards.straightdope.com/sdmb/showthread.php?t=606537&highlight=legal+authority)

---

<div class="post-metadata">

**Author:** ![erislover](https://avatars.discourse-cdn.com/v4/letter/e/71e660/32.png) [@erislover](https://boards.straightdope.com/u/erislover)\
**Post date:** [June 13, 2012, 5:36pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/6 "2012-06-13T17:36:35Z")

</div>

> [@Quartz](#):
>
> Multiplication is commutative so precedence over other multiplications doesn’t apply.

I think you mean “associative” in this case. E.g. abc = (ab)c = a(bc). This is true of numbers and for instance matrices.

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [June 13, 2012, 5:46pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/7 "2012-06-13T17:46:54Z")

</div>

> [@Keeve](#):
>
> I don’t recall ever hearing that rule.
> 
> I don’t recall ever hearing the phrase “juxtapositional multiplication” before.
> 
> Perhaps most important, I don’t think I’ve ever seen the two notations in the same place at the same time, such as “2x + 3\*y”.

Well, though I said “other multiplications” I meant by that to include divisions. Sorry to have been so unclear about that!

The issue comes up when you’ve got a juxtapositional multiplication and a division in the same expression.

---

<div class="post-metadata">

**Author:** ![standingwave](https://avatars.discourse-cdn.com/v4/letter/s/9de0a6/32.png) [@standingwave](https://boards.straightdope.com/u/standingwave)\
**Post date:** [June 13, 2012, 6:19pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/8 "2012-06-13T18:19:27Z")

</div>

I found this…  
In a manuscript found buried in the earth near the village of Bakhshali, India, and dating to the eighth, ninth, or tenth century, multiplication is normally indicated by placing numbers side-by-side (Cajori vol. 1, page 78).

Multiplication by juxtaposition is also indicated in “some fifteenth-century manuscripts” (Cajori vol. 1, page 250). Juxtaposition was used by al-Qalasadi in the fifteenth century (Cajori vol. 1, page 230).

According to Lucas, Michael Stifel (1487 or 1486 - 1567) first showed multiplication by juxtaposition in 1544 in Arithmetica integra.

In 1553, Michael Stifel brought out a revised edition of Rudolff’s Coss, in which he showed multiplication by juxtaposition and repeating a letter to designate powers (Cajori vol. 1, pages 145-147).

[http://jeff560.tripod.com/operation.html](http://jeff560.tripod.com/operation.html)

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 13, 2012, 7:22pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/9 "2012-06-13T19:22:18Z")

</div>

This is not, at least, the convention followed by many calculators. One very common mistake I’ve seen undergrads make is to enter something like 1/2pi in their calculators, where they intended 1/(2pi), but which the calculator interprets as pi/2.

---

<div class="post-metadata">

**Author:** ![TriPolar](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tripolar/32/3008_2.png) [@TriPolar](https://boards.straightdope.com/u/TriPolar)\
**Post date:** [June 13, 2012, 7:35pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/10 "2012-06-13T19:35:27Z")

</div>

> [@Chronos](#):
>
> This is not, at least, the convention followed by many calculators. One very common mistake I’ve seen undergrads make is to enter something like 1/2pi in their calculators, where they intended 1/(2pi), but which the calculator interprets as pi/2.

This belongs in some thread about our educational system.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [June 13, 2012, 11:15pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/11 "2012-06-13T23:15:17Z")

</div>

Note this oddity: We may think that the notation: a / b  
is just a variant of:

```auto

a
b

```

but it’s not! As noted above, the horizontal bar for division serves also as a grouping symbol where / does not. Thus: a + b / c + d means: a + (b / c) + d whereas:

```auto

a + b
c + d

```

means (a + b) / (c + d)

Once upon a time, I wondered if the entirety of algebra could be re-cast in Polish notation, in which any expression is written out horizontally along one line of text. When I got to division, I began to realize that our customary vertical notation for division actually serves a useful and efficient purpose here.

Our current notation evolved for reasons. Writing expressions with mixed-up notations, or like that one in the other thread 6/2(1+2) is just asking for readers to get confuzled.

Math is a “language” as much as it is a science of numbers: You need to communicate your mathematical thoughts to others, usually in writing, and the mathematician needs to learn to write math so other readers can correctly know your thoughts, as well as read math to you can correctly know the thoughts of the writer. Math teachers need to emphasize this.

I cast my vote, here and also w.r.t. those earlier threads, with those who say the expression is ambiguous, and the writer has the initial responsibility to write expressions in a way that the reader can be expected to understand.

ETA: IOW, what **TriPolar** said just above.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 14, 2012, 12:28am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/12 "2012-06-14T00:28:01Z")

</div>

> [@](#):
>
> Once upon a time, I wondered if the entirety of algebra could be re-cast in Polish notation, in which any expression is written out horizontally along one line of text.

Well, it can. Your example would be “a b + c d + ÷” .

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [June 14, 2012, 1:12am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/13 "2012-06-14T01:12:03Z")

</div>

> [@Senegoid](#):
>
> Once upon a time, I wondered if the entirety of algebra could be re-cast in Polish notation, in which any expression is written out horizontally along one line of text.

Not only is this possible, but the algorithm for converting between the two notations is pretty close to trivial. I’ll let the thread think about it for a while.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [June 14, 2012, 3:28am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/14 "2012-06-14T03:28:36Z")

</div>

> [@Chronos](#):
>
> Well, it can. Your example would be “a b + c d + ÷” .

(And **ultrafilter** commented similarly.)

How really clear and practical would Polish be, though, for real live people to manipulate? Of course, computers handle that well. (They do floating-point ops in binary too.) Consider:  
a b c + \* b c + c d + \* /

How would you do algebra with this? Can you simplify it? There is a division operation in there somewhere. Is there a common factor in the numerator and denominator that you can “cancel”? How easily can you see that?

```auto

    a ( b + c )
-------------------
( b + c ) ( c + d )

Yes, there's a common factor. It reduces to a c d + / providing, of course,
that neither b c + 0 = nor c d + 0 =

```

What about equations like a(b+c) = ac + b ?  
In computers, = is an operator (either an assignment operator or a relational operator), but in algebra it’s just a state-of-being verb of equality. How should this equation be written in Polish? Would it be:  
a b c + \* = a c \* b + (with the = still between the two expressions) or should it be:  
a b c + \* a c \* b + = (with the = post-fixed) ?  
How easy would it be to do algebraic manipulations (like adding the same quantity to “both sides” or multiplying all terms by some factor)? I never really played with it enough to see if it would simply be a matter of “getting accustomed” to this notation for things like that. So it’s actually a somewhat open question in my mind. I kinda think our evolved notation facilitates manipulations like that, whereas Polish would tend to be awkward.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [June 14, 2012, 3:45am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/15 "2012-06-14T03:45:45Z")

</div>

In the above, I noted that: providing that neither b c + 0 = nor c d + 0 = (it’s inside the spoiler).

Perhaps that could be better written as: providing that b c + 0 ≠ and c d + 0 ≠  
Or would that be, b c + 0 ≠ c d + 0 ≠ ∧  
How far do you go with this?

Let a, b, c be three distinct real numbers such that a \< b \< c  
How do you write that in Polish? The statement is really an abbreviation of a \< b and b \< c  
So would it be: a b \< b c \< ∧

Multiplying all parts of the inequality by d gives: ad \< bd \< cd (if d \> 0).  
In Polish, that would be: a d \* b d \* \< b d \* c d \* \< ∧ (if d 0 \>) (I think.)  
If we did it all like this, would it be manageable?

---

<div class="post-metadata">

**Author:** ![Indistinguishable](https://avatars.discourse-cdn.com/v4/letter/i/90ced4/32.png) [@Indistinguishable](https://boards.straightdope.com/u/Indistinguishable)\
**Post date:** [June 14, 2012, 5:51am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/16 "2012-06-14T05:51:04Z")

</div>

> [@Chronos](#):
>
> Well, it can. Your example would be “a b + c d + ÷” .

Not that it matters, but that’s reverse Polish notation, while they asked for Polish notation…

But either way, to **Senegoid** : there’s no reason Polish (or reverse Polish) notation should be seen as this unwieldy, unintuitive system suitable for computers but not humans. Even humans are accustomed to writing f(x, y, z, …) for most functions; it’s just a few special ones they’ve chosen not to use this format for. Polish notation is what you get when you use this format for all functions [so, e.g., +(3, 4) instead of 3 + 4] and then get rid of the parentheses and commas [which are entirely redundant if one uses only operations of fixed arity].

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [June 14, 2012, 6:11am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/17 "2012-06-14T06:11:27Z")

</div>

I don’t know that I’d ever do algebra in [reverse] Polish notation, but it’s quite easy to use (easier, in fact, than “algebraic notation”) for calculations. Quite simply, what you do first is what you write first. In fact, a human doing calculations on something expressed in algebraic notation will generally start by converting it to something resembling Polish notation in their head, even if they don’t realize that’s what they’re doing.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [June 14, 2012, 6:16am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/18 "2012-06-14T06:16:37Z")

</div>

> [@ultrafilter](#):
>
> Not only is this possible, but the algorithm for converting between the two notations is pretty close to trivial. I’ll let the thread think about it for a while.

Build an expression tree\* and parse it in prefix order (i.e. the root before its left child before its right child)?

- Which I’m not going to explain how to do, but it’s not THAT hard, all things considered.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [June 14, 2012, 6:53am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/19 "2012-06-14T06:53:52Z")

</div>

> [@Chronos](#):
>
> I don’t know that I’d ever do algebra in [reverse] Polish notation, but it’s quite easy to use (easier, in fact, than “algebraic notation”) for calculations. Quite simply, what you do first is what you write first. In fact, a human doing calculations on something expressed in algebraic notation will generally start by converting it to something resembling Polish notation in their head, even if they don’t realize that’s what they’re doing.

Agree completely. No dispute, not for a μsec. I got my first taste of Polish notation (not reverse) as a young lad, when I had a set of WFF 'n PROOF cubies, and I picked up on it instantly (BNF-style definitions and all)! We’re talking some 5 years before I ever knew a thing about computers, some 15 years before the Apple ][ appeared! For doing calculations, Polish (or better still, reverse Polish, as it has turned out) is slick. But like you say here (apparently agreeing with me), it’s not clear that this works out neatly for doing algebra. (I consider it substantially irrelevant whether we’re talking about reverse or forward Polish, which is why I never mentioned that distinction.)

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [June 14, 2012, 7:01am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/20 "2012-06-14T07:01:56Z")

</div>

> [@Indistinguishable](#):
>
> Not that it matters, but that’s reverse Polish notation, while they asked for Polish notation…
> 
> But either way, to **Senegoid** : there’s no reason Polish (or reverse Polish) notation should be seen as this unwieldy, unintuitive system suitable for computers but not humans. Even humans are accustomed to writing f(x, y, z, …) for most functions; it’s just a few special ones they’ve chosen not to use this format for. Polish notation is what you get when you use this format for all functions [so, e.g., +(3, 4) instead of 3 + 4] and then get rid of the parentheses and commas [which are entirely redundant if one uses only operations of fixed arity].

As I mentioned to **Chronos** just above, I make no distinction between Polish and Reverse Polish for purposes of this discussion. But there must be some reason why the common operations are commonly written the way they are and not as +(3, 4) (yes, I’ve seen that notation too; for relational operators also, like \>(4, 3))

Parentheses may be entirely superfluous, but commas or some equivalent are still needed in some sense. If numbers can be multiple digits, or variables or functions can have multi-letter names, we would need to write something like this, where the blank spaces are significant markers:  
34 myvar + sqrt  
where the blank spaces separate the tokens. In RP calculators (like the HP ones), that is exactly the purpose of the Enter button – to mark the end of entering one number and the beginning of entering the next number.

[Next page](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034.md?page=2)
