negative exponents

jpanhalt

Joined Jan 18, 2008
11,087
As I mentioned before, "-X" is simply a short way of saying "0 - X". According to the order of operations, the negative should be treated as subtraction, and thus -1^2 is the same as -(1^2), or -1.

That is how modern calculators work, for example, because negative is treated as subtraction in the standard order of operations. No ambiguity there.
I am not sure I buy the underlined statement. If "-X" is the same as "0-X", then squaring "0-X" gives 0^2 -2*0*X +X^2 = X^2

I did find an explanation of distributive property here that explains the convention a little better. That is, "-X^2" is the same as "-1*X^2". An example is given on page 3 of that lesson.

Does anyone know when the change in the convention for negative numbers occurred?

John
 

DerStrom8

Joined Feb 20, 2011
2,390
I am not sure I buy the underlined statement. If "-X" is the same as "0-X", then squaring "0-X" gives 0^2 -2*0*X +X^2 = X^2
Right, which is one example of why (-X)^2 comes out to the same as (X)^2.

I did find an explanation of distributive property here that explains the convention a little better. That is, "-X^2" is the same as "-1*X^2". An example is given on page 3 of that lesson.
Yep, that's a good point, but once again, the "-1" that you're multiplying is done the same way (based on the order of operations, and on a software level for calculators) as "0-1".

No idea where the convention came from though :p

Matt
 

Papabravo

Joined Feb 24, 2006
22,082
Perhaps, on the surface they may look different, but I believe the internal workings are the same. There is no "negative" in binary, so instead it uses two's complement and adds the value to zero. This is the same as subtracting from zero. On a software level, subtraction and negatives are handled the same way.

That is not to say binary negation works the same--that's just inverting the bits, but that's not what we're dealing with here.
What you say is approximately true for a two's complement representation. The actual operation is done by taking the complement and incrementing. No subtraction involved; at least not in the gate level implementation. On the other hand if the representations is sign-magnitude then you just invert the sign bit. Such computers did exist once upon a time. Quite likely before your time.
 

MrAl

Joined Jun 17, 2014
13,703
As I mentioned before, "-X" is simply a short way of saying "0 - X". According to the order of operations, the negative should be treated as subtraction, and thus -1^2 is the same as -(1^2), or -1.

That is how modern calculators work, for example, because negative is treated as subtraction in the standard order of operations. No ambiguity there.

Hello there,

I would never say that there was an ambiguity if i did not find a good reason for saying so. In my case, experience with a lot of different calculators. Maybe it was the TI58 for example, but the TI89 handles it well but it also has TWO different symbols one for binary minus and one for unary minus.

In algebra the statement:
y=-1^2
is handled as:
y=(-1)*1^2

which shows there is no ambiguity with the unary operator. But calculators are different. It depends partly on the programming experience of the developer. That's why my basic message is to watch out for what you are using to do the calculation.
 

djsfantasi

Joined Apr 11, 2010
9,237
There is also ambiguity in the written equation versus the spoken one. Spoken, we would say minus one squared is one. In the written case, it is not so clear. Is it minus one squared or the negative of one squared?!? In the absence of clarifying parentheses, one is left to rely on PEMDAS, which leads to the negative of one squared.

According to Wikipedia, in written mathematics, -1^2 is interpreted as -(1^2). However, many programming languages put the precedence of the unary minus between parentheses and exponentiation, resulting in an answer of 1.

Order of Operations
 

MrAl

Joined Jun 17, 2014
13,703
There is also ambiguity in the written equation versus the spoken one. Spoken, we would say minus one squared is one. In the written case, it is not so clear. Is it minus one squared or the negative of one squared?!? In the absence of clarifying parentheses, one is left to rely on PEMDAS, which leads to the negative of one squared.

According to Wikipedia, in written mathematics, -1^2 is interpreted as -(1^2). However, many programming languages put the precedence of the unary minus between parentheses and exponentiation, resulting in an answer of 1.

Order of Operations
Hi,

That link explains the exceptions a little better. They even go into implied multiplication such as 1/2x to be equal to 1/(2*x) or 1/2*x where the latter is x*1/2.

I've found implications like these to be very useful although i try to type everything out in the more standard form unless i explicitly state otherwise.
 

Bill B

Joined Nov 29, 2009
61
Going back to the original question as I saw it: (1/3)^-2 = 9 is correct. The expression (1/3)^-2 is equal to 3^2 which is 9. In this case, the fraction 1/3 is being raised to the power of -2.
 

WBahn

Joined Mar 31, 2012
32,823
Hi

(1/3)^-2 = 9
what about if there is no parenthesis? and the exponent of -2 is on the numerator 1?
would the answer be 9 (implied parenthesis? or be 1/3?

thx
I may have missed this, but the question itself seems ambiguous. Taking just the first question, what about if there is no parentheses, then that is

1/3^-2

This would bind as

1/(3^(-2)) = 1/(1/9) = 9

Which is what the OP indicated was given as the correct answer in a later post.

The second question about the exponent of -2 being on the numerator seems odd because that has nothing to do with taking an expression and changing the order of operations, but rather completely changing the expression altogether.

Note that I would argue (and perhaps I am wrong) that

3^-2

is perfectly reasonable notation but that it does not work with the notion that -2 is shorthand for 0-2 since that would translate to

3^0-2 which would bind as (3^0)-2 = 1-2 = -1

Now, if you said that it bound as (0-2), i.e., include an implied parentheses, then I might agree (I haven't tried to think of all the corner cases).
 
Top