# When to apply negative sign when number is squared

I always had this confusion of when I need to apply the negative sign in the calculation. I understand that $$(-1)^2 = 1$$ however why isn't $$-1^2 = 1$$?

• because $(-1)^2=(-1)*(-1)=1$, but $-1^2 =-(1^2)=-(1*1)=-(1)=-1$ – Luke Apr 21 at 22:01
• Though beware Excel and some similar cases, where =-1^2 gives 1 but =0-1^2 gives -1, because if interprets the former as $(-1)^2$ and the latter as $0-(1^2)$, i.e. the first - as a unary operation taking precedence over exponentiation and the second - as a binary operation with exponentiation taking precedence over it – Henry Apr 21 at 22:14
• Just for an example, that's the same as writing $-1 \times 1^2 = 1$, which probably is pretty clear that it's not true – MCMastery Apr 21 at 23:40

When we write $$-x^2$$, it means we square $$x$$ first, then take the negative of this. That is, $$-x^2 = -\left(x^2\right).$$ So $$-1^2 = -\left(1^2\right)=-1.$$ (And thus $$-x^2$$ means something different to $$(-x)^2$$.)
$$(-x)^2\neq-x^2$$ To avoid confusion, it is better to use parentheses. $$-x^2=-(x^2)$$