Number multiplied by itself does not give a square number

734 Views Asked by At

The answer to this is probably very simple but while working on a question I was surprised to discover than a number multiplied by itself does not give the same answer as the same number squared (in the case of negative numbers).

Examples:

$-1^2 = -1$

If I now multiply this number by itself $-1 * -1$ I get $1$

$-4^2 = -16$

$-4 * -4 = 16$

The same goes for all the other negative numbers I tried.

What changes when squaring a number and how do I understand what is going on? When I multiply a positive number by itself I get a square number, why does this not work with negative numbers?

1

There are 1 best solutions below

1
On BEST ANSWER

Note that the square of $-1$ is $$ (-1)^2 = (-1)\times (-1) = 1 \ne -1 .$$ You've mixed up operator precedence by putting $$ -(1)^2 = - (1) \times (1) = - 1 . $$

In general $-(x)^2$ is $- (x\cdot x)$, because exponentiation has a higher operator precedence than negation. You can read more about the order of operations here.