9
$\begingroup$

What are some real-life exceptions to the PEMDAS rule? I am looking for examples from "real" mathematical language --- conventions that are held in modern mathematics practice, such as those appearing in papers, books, and class notes, that are not covered (or contradicted) by PEMDAS. I am not interested in contrived examples, such as those constructed to confuse people on Facebook.

The PEMDAS convention says that order of operations are evaluated as:

  1. Parentheses

  2. Exponents

  3. Multiplication and Division, from left to right

  4. Addition and Subtraction, from left to right

So far I know of one exception: sometimes the placement of text indicates "implicit" parentheses: text that is a superscript, subscript, or above/below a fraction.

  • $2^{3 + 5}$

    Here, $3 + 5$ is evaluated before the exponentiation

  • $\frac{3+5}{2}$

    Here, $3 + 5$ is evaluated before the division

Are there other exceptions?

$\endgroup$
15
  • 12
    $\begingroup$ It is pretty common to see things like $1/2m$ where the audience is expected to understand $\frac{1}{2m}$. Try a physics book from the typewriter age. $\endgroup$
    – Adam
    Commented May 16, 2019 at 14:44
  • 5
    $\begingroup$ Part of truly understanding PEMDAS is realizing when parentheses might be implicit, in the notation used. See for example my comments below Ben's answer. $\endgroup$
    – amWhy
    Commented May 16, 2019 at 18:11
  • 6
    $\begingroup$ As far as I can tell, your exceptions are indeed not covered by the PEMDAS convention. The comment by @Namaste explains correctly how one could insert parentheses into these examples so that they would be covered by PEMDAS, but the conventions for inserting those parentheses are themselves additional conventions going beyond PEMDAS. $\endgroup$ Commented May 16, 2019 at 21:07
  • 12
    $\begingroup$ Typically, when I teach order of operations, I use the phrase "GEMDAS," where the "G" stands for "grouping symbols" or "groups". In both of the cited examples, $3+5$ are groups (in the exponential, they are grouped by size, in the fraction they are grouped by geography). If you insist on "PEMDAS" and further insist that "P" stands for "parenthses" and nothing else, then you get exceptions, I suppose. But I think that rather emphasizes the letter of the law over the spirit. $\endgroup$
    – Xander Henderson
    Commented May 17, 2019 at 12:35
  • 10
    $\begingroup$ PEMDAS, SHMEMDAS, all these abbreviations are evil. $\endgroup$
    – Rusty Core
    Commented May 23, 2019 at 20:25

5 Answers 5

16
$\begingroup$

The examples you give aren't exceptions. The parentheses aren't needed because there is no other way to interpret the expressions.

In applications in engineering and the physical sciences, variables have units associated with them, and the units often disambiguate the expression without the need for parentheses. For example, if $\omega$ has units of radians per second, and $t$ has units of seconds, then $\sin\omega t$ has to be interpreted as $\sin(\omega t)$, not as $(\sin\omega) t$, because the sine function requires a unitless input. Omitting the parentheses is preferable in examples like these because it simplifies the appearance of expressions and makes them easier to parse.

Similarly, if a force $F$ acts on an object of mass $m$ for a time $t$, then, starting from rest, the object is displaced by $Ft^2/2m$. This can only be interpreted as $(Ft^2)/(2m)$, because otherwise the units wouldn't come out to be units of distance. Examples like this aren't just typewriter usages. Built-up fractions that occur inline in a paragraph of text are awkward typographically: $\frac{Ft^2}{2m}$. They either have to be written very small, which makes them hard to read, or they force the spacing of the lines to be uneven, which looks ugly.

These are examples involving physics and units, but more generally, when people read mathematics, they apply their understanding of the content, which could be economics or number theory. People are not computers. Mathematical notation is a human language written for humans to read. Human languages are ambiguous, and that's a good thing. When we don't require all ambiguities to be explicitly resolved, it helps with concision and expressiveness.

Besides the meaning, another factor that resolves ambiguities and allows concise and readable notation is that we have certain conventions that we follow, such as the convention that tells us to write $2x$ rather than $x2$. If someone means $(\sin x)(y)$, then they'll write it as $y\sin x$, not $\sin xy$. There is also a convention that if we have a long chain of multiplications and divisions, such as $abcdefgh/ijklm$, we put all the multiplicative factors to the left of the slash, and then it's understood that we mean $abcdefgh/(ijklm)$. We wouldn't write this as $a/ibc/j/kdef/lgh/m$, which would be extremely difficult to read. We wouldn't interpret $abcdefgh/ijklm$ as $(abcdefgh/i)jklm$, because if that had been the intended meaning, it would have been written like $abcdefghjklm/i$.

$\endgroup$
8
  • $\begingroup$ The "parentheses" rule that I was taught does not mention implicit groupings of the things in the expression based on placement. What do you mean "there is no other way"? That's clearly not true. I could interpret $2^{3+4}$ as $(2^3)^{+4}$. The point is that there are implicit parentheses. To be accurate, the rule should say that P means "parentheses and implicit groupings" $\endgroup$ Commented May 16, 2019 at 16:30
  • 1
    $\begingroup$ 6005 whenever you see $\frac{\text{numerator-stuff}}{\text{denominator-stuff}}$, we are expected to compute or simplify "numerator-stuff", and do the same for "denominator-stuff". So $\frac{a+b}{c+d} = (a+b)/(c+d)$. Don't mistake the fraction for meaning $a + b/c+ d = a +\frac bc + d$. Think: All of the numerator, divided by all of the denominator. $\endgroup$
    – amWhy
    Commented May 16, 2019 at 16:42
  • 3
    $\begingroup$ Just as evaluating $2^{\text{exponent}}$ means "raise $2$ to the power of all of the exponent," so that $2^{a+b} = 2^{\text{sum of a + b}}$, which is exactly the same as $2^{(a+b)}$. $\endgroup$
    – amWhy
    Commented May 16, 2019 at 16:50
  • 3
    $\begingroup$ I don't entirely disagree with your assertion that $\sin \omega t$ looks better on the page (it is a little less "heavy", which offers mild improvement, I guess), but I disagree with your assertion that $\sin \omega t$ is easier to parse than $\sin(\omega t)$. I find the version with parentheses much easier to read. On the other hand, I don't know much of anything about physics, so my opinion might not be worth much. :P $\endgroup$
    – Xander Henderson
    Commented May 17, 2019 at 12:39
  • 6
    $\begingroup$ @RustyCore Yes. I find it much easier to parse the expression with parentheses. I also write it with \sin and \cos. :P $\endgroup$
    – Xander Henderson
    Commented May 17, 2019 at 17:02
11
$\begingroup$

Briefly: The thing the OP seems to be orbiting around is that some mathematical symbols, in addition to indicating a given operation, also have the secondary function of serving as "grouping" symbols. These symbols chunk sub-expressions together, in the same way that parentheses do, without extra notation. That is: parentheses are just one type of grouping symbol. None of these are exceptions to the standard precedence syntax. Examples include:

  • Fraction bars
  • Radical overbars
  • Absolute value bars
  • Superscripts and subscripts
$\endgroup$
8
$\begingroup$

That's a good question. In addition to PEMDAS there's grouped symbols; they occur under a radical ($\sqrt{~}$, $\sqrt[n]{~}$), in the numerator and denominator of a fraction and in exponents. These grouped symbols are treated as if they are between parenthesis. That means that the expressions $a^{\text{expression}}$, $\sqrt[n]{\text{expression}}$ and $\dfrac{\text{expression}_1}{\text{expression}_2}$ mean $a^{(\text{expression})}$, $\sqrt[n]{(\text{expression})}$ and $\dfrac{(\text{expression}_1)}{(\text{expression}_2)}$.

The horizontal fractional line and the vinculum of the radical act as symbols of grouping. That's why we write $\sqrt{\text{expression}}$ instead of $\sqrt{~}(\text{expression})$ and $\dfrac{\text{expression}_1}{\text{expression}_2}$ instead of $(\text{expression}_1)/(\text{expression}_2)$. The exponent, written in superscript, is also a grouped symbol, so we write $a^{\text{expression}}$ instead of $a\wedge(\text{expression})$.

Other functions use parentheses around the input to avoid ambiguity. The parentheses are sometimes omitted if the input is a monomial. That doesn't have anything to do with units. Thus $\sin 2x$ means $\sin (2x)$ but $\sin a+b$ means $\sin (a)+b$. Personally I prefer to write the parenthesis even around a monomial like $\ln (5x)$.

What does $a/bc$ means? Is it $\dfrac{a}{bc}$ or $\dfrac{a}{b}c$ ? We could argue which convention we like but the matter of fact is that different people have different convention and different softwares have different conventions. For example $18/2\times 3$ gives $27$ on wolframalpha but $a/bc$ gives $3$ when $a=18$, $b=2$ and $c=3$. The same software has two conventions for the same expression! That's why I always prefer to write $\dfrac{a}{b}$, $\sqrt{a}$ and $a^b$ instead of $a/b$, $\sqrt{}a$ and $a\wedge b$. They don't cause any ambiguity. The same issue is present with $\sin ab$ which WA interprets as $b\sin a$ or $\sin (ab)$.

$\endgroup$
2
  • 1
    $\begingroup$ The wolfram alpha examples are interesting, but the difference in parsing seems to be due to spacing, not due to plugging in values for a, b, and c. Note that a/bc groups $b$ and $c$ together, but a/b*c and a / b c do not. Similarly for the other example, sin ab is interpreted as $\sin(ab)$ but sin a b is interpreted as $(\sin a) \cdot b$. $\endgroup$ Commented May 18, 2019 at 13:45
  • $\begingroup$ @6005 Well $bc=b*c$. It should be the same. The different results WA gives, whether because of different conventions or different spacing, are a reason to not use these operators without parenthesis (at least for me). $\endgroup$
    – user5402
    Commented May 19, 2019 at 12:39
5
$\begingroup$

I would add the following to Paracosmiste's reply:

Numerical negation (e.g. the '$-$' sign in in the expression $-x^2$) usually has an order of precedence that is less than that of exponentiation and greater than that of multiplication, division, addition and subtraction in order from right to left. So we have $-x^2=-(x^2)$. And $--x = -(-x))$. And $x+-y= x+(-y)$.

When exponentiation is printed using different levels of typeface (e.g. $x^{y^z}$) then they are done in order from right to left. So we have $x^{y^z}=x^{(y^z)}$ If, on the other hand, it is printed using the '^' symbol (or '$**$') as in many programming languages (e.g. $x$^$y$^$z$ or x$**$y$**$z), they are usually done in order from left to right. So we have $x$^$y$^$z = ((x$^$y)$^$z)$

$\endgroup$
2
-4
$\begingroup$

As a parent of a middle schooler, I can attest that PEMDAS can be problematic. Here's a simple equation as an exception to PEMDAS (not GEMDAS):

3+3+3+3x0=?

If you multiply as the first order of operation according to PEMDAS rules, then the equation would process like this (3+3+3+(3x0)) – since multiplication and division precede addition and subtraction – giving you an answer of 9.

If you group the numbers being added first before multiplying, then the equation would process like this ((3+3+3+3)x0) giving you the answer of 0.

I stand by 0. Or am I missing something? My MS student would like to believe the latter ;-)

$\endgroup$
2
  • 3
    $\begingroup$ Honestly, it seems like you are asking a new question, rather than providing an answer to an older question. That being said, there is nothing sacred about GEMDAS (or PEMDAS, or BEMDAS, or however you refer to the order of operations). It is a convention which we have adopted in order to obtain consistent results. In the case of $3+3+3+3\times 0$, the convention is the multiply $3\times 0$ first, reducing the expression to $3+3+3+0$, which $9$. Of course, it is not so much that $0$ is wrong, as it is not what the vast majority of folk would expect. $\endgroup$
    – Xander Henderson
    Commented Jul 11, 2023 at 22:43
  • $\begingroup$ @XanderHenderson thank you for the clarification. I'd posed the problem thinking that it was an exception but now understand that it's possible to apply multiple orders of operations to a given equation and yield different, yet not incorrect answers. In the 1970's, I was taught that when no parentheses clearly defined the order of operations for a problem, grouping (GEMDAS) was the proper order of operation to follow. Thank you for clarifying for me and my middle shcooler what the current majority consensus is! $\endgroup$
    – Dad-Math
    Commented Jul 13, 2023 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.