Y’know, its funny how many ‘justifications’ for both sides of this argument there are that are totally irrelevant.
The only basis for whether -3^2 is 9 or -9 is entirely on whether or not the order of operations specifies that unary negation has higher or lower precedence than exponentiation (as Achernar says).
As far as I can see (and I Am Not A Mathematician) there can be no appeal to mathematics to solve this conundrum. This is an issue of pure grammatical syntax, and nothing more. It is an issue of convention and convenience.
I (and it seems several other ‘authorities’ in one way or another already mentioned in these posts) seem to agree that the minus sign is not an intrinsic property of the number to its right, but rather is an operator designed to negate the property on its right.
I’d agree with this myself. A unary minus can be applied to any expression in algebra, not just a number, and it is no more or less an intrinsic property of an expression it preceeds than it is a numeric constant. -(x+y)^2, -x^2, and -3^2 all share similar properties: if the negative sign is an intrinsic property of whatever is on its right, then all of the above formulae end up squaring the negativity away. That is, somehow, the - sign is some intrinsic property of x (for example), whatever x is. This to me is juggling definitions for the sake of juggling definitions. It is not necessary, because no matter if you consider the negative sign an intrinsic property or not, it is describable by unary minus being an operator with a precedence.
It is simplest to consider the negative sign as an operator that operates on an expression to its immediate right. If it is an operator, it has precedence along with the rest of the precedence rules.
Furthermore, you can work the mathematics out no matter which way you choose to do the precedence, using parentheses when you want to override the situation, so the choice is down to convention. Period.
So this is entirely about choosing and/or justifying operator precedence, and nothing else.
Justification can come in the form of the ambiguity (or lack thereof) of grammatical syntax, and it can come from conventional use, but it cannot come from pure mathematics. This is all just symbol-pushing, not math. The math comes from evaluating the expression, but with sufficient parentheses, we can force it one way or the other. Justification cannot come from mathematics (square roots, imaginary numbers, whatever). Arguments based on anything other than grammatical syntax convention are meaningless.
For the record, though, as long as opinions are being put out, I’ll put forth my own, based on what I learned in school, and what seems to be on a few math websites.
-3^2 = -9
-x^2 = -(x)^2
-(x+y)^2 = -(x^2 +2xy + y^2) = -x^2 + -2xy + -y^2 = -x^2 - 2xy - y^2
3----1^2 == 4 (that is, 3 - (-(-(-(1^2))), not 3 - (—1)^2)
It is up to convention, entirely. I notice that the FORTRAN programming language places unary minus at the same operator level as subtraction, meaning:
x/-15.0*Y
is grouped as:
x/ -(15.0*Y)
which is counterintuitive, but that’s the order that they placed on it. C/C++ on the other hand puts unary minus above multiplication (there is no exponentiation, so this doesn’t help give us some hints), meaning the above expression would be resolved as:
x/((-15.0) * y)
All of you who ‘think’ you know what the ‘real’ precedence is are pontentially wrong by definition, simply because there is no ‘real’ precedence. Merely human choices.
Having said that, there are, as I’ve said repeatedly, conventions, and fairly strong ones at that. Most of us learned the typical BEDMAS (BODMAS, PEDMAS in some places) order of operations. unary minus doesn’t easily fall into any of these categories by name. M, for multiplication, is about the only one that makes direct sense, as it is justifiable that:
-x
is equivalent to
(-1)x
Not only was this the way I was taught, but it suggests that unary negation has the same precedence as multiplication, is fairly easy to remember, and can be justified by its relative commonness by convention of math textbooks and reasonably easy syntax.
Note:
http://mathforum.org/library/drmath/view/53194.html
which talks about the relationship between unary negation, programming languages, and mathematics.
That website makes a good case for unary negation for being at least as high as addition/subtraction, but no higher than exponentiation. As far as convention goes, it seems to me reasonably clear that in mathematics (programming languages aside) that exponentiation occurs before unary negation, and not after.
Sorry if this felt like a rant, but it seemed like justifications were being stated that really dodged the point entirely.
So for what its worth, I agree with the OP’s textbook, for reasons of pure convention of grammatical mathematics syntax. Surely we can dredge up more ‘ask dr. math’ type websites that say one way or another.