Please register to participate in our discussions with 2 million other members - it's free and quick! Some forums can only be seen by registered members. After you create your account, you'll be able to customize options and access all our 15,000 new posts/day with fewer ads.
-5^2 is either -(5^2) or (-5)^2. Depends if you treat -5 as an integer (-5) or as an operator -(5). Both are correct. It's basically two different equations depending on whether you interpret -5 as an integer or as an operator and integer.
Both answers are correct as written it can be interpreter either way. Normally you'd tell that by context.
x=-5^2 is 25 as -5 is just an integer.
x=n-5^2 is is n-25, the integer is 5 and the - is an operator. Those are clear from the context.
(-5^2) has no context. Both 25 and -25 are correct. It can be read either way.
There's no PEDMAS like agreement in how it is read. E.g.,
-2^2 is either 4 or -4 for the same reason. No context. If it's an integer then it's (-2)^2 which is 4. You'd first have to performing the exponent before distributing, so the proper way to distribute out the negative would be to raise it to the same exponent t -2^2 is the same as -1^2*2^2, 4.
if a=2, b=-3
a*b^2 is 2*-3^2.
square it first, b^2 is (-3)*(-3)*2 = 18.
2*-3^2 = 18.
b is an integer, -3, as stated in the problem. It isn't 2*-1*3^2, which is -18. B as stated is the integer -3. It is 2*-1^2*3^2, not 2*-1*3^2.
-5^2 is either -(5^2) or (-5)^2. Depends if you treat -5 as an integer (-5) or as an operator -(5). Both are correct. It's basically two different equations depending on whether you interpret -5 as an integer or as an operator and integer.
Both answers are correct as written it can be interpreter either way. Normally you'd tell that by context.
x=-5^2 is 25 as -5 is just an integer.
x=n-5^2 is is n-25, the integer is 5 and the - is an operator. Those are clear from the context.
(-5^2) has no context. Both 25 and -25 are correct. It can be read either way.
There's no PEDMAS like agreement in how it is read. E.g.,
Yes there is a PEDMAS-like agreement on how it's read: exponentiation takes precedence over negation. Period.
Whether you think it SHOULD be in that order is subject to debate. Whether programmers agree on that order is clearly up for debate. What's not up for debate is that, for the purposes of good ol'-fashioned written algebraic notation, there is a clear and accepted consensus among mathematicians: exponentiation takes precedence over negation. That's how it's taught in "intro to algebra" classes the world over. Any lack of consensus on this convention is not among mathematicians but among laypeople who don't remember what they were taught.
Quote:
Originally Posted by Malloric
-2^2 is either 4 or -4 for the same reason. No context. If it's an integer then it's (-2)^2 which is 4. You'd first have to performing the exponent before distributing, so the proper way to do that would be that -2^2 is the same as -1*-1*2^2, which is 4.
The order of operations is all the context you need. Just as you could write 2+3*4 as 2+(3*4) for the sake of added clarity, you don't NEED the extra context to resolve "-2^2" even if it would be helpful for the sake of clarity, because the order of operations gives you all the context you need to arrive a consistent answer.
Yes there is a PEDMAS-like agreement on how it's read: exponentiation takes precedence over negation. Period.
Whether you think it SHOULD be in that order is subject to debate. Whether programmers agree on that order is clearly up for debate. What's not up for debate is that, for the purposes of good ol'-fashioned written algebraic notation, there is a clear and accepted consensus among mathematicians: exponentiation takes precedence over negation. That's how it's taught in "intro to algebra" classes the world over. Any lack of consensus on this convention is not among mathematicians but among laypeople who don't remember what they were taught.
The order of operations is all the context you need. Just as you could write 2+3*4 as 2+(3*4) for the sake of added clarity, you don't NEED the extra context to resolve "-2^2" even if it would be helpful for the sake of clarity, because the order of operations gives you all the context you need to arrive a consistent answer.
The answer to the original question is 50.
-2^2 is 4 or -4. Just depends whether it's 2 squared change the sign or negative 2 squared. Order of operations does not tell you whether -2 is an integer or 2 "negationed" because order of operations does not include negation. It does include subtracton. 0-2^2 is -4. It does not, however, tell you that -2^2 is 0-2^2. That's outside of PEDMSA
x=2
f(x)=-x^2+5x-7 would be a basic algebra problem.
=-2^2+5*2-7.
Your context is provided by the equation. it's -(2)^2+5(2)-7, not (-2)^2. x is 2, not negative 2.
On the other hand if x=-2
--2^2+5*-2-7 you're dependent on context of the equation.
--2^2 take the square first is --4. PEDMSA doesn't really tell you what to do with --4 though. The old -4 is 0-4 deal would be 0--4, 4. But -(-2)^2 is not 4. You need the context of the equation. It's -(-2)^2, not --2^2. Which you know because of the context not because --2^2=-(-2)^2. --2^2 could be either 4 or -4.
-2^2 is 4 or -4. Just depends whether it's 2 squared change the sign or negative 2 squared. Order of operations does not tell you whether -2 is an integer or 2 "negationed" because order of operations does not include negation.
What on earth is that supposed to mean?
If we write -2^2 (in other words, if we're making up an internet "gotcha", not using the expression for some actual practical purpose), it means this:
-(2^2) because exponentiation comes before multiplication OR subtraction.
If you want to define -(2^2) as -1 * (2^2), or you want to define it as 0 - (2^2) is up to you, since by definition they're EXACTLY THE SAME FREAKING THING.
-5 is obviously negative, so there's no way to remove the negation, square the number, and then tack the negative value back on, as some are trying to do here. That breaks all rules of multiplication
(-5^2) = -5^2 = -5 x -5, but not -(5^2). The negative sign applies to the number, and can't be moved elsewhere.
Last edited by Thoreau424; 08-13-2020 at 04:07 PM..
No, I'm the person who uses mathematics every day of his working life. Exponentiation is ahead of either subtraction (if you prefer to think of a negative number as 0 - x) or multiplication (if you prefer to think of a negative number as -1 times x) - which of course are the same thing as you learned back in 5th or 6th grade when they taught you the identities.
If we write -2^2 (in other words, if we're making up an internet "gotcha", not using the expression for some actual practical purpose), it means this:
-(2^2) because exponentiation comes before multiplication OR subtraction.
If you want to define -(2^2) as -1 * (2^2), or you want to define it as 0 - (2^2) is up to you, since by definition they're EXACTLY THE SAME FREAKING THING.
-2^2 = -(2^2) and only equals -4, not +4.
Or it means (-2)^2.
Is -2 the integer -2 or the operator minus the integer 2. The gotcha is in the equations.
PEMDAS
Parenthesis first, right.
Exponents first, wrong
(-5^2) is required to be performed first.
Is it negative 5 (-5) squared or is it minus 5 squared.... Depends if -5 means MINUS 5 or NEGATIVE 5.
Please register to post and access all features of our very popular forum. It is free and quick. Over $68,000 in prizes has already been given out to active posters on our forum. Additional giveaways are planned.
Detailed information about all U.S. cities, counties, and zip codes on our site: City-data.com.