1
$\begingroup$

Possible Duplicate:
Do values attached to integers have implicit parentheses?
What is 48÷2(9+3)?
What is “multiplication by juxtaposition”?

What is the precedence of the concatention operator when used for multiplication?

If it's the same as multiplication, 5/7y would mean (5/7)*y.

However, it also seems reasonable to see it as 5/(7*y).

I realize I can avoid the issue by writing "5y/7" or using explicit parentheses, but am curious about the "correct" answer.

Googling was surprisingly unhelpful: most results were about the precedence of string concatention in programming languages.

  • 1
    Duplicates: [here](http://math.stackexchange.com/questions/16502/do-values-attached-to-integers-have-implicit-parentheses), [here](http://math.stackexchange.com/questions/31881/implicit-multiplication-order-of-operation), and [here](http://math.stackexchange.com/questions/33215/what-is-48293)2012-08-26
  • 1
    You are right that it is confusing and should therefore be avoided. I suspect that most people who write it are thinking $5/(7y)$.2012-08-26
  • 1
    "When there's doubt on how it's seen in others' eyes\always remember to parenthesize!"2012-08-26
  • 0
    I guess the right term is *juxtaposition* rather than *concatenation*. See this question [What is “multiplication by juxtaposition”?](http://math.stackexchange.com/questions/33240/what-is-multiplication-by-juxtaposition)2012-08-26
  • 2
    PARI interprets 5/7*x as (5/7)x, just as a point of reference. I personally think the notation without parentheses is ambiguous and should be avoided.2012-08-26
  • 0
    @MichaelBoratko: I think this question is slightly different since we here have the symbol $/$ and not the other sign (that I don't know how to do in LaTeX).2012-08-26
  • 1
    @Thomas: If you don't know how to get a symbol in LaTeX, [Detexify](http://detexify.kirelabs.org/classify.html) is of great help. Assuming you meant the symbol $\div$, I've just used it to find that it is generated by the macro `\div`.2012-08-26
  • 0
    @Thomas The first question I linked to does use the $/$ symbol.2012-08-26
  • 0
    @MichaelBoratko: Fair enough.2012-08-26
  • 0
    No need to out quotes in the title, makes it harder to read.2012-08-26

2 Answers 2

2

I think that you almost answered your own question:

I realize I can avoid the issue by writing "5y/7" or using explicit parentheses.

I don't know of any "correct" way to interpret $5/7y$, and I don't believe that there is any. There are lots of notations in math that are not that clear, and the only answer is to make them clear. So I would never write $5/7y$ on a blackboard if I meant $5/(7y)$.

If you by $5/7y$ mean $5/7*y$, then from what I understand, when programming a compiler would interpret this as $5*y/7$.

  • 0
    Actually in the vast majority of programming languages, `5/7y` would simply be a syntax error, because multiplication needs generally be explicitly written with `*`. In C++11 it could, however, denote the division of the standard integer 5 by a user-defined numeric literal `7y` (which most likely will be the number 7 represented by an user-defined numeric type). Indeed, the only programming language I know where juxtaposition is interpreted as multiplication is Mathematica's; here indeed `5/7y` means $(5/7)y$.2012-08-26
  • 0
    @celtschk: You are right! I will edit2012-08-26
  • 0
    Speaking of Mathematica, IIRC [Singular](http://www.singular.uni-kl.de/) also interprets juxtaposition as multiplication.2012-08-26
1

I believe concatenation strictly applies to the joining of two strings together. I would imagine that extending this to mathematical operations there would be parenthesis around the objects in order to avoid ambiguity, ie $$ 5/7 * y/x $$ would yield $$\dfrac{5}{7}\cdot\dfrac{y}{x}$$