Difference between -3² and (-3)² ?
- Thread starter gary350
- Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
53 replies · 8K views
Physics news on Phys.org
DeBangis21
Gold Member
- 42
- 108
Thanks. I am getting something in here. I use to wonder and always asked myself, and others, why -n^2 in my calculator gives -n instead of n.
Mentor
- 15,560
- 10,830
As a historical note…. RPN calculators were developed and brought to market back in the old days when no calculators supported parentheses or understood PEMDAS, which made them far less useful for scientific and technical work. The internal logic of an RPN calculator is appreciably simpler than that of a PEMDAS-aware calculator, which mattered when designing a palm-sized device using 1970s technology.jedishrfu said:What is your calculator?
The only one I know that has no parentheses are HP Reverse Polish Notation calculators. They use RPN style notation which means you input your equations differently than with a TI-83 calculator as an example.
I still prefer the RPN style, as it matches the way we would do the problem unassisted: calculate the highest-precedence intermediate results first and work out the final lowest-precedence step. The ambiguity in ##-3^2## discussed in this thread doesn’t happen in RPN.
DaveC426913
Gold Member
2025 Award
- 24,625
- 8,980
My take on this as always been: Never trust to a machine what you can do for yourself.Nugatory said:As a historical note…. RPN calculators were developed and brought to market back in the old days when no calculators supported parentheses or understood PEMDAS, which made them far less useful for scientific and technical work. The internal logic of an RPN calculator is appreciably simpler than that of a PEMDAS-aware calculator, which mattered when designing a palm-sized device using 1970s technology.
I still prefer the RPN style, as it matches the way we would do the problem unassisted: calculate the highest-precedence intermediate results first and work out the final lowest-precedence step. The ambiguity in ##-3^2## discussed in this thread doesn’t happen in RPN.
Homework Helper
Education Advisor
Gold Member
- 7,774
- 2,193
As if one more response would be any bit helpful after so many 34 posts --
The grouping pair symbols show what the boundary is of the expression; even if this expression just a single real number which may also be a signed number.
The grouping pair symbols show what the boundary is of the expression; even if this expression just a single real number which may also be a signed number.
Science Advisor
- 3,380
- 2,934
The first time I met with RPN was when I found a really cool looking, 'vintage, for collectors' calculator (with that classic LED display: the kind with the magnifying lenses, and with the numbers scurrying and rolling while it's sweating with the job) and noticed that I cannot do any calculations with it...Nugatory said:The internal logic of an RPN calculator is appreciably simpler than that of a PEMDAS-aware calculator, which mattered when designing a palm-sized device using 1970s technology.
Kind of:
Last edited:
Mentor
- 15,560
- 10,830
That TI calculator has an “=“ key, which identifies it as a non-RPN calculator, as we’d expect from a TI calculator of the era. The RPN calculators were made by HP and had an “enter” button that did somethint completely different. The presence or absence of an ”=“ key was a big piece of the advertising wars between the two companies.
Science Advisor
- 3,380
- 2,934
Thanks. It was some 30+ years ago (when cheap LCD with '=' was already common) and the LEDs made the most impact - and that I could not figure it out.
By next day the battery was down and with that the thing got forgotten. I could connect the dots only when some years later at the university somebody explained the RPN properly.
By next day the battery was down and with that the thing got forgotten. I could connect the dots only when some years later at the university somebody explained the RPN properly.
Staff Emeritus
Science Advisor
Homework Helper
2025 Award
- 16,110
- 8,427
Gee, I never knew that!jedishrfu said:my iPhone simple arithmetic calculator doesn't [have parentheses] either (ie in portrait mode) However switching to landscape mode and you get a full blown scientific calculator complete with parentheses.
gary350
- 293
- 83
I want to learn why -3²=9 ???FactChecker said:Then you will have to do the calculation in two steps in the correct order yourself and not count on the calculator. You will have to calculate ##3^2 = 9## first, and then reverse the sign to get ##-3^2 = -9##.
If you are going to get into this in a significant way, use the more advanced calculator.
-x-=+
Square means a number times itself.
-3² should be -3 x-3= +9
I need to understand why the correct answer is -9 ???
Homework Helper
Education Advisor
Gold Member
- 7,774
- 2,193
Was this already settled several posts ago at least a few times?gary350 said:I want to learn why -3²=9 ???
-x-=+
Square means a number times itself.
-3² should be -3 x-3= +9
I need to understand why the correct answer is -9 ???
-3^2
The negative sign is NOT attached to the 3.
The meaning is -(3)^2 or same as -(3^2).
the exponent 2 is attached to the 3.
Science Advisor
Homework Helper
- 9,564
- 4,799
PEMDAS, You must learn it and make it second nature before proceeding to anything else in math.gary350 said:I want to learn why -3²=9 ???
-x-=+
Square means a number times itself.
-3² should be -3 x-3= +9
I need to understand why the correct answer is -9 ???
Last edited:
DaveC426913
Gold Member
2025 Award
- 24,625
- 8,980
*sigh* Because of PEMDAS.gary350 said:I want to learn why -3²=9 ???
Parentheses
Exponents
Multiplication and Division
Addition and Subtraction
By mathematical convention, as taught in all modern mathematics, that is the order in which such an equation is solved.
So: when you see this: -32, you solve this ( 32 ) first.
The minus sign ( - ) in front is an operator, just like addition, multiplication or exponentiation. It operates on what is immediately to its right (i.e. 32 AKA +9 ) to turn it into its operative inverse. That is what that minus sign means. And so, it gets processed in PEMDAS order - i.e. last.
Last edited:
Science Advisor
- 3,380
- 2,934
Erm.DaveC426913 said:The minus sign ( - ) in front is an operator
Depending on the exact input sequence a '-' can be either an operator or mean a negative value.
Also, if the '-3' is produced by a calculation then it'll mean a negative value and will be processed so.Rive said:If your enter is something like 'minus, three, square' then (if it's anything decent) it'll do the square part first and the 'minus' last
If your enter is 'three, +/-, square' then it'll take it as a (minus-three) on square
Entering the negative values by starting the input sequence with '-' is IMHO a mistake and should be avoided.
Science Advisor
Homework Helper
- 9,564
- 4,799
Negative value of what? Nothing should be evaluated until the input is complete. Apparently, some calculators do not allow that. IMO, PEMDAS makes ##-3^2## unambiguous no matter how it is entered.Rive said:Erm.
Depending on the exact input sequence a '-' can be either an operator or mean a negative value.
If there is any confusion, parentheses should be used to remove any doubt about the order of the calculations.
- 13,832
- 16,669
Because, as mentioned several times, the convention is that ##-3^2## is to be read as minus the square of three and not as the square of minus three. As others have commented this is part of a more general system often called PEMDAS (you may have learned BIDMAS or BODMAS and some other mnemonic, but they're all the same) which is a convention for the order in which operations are done.gary350 said:I want to learn why -3²=9 ???
-x-=+
Square means a number times itself.
-3² should be -3 x-3= +9
I need to understand why the correct answer is -9 ???
So it's basically the same reason as why 2×3 + 4×5 is 26 and not 50 - because the order of operations is what it is, not just reading left-to-right.
Science Advisor
- 3,380
- 2,934
Basic calculators has their own logic (due lack of parentheses), and if you don't understand them then it'll be ambiguous no matter how many PEMDAS got referenced.FactChecker said:IMO, PEMDAS makes unambiguous no matter how it is entered.
This Windows-thing is fortunately able to display the actual operation so you can check what happens
Sequence of 'minus, three, square' => 0-sqr(3), and that's -9, proper
Sequence of 'three, +/-, square' => sqr(-3), and that's 9, proper
Basic calculators do the same operations but without allowing it to be checked
Thus: 'know your calculator'.
DaveC426913
Gold Member
2025 Award
- 24,625
- 8,980
Rive said:Erm.
Depending on the exact input sequence a '-' can be either an operator or mean a negative value.
- I'm not talking about calculators; I'm answering gary's question. Calculator behavior is a side-quest in this discussion.
- The problem with this discussion has to do with the terminology "a negative value" (as FC pointed out: "of what?"). I'm clarifying, by pointing out that - while the minus sign does apply to the value to its right - it is an operation (it is not simply intrinsic), and that operation has to wait for order of precedence.
Science Advisor
- 3,380
- 2,934
He was the one bringing in calculators and expressing his confusion about them:DaveC426913 said:I'm answering gary's question.
Guess not attending his calculator properly might be the reason he does not feel even this many answers satisfactory. I don't know.gary350 said:My calculator shows -3² = 9
My calculator also shows 3²=9
Both make sense because -x-=+
-x-=- makes no sense.
If there is nothing left on the left side of zero but only the right side with a mirror then I'm out of this 'precalculus mathematics homework help' topic.DaveC426913 said:I'm clarifying, by pointing out that - while the minus sign does apply to the value to its right - it is an operation (it is not simply intrinsic), and that operation has to wait for order of precedence.
DaveC426913
Gold Member
2025 Award
- 24,625
- 8,980
Perhaps. But 'calculators' is not 'the reason why'; it is still a side quest, even for the OP.Rive said:He was the one bringing in calculators and expressing his confusion about them:
Possibly. It is a bad carpenter that blames his tools.Rive said:Guess not attending his calculator properly might be the reason he does not feel even this many answers satisfactory. I don't know.
?Rive said:If there is nothing left on the left side of zero but only the right side with a mirror then I'm out of this 'precalculus mathematics homework help' topic.
My take on this is to disabuse the OP of the notion that the minus sign is there "from the start". as if it is a "property" of the value to its right.
We're trying to get him to perform the operations in order and to do that, we need to demonstrate that the operations are discreet and in-series.
Mentor
- 38,146
- 10,748
I think I understand what you think you meant, but that's different from what you actually wrote. No calculator will display either -n or n if the input is -n^2. IOW, squaring a number won't produce that number except if the number is 1.DeBangis21 said:Thanks. I am getting something in here. I use to wonder and always asked myself, and others, why -n^2 in my calculator gives -n instead of n.
PEMDAS doesn't really cover it, as the minus sign is really the (unary) negation operator rather than the (binary) subtraction operator.DaveC426913 said:*sigh* Because of PEMDAS.
Parentheses
Exponents
Multiplication and Division
Addition and Subtraction
Programming languages generally do a much better job of specifying the order of operator precedence than does mathematics. In addition, many languages also specify the associativity; i.e., how operators at the same precedence level are evaluated, whether left-to-right or right-to-left.DaveC426913 said:The minus sign ( - ) in front is an operator, just like addition, multiplication or exponentiation. It operates on what is immediately to its right (i.e. 32 AKA +9 ) to turn it into its operative inverse. That is what that minus sign means. And so, it gets processed in PEMDAS order - i.e. last.
For example, in Python, exponentiation (denoted as **) is of higher precedence than negation (see https://www.geeksforgeeks.org/precedence-and-associativity-of-operators-in-python/). For an expression such as -3**2, 3 is squared before the result is negated. Because of the precedence of the two operators, -3**2 has exactly the same value as -(3**2).
DaveC426913
Gold Member
2025 Award
- 24,625
- 8,980
I think PEMDAS covers it implicitly, if not explicitly.Mark44 said:PEMDAS doesn't really cover it, as the minus sign is really the (unary) negation operator rather than the (binary) subtraction operator.
IOW, if one were to find a concise description of PEMDAS it might cover negation operators under subtraction operators.
Mathematics manages with its convention. You gotta know how to math.Mark44 said:Programming languages generally do a much better job of specifying the order of operator precedence than does mathematics.
Mentor
- 38,146
- 10,748
This was answered in posts 4, 14, 19, 41, plus a couple more that I might have missed. Please go back and reread them.gary350 said:I want to learn why -3²=9 ???
-x-=+
Square means a number times itself.
-3² should be -3 x-3= +9
I need to understand why the correct answer is -9 ???
Not good enough if it isn't explicit. That's why I said that programming language do a much better job of explaining how expressions are evaluated. All of the descriptions of PEMDAS (or BIDMAS) I've ever seen were concise, which is the problem. And none of the letters in either acronym covers negation.DaveC426913 said:I think PEMDAS covers it implicitly, if not explicitly.
IOW, if one were to find a concise description of PEMDAS it might cover negation operators under subtraction operators.
Yeah, I think I know "how to math."DaveC426913 said:Mathematics manages with its convention. You gotta know how to math.
Mentor
- 8,478
- 5,699
One last time: ##-3^2## means "take the negative of the result of 3 squared".Mark44 said:This was answered in posts 4, 14, 19, 41, plus a couple more that I might have missed. Please go back and reread them.
There is nothing more to say, so this thread will now be closed.
Similar threads
What is the difference between an implicit and explicit domain in a function?
- nycmathguy
- · Replies 1 ·
- Precalculus Mathematics Homework Help
- Replies
- 1
What Is the Difference Between Tension Ratios of 3 and 9?
- Jujubee37
- · Replies 4 ·
- Introductory Physics Homework Help
- Replies
- 4
Difference between two statements
- Jingfei
- · Replies 5 ·
- Precalculus Mathematics Homework Help
- Replies
- 5
High School Difference between powers of numbers equaling 1
- e2m2a
- · Replies 11 ·
- General Math
- Replies
- 11
Pressure difference between two points in a tapered pipe
- I_Try_Math
- · Replies 6 ·
- Introductory Physics Homework Help
- Replies
- 6
How to Determine Temperature Difference Between Two Stars Using Spectral Lines?
- Zapped17
- · Replies 0 ·
- Introductory Physics Homework Help
- Replies
- 0
Undergrad Why is there such a difference between the total cross-section data? (simulation vs. experiment)
- jhonconnor
- · Replies 1 ·
- High Energy, Nuclear, Particle Physics
- Replies
- 1
Undergrad Uniform convergence and derivatives -- difference between two theorems?
- psie
- · Replies 1 ·
- Calculus
- Replies
- 1
Undergrad Age difference between Steve and Steveston given the pattern
- Joe1998
- · Replies 20 ·
- General Math
- Replies
- 20
Undergrad Scattering Theory: Difference between use of scattering amplitude and Born approximation?
- Shahzad Raza
- · Replies 2 ·
- Quantum Physics
- Replies
- 2