-5^2 again, why oh why?

283 Views Asked by At

I know this has been discussed before (Why is $-5^2=-25$?) but this makes no sense in my head, maybe someone can clarify.

To me $-5^2$ means the number $-5$ (a number in $\mathbb R$), squared. It's not $0 - 5^2$ where $-$ is an operation.

Put in other words:

$x^2$ with $x=-5$

How come $-5^2$ is then interpreted as $5$ squared then negated.


EDIT: Adding some additonal info since it seems the point wasn't conveyed enough.

I understand the operator precedence. And if this was a question of $2-5^2$, it would be obvious, it's 2 minus 5squared.

But what I don't get is why the convention states that -5 is not a number (5 in the negative $\mathbb R$ axis), but a "magical" 0-5.

I don't know, in my programming brain it just doesn't make sense :)

3

There are 3 best solutions below

1
On

Think about, for instance, $3 - x^2$ when $x = 5$. What do you think its value should be?

3
On

It is about the order of operations. When we write $(-x)^2$, what it means is $(-1)^{2}(x)^2$. Hence, it equal to $x^2$. On the other hand, $-x^2$ means $(-1)(x^2)$. Therefore, when we write $(-5)^2$, it mean $(-1)(5^2)$ = $-25$.

7
On

You seem to be considering $-5$ as an elementary expression, and separate from the subtraction operation $0 - 5$. Most mathematicians would actually consider $-$ to be primarily a unary operation which transforms one number into another one. In particular, $-5$ denotes the solution to the equation $5 + x = 0$. Thus, $-5$ is neither a shorthand for $0 - 5$ nor ane elementary expression, but rather a unary operation applied to an input.

That we read $-5^2$ as $-(5^2)$ rather than $(-5)^2$ is just convention.

On a side note, subtraction can then be seen as just a shorthand rather than a primary operation. The expression $0 - 5$ is an abbreviation for $0 + (-5)$.