29

A friend is taking a college algebra class and they are teaching him that

$$-3^2 = -9$$

Their explanation is:

$$-3^2 = -(3^2) = -9.$$

It has been a long time for me but I thought that in the absence of any parenthesis that:

$$-3^2 = (-3) \times (-3) = 9.$$

They are even contradicting themselves because they teach the odd/even shortcut for exponents in another part of the book. i.e.:

if the exponent is even, the result it positive, and if
 the exponent is odd the result is negative. 

This is an actual picture of the book where they contradict themselves on the $-3^2 = -9$:

table from math book

edit OK, since this has generated way more attention then I ever imagined I've updated here to respond to some of the comments.

1) I understand why the book is not contradicting itself in the picture specifically, or even in the "odd/even" exponent context, due to the fact that variable substitution always implies parens. The book and the teacher, from what my friend has said, do not do a good job of explaining that distinction though.

2) Yes, I understand why the answer is that $-3^2$ is NOT ambiguous is due to order of operations.

3) I made a comment about Khan Academy teaching it incorrectly, I realized I was wrong once I re-watched the video.

Bill Dubuque
  • 272,048
Beartech
  • 465
  • 40
    Generally, exponent is executed before minus sign. In your photo, if x = -3, then you'd write $x^2= (-3)^2$, so no contradiction. Even works in software -3^2 returns -9, and x=-3; x^2 returns 9. For definitive word, let's wait for an algebra teacher (that was 60 yrs ago for me). – BruceET Aug 03 '15 at 04:13
  • 1
    Ok, so "Generally" means that the notation $-3^2$ is truly ambiguous? I guess I thought that with math (in the US at least) there was pretty much ONE accepted value for that notation and that it wasn't ambiguous. – Beartech Aug 03 '15 at 04:19
  • And there are big sites like Khan that are teaching the odd/even shortcut. That means that is completely contradictory. If you are going to use the odd/even shortcut, then all notation would always have to be written: $(-4)^3$ or $(-2)^6$. The only math I really deal with is in computer programming so 99% of the time I'll be using variable substitution. But I still thought I'd see more of the parens notation when I went to school years ago if that was commonly accepted. – Beartech Aug 03 '15 at 04:24
  • I would probably not write $-3^2$ for fear of confusing someone who doesn't know the rule, but if I saw it, I say -9. 'Generally' in math doesn't mean 'usually when it suits me.' And I would not tend to take Internet fad sites as authoritative, even if often useful. – BruceET Aug 03 '15 at 04:24
  • 3
    @Beartech Don't forget the order of operations. Exponents go first, and the negative sign is equivalent to writing $-1$, so we have $-3^2 = -1 \cdot 3^2 = -1 \cdot 9 = -9$. – Clarinetist Aug 03 '15 at 04:25
  • Very quick to tick there OP. – Alec Teal Aug 03 '15 at 04:37
  • It makes sense so I accepted it. I am in the process of composing a comment to your answer. – Beartech Aug 03 '15 at 04:38
  • 7
    @Beartech Can you cite one example of Khan or an authoritative algebra source taking $-a^2$ to mean $(-a)^2$? I am very skeptical of your indication that big sites like Khan, or that even the source of your picture, are suggesting this interpretation. As a disclaimer, I teach college algebra, and I make sure my students know $-a^2$ is to be interpreted as $-(a^2)$. – anon Aug 03 '15 at 05:44
  • 12
    @Beartech NO, $−3^2$ is truly UNambiguous, as well as $2+3\cdot 4$ is unambiguous – you just need to remember the convention of operation precedence. – CiaPan Aug 03 '15 at 06:12
  • 1+2=3, and 34=12. But 1+24=9. Does that mean math is self-contradictory? – user253751 Aug 03 '15 at 10:15
  • 1
    @Beartech If you're in CS you can also try Python: -3**2 gives -9 and not 9 :-) – Voo Aug 03 '15 at 16:13
  • 2
    But, sadly, Excel has always held that -3^2 is 9. See http://mathforum.org/library/drmath/view/69058.html – DJohnM Aug 04 '15 at 00:20
  • 1
    @Beartech there's no contradiction in that picture you posted. Nowhere in there does the notation $-3^2$ appear. – David Z Aug 04 '15 at 02:41
  • Now complete the following table "Number $x$"; "Square $x^2$"; "Negated square $-x^2$"; "Squared negation $(-x)^2$" for the values $x=-3,-2,\ldots,3$. – Jeppe Stig Nielsen Aug 04 '15 at 12:54
  • 5
    Can you give us the title and author of the book? Maybe also year and publisher? – David R. Aug 04 '15 at 16:25
  • An even better problem, or at least difficult to understand is why is this question highly upvoted?????? Even the answers????? – Anonymous Aug 13 '16 at 03:23
  • 1
    I have absolutely no idea. LOL I just asked it out of curiousity and never expected such a huge debate. – Beartech Aug 13 '16 at 03:25

10 Answers10

93

$-x^2$, in every mathematical context I have seen, always means $-(x^2)$. So $-3^2 = -9$.

On the other hand, when you plug in a value to an expression you don't just plug the symbols in directly, you add parentheses first. For example, if you plug in $x = y + 3$ to the expression $7x$, you get $7(y + 3) = 7y + 21$, not $7y + 3$. Similarly, plugging in $x = -3$ to the expression $x^2$ gives $(-3)^2 = 9$, not $-3^2 = -9$. So the book does not contradict itself.

  • 3
    In English we just call it PEMDAS (Parentheses->Exponents->Multiplication/Division->Addition/Subtraction) aka Order of Operations – MichaelChirico Aug 04 '15 at 15:02
  • 5
    @MichaelChirico Except there's no explicit mention in that list of the unary negation sign. Now, if it were $10 - x^2$, that would be covered by the order since it would be subtraction, but in the absence of a preceding value, that list is not explicit. (Probably the general rule to go by is consider unary negative as the same as $0 - x$, but that's an additional rule.) – jpmc26 Aug 04 '15 at 21:41
  • 1
    @jpmc26 either way, $-x$ can only come under the M/D or A/S step, both of which come after E. So I don't think there's any confusion. (i.e. I can't think of a context when $-x$ isn't either $(-1)x$ or $0-x$) – MichaelChirico Aug 04 '15 at 21:42
  • 2
    @MichaelChirico I don't think you can or should expect people to make those kinds of assumptions/connections/guesses automatically, since there's a very real risk they might get them wrong. (E.g., the OP's question.) There are additional operators not mentioned in PEMDAS, as well. What about factorial? Factorial isn't multiplication (since $0! = 1$), so PEMDAS is incomplete anyway. I don't think you can get away from that, and you have be willing to explain the additional complications beyond the mnemonic. – jpmc26 Aug 04 '15 at 21:48
  • @jpmc26 I don't get what that has to do with the issue at hand – MichaelChirico Aug 04 '15 at 21:49
  • 4
    @MichaelChirico You're saying that PEMDAS covers the details in this answer; I'm saying it doesn't. – jpmc26 Aug 04 '15 at 21:50
  • 2
    @MichaelChirico jpmc26 is right, it's a lot more complicated that PEMDAS. For example, the E for exponentiation is not evaluated from left to right, but instead from right to left, as in $2^{3^2} = 2^9$. Addition/subtraction is left-to-right, but multiplication/division isn't -- $\frac{1}{5x^2}$ is not the same as $\frac{x^2}{5}$. And the unary minus sign isn't covered. – Caleb Stanford Aug 04 '15 at 22:56
  • Again, I don't know what any of this has to do with $-3^2=-9$. – MichaelChirico Aug 04 '15 at 22:58
  • 4
    Note, that unary minus (and regular minus) actually come before exponentiation when it's in the exponent! $3^{-2}$ means $3^{(-2)} = \frac{1}{9}$. So sometimes it's before exponentiation, sometimes after. Ultimately, mathematical conventions have to be stated in a case-by-case way, and the cases can be complicated. – Caleb Stanford Aug 04 '15 at 22:58
  • 6
    @MichaelChirico Because you brought up PEMDAS and said it was relevant to this answer. Which it isn't really. – Caleb Stanford Aug 04 '15 at 22:59
24

$-3^2$ is always $-9$. There's no ambiguity. And the odd/even rule is also true! $x^n$ is always nonnegative when $n$ is even, and $x^n$ is the same sign as $x$ when $n$ is odd (when $x$ is real).

There's no contradiction, because "$-3^2$" isn't actually of the form $x^n$. See, $x^n$, when you substitute $x=-3$ and $n=2$, gives you "$(-3)^2$," not "$-3^2$." Remember, when you substitute in, you always need parentheses.


Why do we need parentheses? I'll give an example.

  • What is $7-x$, when $x=2$?

The answer is $7-2=5$.

And now, the same question, reworded:

  • What is $7-x$, when $x=4-2$?

Why is this the same question? Because $4-2$ is the same thing as $2$. That means that we should get the same answer. And yet: $$7-4-2=3-2=1,$$ a different answer! The only way to get the answers to agree is to write $7-(4-2)=7-2=5$. So we see that, in this example, we needed parentheses.

It turns out that when we put in the parentheses, we always get the right answer, and we've just seen that leaving them out can get you the wrong answer. This means that you need to put in the parentheses.

17

6005 already explained why they don't contradict themselves. As an alternative answer to the first part of the question, "higher order" operators usually take precedence: exponentiation is applied before multiplication, which again is applied before subtraction. Whether you interpret unary minus in $-x$ to be $0-x$ or $(0-1)∙x$ it then follows that $-x^2$ should be calculated as $-(x^2)$.

l0b0
  • 409
9

It's not a matter of syntax, it's a matter of operator precedence. In the absence of parentheses, exponentiation is executed first, then negation. Try this in Wolfram Alpha: -3^2. Then try (-3)^2. We have long agreed on these rules so that computers deliver consistent results on calculations involving various different arithmetic operations.

As for the odd-negative/even-positive thing, that only applies if the base is negative. Observe for example:

  • $(-2)^2 = (-2) \times (-2) = 4$
  • $(-2)^3 = (-2) \times (-2) \times (-2) = -8$
  • $(-2)^4 = (-2) \times (-2) \times (-2) \times (-2) = 16$
  • $(-2)^5 = (-2) \times (-2) \times (-2) \times (-2) \times (-2) = -32$

See also this Sloane's A122803.

Bob Happ
  • 582
5

The accepted syntax is one that goes by the standard rules of operator precedence and associativity that most mathematicians, scientists and computer programmers have followed for decades if not centuries.

Then, given $$-3^2 = -9$$ the squaring is done first, giving us $9$, and the negation is done second, resulting in $-9$. If instead you have $$(-3)^2 = 9$$ then it's clear that you multiply $3$ by $-1$ first and then you square it, giving $9$ as expected.

Of course computer programmers are human and they make mistakes. Sometimes you might find that your C++ program is not giving you the right results. (It doesn't help that the C++ operator ^ does something else anyway).

There are mistakes in your algebra book but the one you quote is not one of them. You failed to give a complete quotation. With a complete quote, we'd see that they're talking about negative numbers raised to odd or even exponents.

James47
  • 326
4

In the context of an algebra class I believe an algebraic proof will suffice: $$-1a=-a$$this property is given before exponents are introduced.

Now making the substitution $a=b^n$ gives the algebraic result needed $$-1b^n=-b^n$$

For your example $b=3$ and $n=2$ gives $-1•3^2=-3^2$

The left hand side being $-1•9=-9$

The right hand side must be interpreted as $-(3•3) =-9$

Thus the rule:

The product of an even number of negative numbers is positive.

The product of an odd number of negative numbers is negative.

is not contradictory.

To test your friend's understanding ask him to simplify: $$-3^{-2}$$

user 85795
  • 1,659
4

The best answer I can give is that there is no accepted syntax because it creates sufficient ambiguity to cause problems. Thus the rule should be: only use $-3^2$ if it is completely unambiguous what is meant due to context, otherwise use $(-3)^2$ or $-(3^2)$ to provide readers with unambiguous resolution.

I have seen, in typesetting, the use of a smaller negative sign when doing unary negation of numbers, such as $^-3^2$. If rendered this way, it would be reasonable to assume $^-3^2 \equiv (^-3)^2$.

A similarly confusing case could be $1 + -3^2$, which is hard to convert into a a form that PEMDAS will help with. In that particular syntax, I would be more likely to assume they intended $(-3)^2$, due to context.

One other approach could be to look at related disciplines. When I look at the syntaxes in MATLAB, Mathmatica, and R, all of them have exponentiation before negation (meaning $-3^2 \equiv -(3^2)$). If one were to take those languages as "definitive" for mathematics, one could assume the syntax is unambiguous. Personally, I would not try. I've seen enough "what does $6 / 3(2)$ equal" memes going around Facebook. I don't want to make more.

Cort Ammon
  • 3,343
4

If you want a definitive answer then why not try seeing what Excel (sic) does with it....

As other answers have indicated, the problem comes with the distintion between the unary minus and the two term minus operator, along with how the minus operator should be attached (i.e. the implied parentheses/brackets) to a symbol, versus what to do with a (positive without a + sign) numeric value.

Ultimately it's a matter of local convention, and corresponding confusion.

Excel thinks it's -9; And there are many web pages about this problem causing confusion in spreadsheet results (other Excel issues are available;-).

  • Don't forget to read it all before down voting ;-) An extra issue that in half the cases the minus sign is in fact part of the number, rather than being an operator... – Philip Oakley Aug 07 '15 at 20:09
  • 1
    I'm upvoting, but I'm kind of rare in that I don't downvote just because there is one tiny flaw in the answer, or in some cases some people downvote because of very minor philosophical disagreements. – Robert Soupe Aug 08 '15 at 02:01
  • @RobertSoupe Thanks. I'd suspected that was the likely reason - maybe I shouldn't have started by mentioning Excel as if it is a mathematician's point of reference;-) – Philip Oakley Aug 08 '15 at 20:16
  • Indeed. You can't take that kind of pettiness personally, life's too short. – Robert Soupe Aug 09 '15 at 01:27
  • Actually, for Excel, =-3^2 results in positive 9, which is mathematically wrong according usual conventions. – Rodolfo Oviedo Dec 20 '18 at 14:14
4

To round out the answers, one might wonder why we chose to order operations so that $-3^2$ means $-(3^2)$ rather than $(-3)^2$.

A very simple reason is that if we mean to say $(-3)^2$, we have an alternate — and simpler — way to express the same value that we would prefer to use in most circumstances: $3^2$

However, if we mean to say $-(3^2)$, we don't have a correspond alternative.

Thus, the convention where $-3^2$ means $-(3^2)$ is simply more useful than the alternative.

2

So the Bible isn't the only book that can be completely misunderstood when passages are taken out of context. Nor is it the only book to contain contradictions. At least if you find a genuine contradiction in an algebra textbook you won't be accused of being a devil worshiper. However, you have not spotted a genuine contradiction here.

I'm not bringing up biblical errancy just to be sensationalist. The Bible actually predates algebra, and our modern rules of operator precedence developed from an understanding of equations from words. Consider Fermat's famous conjecture, only recently proven:

It is impossible for a cube to be the sum of two cubes, a fourth power to be the sum of two fourth powers, or in general for any number that is a power greater than the second to be the sum of two like powers.

That's exactly how he wrote, though in Latin.

Nowadays we say $x^3 + y^3 = z^3$ has no solutions. And we understand that you cube $x$ and you cube $y$ before adding them up and comparing them to $z^3$. You don't do $(x^3 + y)^3$ unless there are explicit parentheses actually placed like that, or if you're unaware of operator precedence.

So when you see $0 - 3^2$, that's different from $(0 - 3)^2$. By our modern rules of operator precedence, $-3^2$ is the same as $0 - 3^2$ and therefore different from $(0 - 3)^2$.

Lastly, you need to look at the context for that "if the exponent is even, the result it positive, and if the exponent is odd the result is negative." You will probably see something about the number to which the exponent is attached being negative. Then $(-3)^3 = -27$ but $3^3 = 27$.

Robert Soupe
  • 14,663