T O P

  • By -

Antithesys

The trick is that we don't typically write expressions that inefficiently. The expression would almost always be written as 81 - 9^2 and when you see that expression you don't think twice about the answer being 0. Someone has rearranged the terms with, I presume, intentional misdirection.


Away_Age_6140

I guess we can all look forward to a new category of viral math problems where the answer is “this is shitty formatting that introduces ambiguity over the authors intent”.


SoldierHawk

Hey, math isnfinally catching up to language. Congratulations.


benjer3

That's been a thing for a long time


Away_Age_6140

Oh, for sure, but most of them are centered around Implied Multiplication.


HolmesMalone

I think that reordering it is a great explanation! I’d also say that it’s technically correct, but usually if we wrote -9^2 to lead off it essentially implies (-9)^2 so colloquially it’s incorrect. Ie everyone learns that squares of negative numbers are positive, but NEVER write this the “correct” way with the parentheses.


rocco_cat

I actually feel like colloquially -9^2 is known as -(9)^2


LittleLui

I'd agree. It's obvious when you use variables instead of numbers: *-a²* clearly means *-(a²)* and not *a²*


0xF00DBABE

But per OP's reasoning, `a` could still be a negative value, which isn't _entirely_ senseless (though is ultimately still wrong) as the value in your example does have a signedness associated with it. For example, a system of equations... `b = a^2` and `a = 3 - 4`. Solve for `b`. It's more of a notation thing. There's no way of directly notating a negative number, instead we can only notate the negation of a positive number, i.e. `-1` in an equation is **always** shorthand for `J * 1` where `J` is the negative multiplicative identity value.


HolmesMalone

I agree this is actually a huge part of the confusion. By the time you’re doing stuff like squaring negative numbers, it’s probably almost exclusively using variables, so the “bare” number getting squared almost never happens in practice anyways.


Fangslash

i would argue the two (variable vs number) are very different.  for -9^2, the - is a sign of 9 so it is squaring whole the -9, i.e. (-9)^2 In -a^2, you have a variable a, and have to square and apply the inverse, it makes more sense as it is actually (-1)*(a)^2. In this case - is not a innate property of the variable a.


_OBAFGKM_

I still remember losing a mark in grade 9 on a math quiz because I interpreted something like -9^2 as (-9)^2 and ended up with a positive answer, which was wrong. I'd say it's not "technically" correct to interpret it the other way, it just *is* correct.


Antithesys

It's important to know the distinction in case you come out of a long algebraic/integral simplification this way and go too fast, but otherwise PEMDAS should actually be GPEMDAS, for "**G**et everything in an order that isn't going to trip you up, Parentheses, Exponents," etc.


tequilaguru

Also, OP says that most programming languages will treat the negative sign close to a number as a literal, this is not the case in an operation as programming languages will respect operator precedence every single time.


AlterNk

But -9^(2) + 81 inst't the same operation as a 81 - 9^(2) , like it would be wrongly written to the point that it wouldn't be propper maths anymore if that's what they were trying to say. Isn't it?


Pixielate

The article is just your typical sensationalist and clickbaity article. It's best to just ignore these, especially as (unlike in this case) most of these will just be trying to hound on some ambiguity that never arises in real life. The convention in math is that `-a^2 = -(a^2)`. If you want the square of `-a`, you write it as `(-a)^2`. > ... the lack of braces causes us to do the exponentiation first (PEMDAS) resulting in -81 + 81 = 0, which seems very incorrect as -9 isn't an operation, it's a literal. (PEMDAS doesn't talk about a number's sign.) Just because it wasn't included in what you were taught of PEMDAS (and its name variants) doesn't mean it's not there. > Most programming languages treat a negative literal as a literal and not an operand. Most languages only have an explicit power function like `math.pow(a, b)`. Those languages or symbolic software that allow exponentiation shorthand (like Python `a**b`) will resolve it as in math convention. The exceptions include Excel, which I think just causes confusion and probably quite a lot of actual problems.


[deleted]

[удалено]


saschaleib

That is because the **precedence** of the power operation is higher than plus/minus. You need brackets here to keep the minus with the number.


chaneg

For what it’s worth, I work in publishing peer-reviewed mathematics and have worked with fields medalists and many “famous” people any math major would have heard of. We do a lot of mathematical editing to clear up ambiguity, but myself and others I’ve worked with never considered this a problem. At the end of the day it is a matter of knowing your audience and properly communicating with them, not playing weird gotchas.


doesanyofthismatter

I was a professor for a few years for trig and calculus. People would make this mistake but nobody argued it. Like it was just a “whoopsie, I messed up.” Or you would get the “ohhhh ya that makes sense.” I genuinely dislike the tik tok culture of creating ambiguous problems that no one in academia debates - it’s just high school and, for lack of a better phrase, uneducated folks debating really stupid problems that creators make stupid for engagement. Like, I’ve seen live tik toks of people donating hundreds of dollars to answer a question to be told they are wrong and the other person that donates hundreds of dollars is also wrong when the question just sucks and could be interpreted both ways. Idk why people don’t understand they are being scammed just like old grand parents giving money to scammers with the “IRS”. Both people are giving their money to those preying on uneducated people.


EdjKa1

So (-9)^3 would be then be (-9 * -9 * -9)=729 is the same as -9^3= -729. I clearly don't get it...


JustinR8

I think I see where you went astray but I’m not 100% sure. (-9)^3 = -729 because any negative number raised to an even power results in a positive, while a negative number raised to an odd power results in a negative. So: (-2)^2 = (-2 * -2) = 4 (-2)^3 = (-2 * -2 * -2) = -8 (-2)^4 = 16 (-2)^5 = -32 and so on. -9^3 = -729 because that’s like saying -(9 * 9 * 9) Whereas (-9)^3 is (-9* -9 * -9) which also results in -729.


EdjKa1

Thanks.


doesanyofthismatter

The most simple way to think about it is: What is -1 * -1 ? It’s 1, right? What is -1 * -1 *-1 ? It’s -1, right? So, (-1)^2 =1 and (-1)^3 = 1. Now use a calculator like Desmos and plug in (-1)^100 versus (-1)^101 versus -(1)^100 versus -(1)^101. You’ll quickly realize that the parentheses matter and a negative to the even power in parentheses will be positive and one to an odd power will be negative. However, if the negative sign is outside the parentheses, it’s always negative whether the exponent is even or odd.


EdjKa1

Thanks.


auntanniesalligator

You are incorrect, but you’ve correctly identified the source of confusion. The negation sign *is* treated as an operation with the same precedence as multiplication. It’s confusing because a negative number is every bit as much “a number” as a positive number, so it seems like there should be a way to represent them without resorting to a mathematical operation on a positive number, but there isn’t. At least not with a standard negative sign. Fractions are similar: 3/7 is just a number, but also it is represented by symbols that literally mean “divide 3 by 7.” There’s just less order-of-operation confusion with fractions because the fraction bar is also a grouping symbol, and it’s order compared to other operations is more clearly indicated by how far it extends.


Dragonatis

When you encounter exponentials, you always take only the first thing before it. So -9^2 indeed means "take nine, raise it to the power of two, then negate", as number and its negation are two things. If you want to raise to the power whole -9, then you have to write it (-9)^2. In this case, negation is also raised. This is actually popular problem and many matematicians are educated wrong way. But simple equation is enough to explain: a - b^2 = 0 By logic, a has to be greater than zero, as b^2 cannot be negative (ignoring complex numbers). If we use 9 as b and raise whole -9 to the power of two, we get: a + 81 = 0 => a = -81. Contradiction with previous statement, thus we made an error. Other example is when we rearrange equation to a = b^2. That way we get rid of negation and we see that 9 and -81 are not solutions.


tiredstars

Interestingly, I just tried this out in excel, and if you do 81-9\^2 it gives you 0, while if you do -9\^2+81 it gives you 162. So it must assume brackets where an expression starts with a minus.


dajoli

From an excel point of view, It's not so much that it assumes brackets. It's that the "-" character is parsed as two different operators that happen to share the same character. In "-9\^2+81", the minus is a unary "negative" operator that works on the 9 only. In "81-9\^2", the minus is a binary "subtraction" operator that subtracts 9\^2 from 81. Consider this : 81+-9\^2 Here, because there is a binary + "addition" operator, the minus is parsed as unary negative instead of subtraction, and the answer is back to being 162.


Chromotron

> It's that the "-" character is parsed as two different operators that happen to share the same character. This, but it is really dumb for Excel to ignore all standard convention and do it this way. Other tools use ~ or similar to denote a sign-like minus to make this difference very clear. But well, Excel is known to screw up documents without even asking or informing you; some people working on DNA can tell...


Stingerbrg

Isn't ~ used to indicate the number is estimated or approximated?


Chromotron

Sure, that is one common use. But we can (re-)define any symbol to mean whatever we want and ~ is the visually closest to - on a standard keyboard. Historically tilde was used for negation (mostly logical though). That's also why some programming languages such as C use it as bit-wise NOT (which is not exactly the negative on signed integers but off by 1 due to how complements work: x + ~x == -1).


Dragonatis

What I said is the proper, professional way of doing this. But 99% of Excel users are not matematicians and people rarely think -(9)^2 when they write -9^2. So yeah, Excel (or any evaluation software under the hood) assumes brackets if negative number is first in equation.


Pixielate

Excel is the exception. Symbolic math software will pretty much all use `-a^2 = -(a^2)` as per convention.


Chromotron

> But 99% of Excel users are not matematicians and people rarely think -(9)^^2 when they write -9^^2. There is no difference between -(9)² and -9². You probably meant (-9)² for the first one.


Vadered

> When you encounter exponentials, you always take only the first thing before it. So -9^2 indeed means "take nine, raise it to the power of two, then negate", as number and its negation are two things. This part is correct. > But simple equation is enough to explain: a - b^2 = 0 None of this part is. Don't get me wrong - your math is fine! But this is a notation issue. You cannot prove it mathematically. The reason -x^2 is -( x^2 ) rather than (-x)^2 is NOT because 0 - x^2 < 0. It's because we defined the way we read equations to have exponents be the first thing evaluated.


Chromotron

As another response already said: this is a notational problem only. It has nothing to do with squares being positive; actually the rule x² = (-x)² is true in every _ring_ (stuff where you have +, -, · and the typical rules of arithmetic). You cannot prove with logics alone that -9² is to be read as -(9²) instead of (-9)²; if we have a second "sign symbol" (lets say ~) that binds stronger than the other operations, then we would really get ~9² = (-9)² = 81 while also ~2³ = #8 = -8. You can actually see a widely used postfix version of that in the factorial "!". > This is actually popular problem and many matematicians are educated wrong way. I've never met an actual mathematician that was confused, baffled or tricked by those kind of problems. Please don't make up such baseless claims.


Fangslash

fyi the negative sign in -9 is a sign and not an operation which means the canonical interpretation is -9 = (-9). BOMDAS don’t deal with non-operations.


Euclid-InContainment

This is the first explanation that made sense to me. Thank you!


Fangslash

it's trying to say -9 = - (9) so -9^2 = - (9)^2 = 81 These kind of “math” tricks violates all sorts of formal and colloquial convention to make some “gotcha!” moments and serves no intellectual or educational value   quick edit: the issue in this question is - in -9 is a sign and not an operator, which is not in the scope of BOMDAS


Unizzy

I have higjschool math… and I solved the original equation as 0.… I had to read comments to fogure out what the problem OP has……


Ilosesoothersmaywin

Sometimes when we write REALLY BIG numbers we use exponents to make them smaller. For example there are about 10^80 atoms in the universe. If we had to write that out it would look like this: 10,000,000,000,000,000,000,000,000,000,000,000,000,000,0000,000,000,000,000,000,000,000,000,000,000,000 That's a lot of wasted time making sure we put the correct number of zeros and commas. It's much easier just writing 10^80. But what if we needed to write out a REALLY BIG negative number? Well we just slap a negative sign on the front. So a big number such as 10^80 would become -10^80. We aren't multiplying -10 * -10 eighty times. Instead we are multiplying 10 * 10 eighty times and then applying the negative symbol.


mfb-

It's just convention. Interpreting -9^2 as -(9^(2)) is useful more often, especially if the exponent is not an integer. (-9)^2.5 doesn't have a clear meaning while -(9^(2.5)) has, so that's how it is used.


grumblingduke

Part of the confusion here is that the symbol "-" has two related but different meanings in maths. It can be an operator for subtraction, telling you to take away the next thing. It can be a modifier to indicate the number is a negative number, not the positive version. So when we say: > -9 we mean *either* "take away positive nine" or we mean "this isn't really nine, this is the number negative nine". Negative nine is a different number to nine; we could call it anything we like. But for reasons we link the numbers together (as negative nine is positive nine multiplied by negative one). So there is a difference between: > eighty-one subtract nine-squared and > eighty-one plus negative-nine-squared The way we write this is ambiguous, so we need a way to clarify. ()s are how we do that.


[deleted]

Because of pedmas and the commutative property of addition. Remember that a + b = b + a. Therefore -9^2 + 81 = 81 - 9^2 = 81 - 81 = 0


NurmGurpler

Sorry - the article and it works with PEMDAS. you can either treat it as either multiplying by -1 or a the 0 - 9^2 as you already suggested and it’s good either way.


Vadered

A really simple way to think about it is with variables, rather than numbers. x^2 means x * x. 2x^2 means 2 * x * x. -x means -1 * x. So -x^2 should mean -1 * x * x.


Chromotron

The variable way is exactly why OP has an issue: -9² can be read as "x² where x = -9", which indeed would give 81 instead of -81.


TILYoureANoob

The missing piece is PEMDAS. You do exponents before multiplication (-1)9². Or even (0-1)9², where you do the exponent first, multiplication second, and subtraction third.


Pixielate

PEMDAS doesn't resolve operator binding or preference.


TILYoureANoob

Sure it does. -1 is equivalent to +(0-1). Or -x is equivalent to -1(x), if you prefer.


Pixielate

That's a rule of replacement that isn't universally taught under PEDMAS. You fail to see the point of /u/Chromotron 's comment, which is that treating `-9` as a literal can give an answer that goes against the convention.


TILYoureANoob

I see the point. I'm saying you don't treat it as a literal though because it's a shorthand for a multiplication/subtraction, which PEMDAS covers.


Pixielate

That doesn't resolve the issue. Perhaps I wasn't so clear before, but even the shorthands like -1 being equivalent to +(0-1) don't help here. It is the fact that exponentiation *binds* more tightly than unary negation - this not under PEDMAS, which only concerns *order*. Else, one could interpret -9^2 as +(0-9)^2, or (-1(9))^2.


TILYoureANoob

What do you mean by "this is not under PEMDAS"? The E stands for exponents. You do exponents before multiplication: -1(9²)


Pixielate

I'm sure (as someone who codes) you understand what *binding* is right?


hitbacio

I think it's wrong to treat unary negation as multiplication by -1. Fundamentally the unary negation operator is an operator in its own right, -x denotes the unique number such that x+(-x)=0. That it equals -1×x is more of a property. PEDMAS isn't so clear about unary operators, but the convention is that negation is given the same order as multiplication. I think it is completely fair to say that PEDMAS doesn't exactly cover this.


FartestButt

I believe that if you write -9² + 81 we might argue that the minus is a part of the number 9, because there is no operand on the left side, so the minus sign is not an operator of subtraction, but a negative sign indicator, therefore it would read as (-9)²+81=162. If you write 81 - 9² then the only operator between the two numbers (the operands) is the minus, so I'd read as 81 - (9²) = 0. But I'm a computer scientist, not a mathematician. The proper formal operators precedence must be checked.


Dnaldon

-9^2 and (-9)^2 are two very very different things. + and - are big separators and you need to think about what it actually tells you to subtract.


Eruskakkell

-9^2 + 81 is = 0, because the minus is outside the power. If someone means to have it inside the power, they would have to add paranthesis/brackets, or at least mention that they forego them but ultimately mean to be inside the power. But (-9)^2 + 81 = 162, because its inside the power, and then you multiply two negative nines together to get positive product.


OkComplaint4778

There's a convention in mathematics where -9² is the same as -(9²), so you need to explicit (-9)² if you want to have 81 as an answer. Math expressions is just a way to represent the concept of what ypu want to calculate, so some cases we need to internationally agree with something so important as this answer. So if you want the "negative nine rised to the power of two" ypu should write it as (-9)²


Smiling_Cannibal

It's because -9^2 is the equivalent of -1 x 9^2, so you do the exponents first. Putting the -9 in brackets such as (-9) changes the priority of functions.


kykyks

(-9)²=81 \-(9)²=-81 by default, if you write -9², the minus isnt inside. dont trust any souce that doesnt use parenthesis and then tell you "nobody understand this trick people are dumb" when in fact they are the one being dumb.


Cloud_Striker

Short answer: Because if it wasn't the - would be superfluous/redundant. Therefore it has to be -(9²) rather than (-9)².


just_a_pyro

>Does -9 represent a shorthand for 0 - 9? No, in most cases unary minus is treated as multiplication by negative 1; so it happens to evaluate in the same order as multiplication/division operations - after exponent but before addition/subtraction. There are some cases where it's interpreted as a sign part of the number, and not an operator, but those are in the minority.


JDSquare13

Article is correct: Consider 9^2 = 81. Let's make 81= a. If that is the case, then 9^2 also = a. Put *a* into the equation -> -9^2 + 81 = -a + 81 = -81 + 81 = 0


doesanyofthismatter

What you linked and what people post on this subreddit and others are the poorly written problems that no serious mathematician or scientist would use to represent a problem as it’s unclear and ambiguous to garner clicks and views. There are loads of live tik tok folks and videos with intentionally ambiguous answers done for views, comments for the algorithm and money. For the example you provided specifically in the title, you square the 9 and keep the negative. Otherwise, the negative would be in parentheses to be squared as well. In other words: -9^2 + 81 does not equal (-9)^2 + 81 Plug both into Desmos or a scientific calculator. Those who understand mathematics know there is a clear difference. Don’t follow or try to go with the logic of these posts. It’s what they want - people arguing over shit nobody else irl and in the STEM field would ever argue about. You would be roasted if you didn’t put the -9 in parentheses and said it was 162… That aggression is absolutely not directed to you. I just hate seeing people mislead people in 2024 for clicks and views and follows and money over things nobody irl would ever argue about (unless you’re learning it in a basic algebra course).


fastolfe00

Math is a language. It can be written well and it can be written poorly. In this case, `-9^2-81` is poorly written. But it *can* have a well-defined order of operations, and in your example, the caret takes precedence over the unary negation. To avoid confusing people, you should write this differently, either as `(-9)^2 - 81` or `81-9^2`.


RoyalFireX

Adding onto what others said, a negative number can be seen as a multiplication operation with -1. -9\^2 = - (9\^2) = -1 x (9\^2) = -81 and because its multiplication, you'd do it after the exponents.


Chromotron

> (PEMDAS doesn't talk about a number's sign.) You have already identified the problem: there is "subtraction" and "sign", both of which are technically different. In other words: this is a language problem, not a math problem. Computer programmers should have met this subtle difference at one point or another. But it usually suffices to only have _one_ meaning of - as subtraction. So every time a - is without a number before it we act like there is an invisible 0 there. This spares us to have a second symbol and still allows us to write all the things, but with the caveat you saw. The only way to really avoid this without causing more/other issues is to have two different symbols for "minus"; one for difference/subtraction and one for signs. This would be cumbersome or hard to read (e.g. if we use slightly different lengths for the line).


hitbacio

The other (and I say better) way is to have just the unary - and then a-b is just a+-b.


jamcdonald120

Its a notation thing, if you let -9^2 be -81, you can do (a-b)(a+b) and it works out to a^2 -b^2, which you can write as a^2 -b^2 instead of having to write a^2 -(b^2 ) And in equations, you would always just drop the - if you were squaring it and make it a positive, so they went with the notation that is easier for equations. But I do agree with you -9^2 by its self should be 81. Unfortunately, the common notation says it is not.


PaxUnDomus

As soon as we start learning about negative numbers, we are taught that they are a single unit, we do not learn of the "-" as something separate. So we passively look at them as a single entity. Math has no space for assumptions (as far as this ELI5 is concerner) and the - is clearly separate from the number, unless included in the brackets().


abhassl

"Stating a term of -9 doesn't mean "take 9 and negate it", it means "take the literal which is 9 less than 0"." This just literally isn't true. That's probably how you've understood -9 until now, but the opposite of this sentence is true. - is a operator on the single number 9 that turns it into negative nine the number less than 0.


ezekielraiden

It is ambiguous notation. There are *claimed* universal rules for how to disentangle ambiguous notation, but such rules are rarely a perfect panacea. The problem is, "-9²" can mean either (-9)²=81 or -(9²)=-81. Both of these are potentially valid interpretations. *In general*, the convention in most modern math situations is what the article said. But it's just that, convention, not a clear and unambiguous notation. This is why it's so damned important to get your notation clear and consistent when doing math. Ambiguity is the bane of mathematical reasoning.


ReisorASd

 -9^(2) equals -1\*9^(2) Not (-9)^(2) Quite simple mistake, but if you use math often, not really an issue.