$-3^2 = -9$
I found this problem while doing an algebra refresher in the book The Complete Idiot's Guide to Algebra. I asked my engineer brother this problem and he got it wrong. A search on Google for why is a negative number squared negative I get conflicting results.
Google presents an excerpt from a site that says the converse. "This is because to square a number just means to multiply it by itself. For example, $(-2)$ squared is $(-2)(-2) = 4$. Note that this is positive because when you multiply two negative numbers you get a positive result." - This, of course, is the exact opposite of what was asked, but it's the given response.
The third item on Google's search results offered up a math forum where the moderator, one Doctor Rick, states that whether it is interpreted as -3^2 or -(3)^2 is a difference of opinion. It's math. How can it be a matter of opinion? If an equation is being used for calculating a space craft landing, or the engineering of a bridge design, a difference of opinion on how to calulate this could prove catastrophic.
The high school math teacher that authored The Complete Idiot's Guide to Algebra presented this question as "be careful, this one is tricky" specifically to teach this situation, but since there seems to some confusion as to which is the right way to calculate this.
My scientific calculator tells me it is 9. Another question here on SE regarding calculators with this same issue, the accepted answer was that adding parentheses fixed the "issue", but doesn't address whether the calculator is getting it "wrong" because it's not actually wrong.
What is the correct answer, and why? Thanks!
Here's the issue that the other comments have been missing:
$-3^2$ does not mean "the square of negative three". The exponent takes priority over the negative: it means "the negative of $3^2$". If you want to say "the square of negative three" you write $(-3)^2$. (This also explains the issues with your programming languages - the ones that say $-9$ write it without the function notation doing the grouping for you, so the negative is applied after.)