# Evaluating -3^2

**URL:** <https://boards.straightdope.com/t/evaluating-3-2/147249>\
**Category:** Factual Questions\
**Created:** [January 8, 2003, 4:21am UTC](https://boards.straightdope.com/t/evaluating-3-2/147249 "2003-01-08T04:21:58Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [January 8, 2003, 6:05pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/41 "2003-01-08T18:05:15Z")

</div>

> [@](#):
>
> \*Originally posted by ZenBeam \*  
> It’s because the minus sign feels like a part of the number, right up there with the decimal point, and not like an operator at all.

I think that you really think of the minus sign as a very high-precedence operator. Almost, but not really the same as a decimal point. Does the following expression mean anything to you?

-(3 + 2)

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [January 8, 2003, 6:28pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/42 "2003-01-08T18:28:05Z")

</div>

No, I meant what I wrote. I don’t see why that’s hard to understand.

---

<div class="post-metadata">

**Author:** ![William\_Ashbless](https://avatars.discourse-cdn.com/v4/letter/w/a87d85/32.png) [@William\_Ashbless](https://boards.straightdope.com/u/William_Ashbless)\
**Post date:** [January 8, 2003, 6:28pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/43 "2003-01-08T18:28:21Z")

</div>

ZenBeam, that is a particularly beautiful quote from the math site. Obviously this is a thorny problem…

Its interesting to note that as long as you don’t have exponentiation involved, whether the unary minus is an operator or ‘feels like part of a number’ may not matter. This has already been addressed:

-3 + -5  
3 + -5  
3 - 5  
3 - -5

-3 \* -5  
3 \* -5  
3 \* 5  
3 \* -5

All of these are easy to interpret, regardless of how you look at them, based on the ‘look and feel’ of the unary minus. If you don’t use exponentials that often, it would never come up. In arbitrary expressions, though, we have to be more rigorous, and define exactly _when_ the unary minus applies, which appears to be at the same level as multiplication, as if multiplied on the left by -1, but only by convention.

It could be done with unary negation being very high precedence, so high that only parentheses override it, and we’d just do all our math that way. 🙂

---

<div class="post-metadata">

**Author:** ![William\_Ashbless](https://avatars.discourse-cdn.com/v4/letter/w/a87d85/32.png) [@William\_Ashbless](https://boards.straightdope.com/u/William_Ashbless)\
**Post date:** [January 8, 2003, 6:31pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/44 "2003-01-08T18:31:36Z")

</div>

ZenBeam, in my lengthy paragraph, I note something… that if you consider the negative sign to be a ‘part of the number’, this is absolutely analagous to it being an operator that has extremely high precedence.

This is, in the end, just an operator precedence problem, however you word it or think about it.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [January 8, 2003, 6:50pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/45 "2003-01-08T18:50:39Z")

</div>

Well, **ZenBeam** , my point is this: Exactly what number is the negative sign a part of in the expression -(3 + 2)?

---

<div class="post-metadata">

**Author:** ![Terminus\_Est](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/terminus_est/32/3087_2.png) [@Terminus\_Est](https://boards.straightdope.com/u/Terminus_Est)\
**Post date:** [January 8, 2003, 6:52pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/46 "2003-01-08T18:52:16Z")

</div>

My question regarding x[sup]2[/sup] where x=-3 was somewhat facetious. Why is it that x[sup]2[/sup]=9 when -3[sup]2[/sup]=-9? Because there is an implicit parenthesis around the x, such that x[sup]2[/sup]=(x)[sup]2[/sup]. Where is the implicit parenthesis in -3[sup]2[/sup]? Does it mean “the square of minus 3” (-3)[sup]2[/sup] or “minus 3, squared” -(3[sup]2[/sup])? It appears that the convention is the latter, which strikes some (including me) as counter-intuitive.

---

<div class="post-metadata">

**Author:** ![Terminus\_Est](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/terminus_est/32/3087_2.png) [@Terminus\_Est](https://boards.straightdope.com/u/Terminus_Est)\
**Post date:** [January 8, 2003, 6:58pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/47 "2003-01-08T18:58:42Z")

</div>

Whoops, that last one should be “minus 3-squared” -(3[sup]2[/sup]).

---

<div class="post-metadata">

**Author:** ![RM\_Mentock](https://avatars.discourse-cdn.com/v4/letter/r/e274bd/32.png) [@RM\_Mentock](https://boards.straightdope.com/u/RM_Mentock)\
**Post date:** [January 8, 2003, 6:59pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/48 "2003-01-08T18:59:44Z")

</div>

Implicit parentheses? Implicit?? We’re talking math here, no? Or at least computer programming.

I think the previous comments about the meaning of -x^2 as in the equation -x^2 + 2x - 4 = 0 is instructive.

I’ll just add that -3^2 is -9 in Mathematica.

---

<div class="post-metadata">

**Author:** ![Zagadka](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/zagadka/32/7272_2.png) [@Zagadka](https://boards.straightdope.com/u/Zagadka)\
**Post date:** [January 8, 2003, 7:00pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/49 "2003-01-08T19:00:06Z")

</div>

Oh, right, that’s why I hate math so much.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [January 8, 2003, 7:04pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/50 "2003-01-08T19:04:49Z")

</div>

Okay, I think I see what **ZenBeam** was saying. Some people probably think of the negative sign in -3 as different from that in -x. The first is part of the number, and the second is an operator. This strikes me as, well, confusing, which is what made it hard for me to understand. I suppose that it’s a reasonable convention, though, if not the one that’s most commonly used.

---

<div class="post-metadata">

**Author:** ![astro](https://avatars.discourse-cdn.com/v4/letter/a/9dc877/32.png) [@astro](https://boards.straightdope.com/u/astro)\
**Post date:** [January 8, 2003, 7:19pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/51 "2003-01-08T19:19:36Z")

</div>

I’m saving this thread for the next time somone proposes a society led by the people that would score highest on an IQ test. 😃

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [January 8, 2003, 7:21pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/52 "2003-01-08T19:21:38Z")

</div>

> [@](#):
>
> Exactly what number is the negative sign a part of in the expression -(3 + 2)?

It’s not part of a number at all, it’s the unary negation operator.

I feel I better be clear here: I’m not saying the minus sign in -3 _is_ part of the number, since by convention it apparently isn’t (based on the various links posted). It would be _possible_ for convention to distinguish between binary nagation operators, unary negation operators, and negative signs that are part of a number, but the negative sign in the quote would still be the unary negation operator. In fact, I think this would be the most precise convention if you were talking about programming languages, where you have unary and binary negation operators, but also sign bits for each number as they are stored.

---

<div class="post-metadata">

**Author:** ![Achernar](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@Achernar](https://boards.straightdope.com/u/Achernar)\
**Post date:** [January 8, 2003, 7:34pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/53 "2003-01-08T19:34:53Z")

</div>

That makes sense. I suppose it would be convenient if we had a way of expressing negative numbers that did not look so similar to unary negation.

---

<div class="post-metadata">

**Author:** ![William\_Ashbless](https://avatars.discourse-cdn.com/v4/letter/w/a87d85/32.png) [@William\_Ashbless](https://boards.straightdope.com/u/William_Ashbless)\
**Post date:** [January 8, 2003, 8:01pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/54 "2003-01-08T20:01:56Z")

</div>

We don’t, sadly… so we’re stuck with the symbology of (-3) to represent it. All in all, though, two extra symbols aren’t really going to kill our typing or writing fingers. 😕 😃

---

<div class="post-metadata">

**Author:** ![raygirvan](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@raygirvan](https://boards.straightdope.com/u/raygirvan)\
**Post date:** [January 8, 2003, 8:22pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/55 "2003-01-08T20:22:24Z")

</div>

\*astro  
I’m saving this thread for the next time somone proposes a society led by the people that would score highest on an IQ test. \*

Maybe. But the only confusion I can see here is from non-mathematicians disputing a straight answer from people who actually use mathematics. By long-standing convention “-3^2” is parsed as “-(3^2)”, that is, -9. There should no reason for question this, except to ask for citations to show that it is the convention, which have been provided (for instance, BODMAS, and also that the major math packages Mathcad, Mathematica and Maple all parse it this way). There may be grounds for philosophical debate about whether it was the most logical convention to adopt. But that doesn’t alter the fact that it _was_ adopted, and is the one universally used by mathematicians and those who implement systems based on math.

---

<div class="post-metadata">

**Author:** ![Phlint](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@Phlint](https://boards.straightdope.com/u/Phlint)\
**Post date:** [January 8, 2003, 10:38pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/56 "2003-01-08T22:38:42Z")

</div>

> [@](#):
>
> _Originally posted by Achernar_  
> **Phlint, if you’re still reading this**

Yep, I’m still reading, and thanks again for all of the responses.

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [January 8, 2003, 10:48pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/57 "2003-01-08T22:48:19Z")

</div>

Well, I am a mathematician. And I say that - is an operator (both unary and binary) and it has, by standard convention, lower precedence than either multiplication or exponentiation. Someone above wrote 3 + -5. No mathematician would write that. It is 3 + (-5), which is -2. No mathematician would write 3 \* -5 either. Although it is not ambiguous exactly, just poor form. Write 3 \* (-5) instead. Anyway, -3^2 = -9 and that is all there is to it. And if you want to substitute x = -3 in x^2, you get (-3)^2 and if you don’t like that, too bad. Actually, when you get very careful you realize that you should write (x)^2, but almost no one does.

If you aren’t taught these conventions explicitly (and I wasn’t and was quite surprised when my children learned some rule called BOMDAS, which is a mnemonic whose meaning I don’t quite recall), then you pick them up in the same way you learn the grammar of your native language. It is quite a revelation to read this thread and see how much confusion there is out there.

---

<div class="post-metadata">

**Author:** ![ZenBeam](https://avatars.discourse-cdn.com/v4/letter/z/3ab097/32.png) [@ZenBeam](https://boards.straightdope.com/u/ZenBeam)\
**Post date:** [January 8, 2003, 11:02pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/58 "2003-01-08T23:02:54Z")

</div>

> [@](#):
>
> If you aren’t taught these conventions explicitly (and I wasn’t and was quite surprised when my children learned some rule called BOMDAS, which is a mnemonic whose meaning I don’t quite recall), then you pick them up in the same way you learn the grammar of your native language. It is quite a revelation to read this thread and see how much confusion there is out there.

At the beginning of the year in eighth grade algebra, the teacher wrote out something along the lines of

2 - 3 \* 4 + 5 = ?

and had us all write what we thought the answer was as a way of introducing operator precedence. Around half of us got it wrong. (I _think_ I was in the wrong half, but I’m not really sure.) This class was full of the people who tested well enough to get into the class (algebra for everyone else didn’t start until high school) so this was already the “top” students, in some sense.

---

<div class="post-metadata">

**Author:** ![Mighty\_Maximino](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@Mighty\_Maximino](https://boards.straightdope.com/u/Mighty_Maximino)\
**Post date:** [January 8, 2003, 11:03pm UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/59 "2003-01-08T23:03:58Z")

</div>

> [@](#):
>
> \*It is quite a revelation to read this thread and see how much confusion there is out there. \*\*

In that case, you should sign up to volunteer at Dr. Math and you’ll be further . . . um, revelated. There are some pretty amazing questions that come through there (of both the elegant and the inane variety – kind of like the SDMB really).

This is a great thread. Way to fight syntactical ignorance!

---

<div class="post-metadata">

**Author:** ![raygirvan](https://avatars.discourse-cdn.com/v4/letter/r/ac91a4/32.png) [@raygirvan](https://boards.straightdope.com/u/raygirvan)\
**Post date:** [January 9, 2003, 2:48am UTC](https://boards.straightdope.com/t/evaluating-3-2/147249/60 "2003-01-09T02:48:21Z")

</div>

_Hari Seldon  
just poor form_

That, perhaps, is the problem. There is a subtlety to form that’s not taught explicitly. Personally, I’d consider as poor form most textbook examples - including this contentious “-3^2” - that can only be unravelled by operator precedence. Mathematicians just wouldn’t write expressions such as “2 - 3 \* 4 + 5” but use grouping and spacing to make the precedence clear: “2 - 3\*4 + 5”

[Previous page](https://boards.straightdope.com/t/evaluating-3-2/147249.md?page=2)

[Next page](https://boards.straightdope.com/t/evaluating-3-2/147249.md?page=4)
