My textbook says that the additive inverse of a number is represented by $-$ (minus sign). For example the additive inverse of a number $-1$ is typed like this: $-(-1)$, and the additive inverse of a number $1$ is then typed like this; $-1$.
In the book there are also some example calculations and this is what confuses me:
$$-2^2 = -4\quad\text{and}\quad (-2)^2 = 4$$
I've always thought $-n^2$ simply like $(-n)\times(-n)$. But according to my textbook this is wrong and $-n^2$ actually means $-(n\times n)$
I tried to wrap my head around this and played with it for a while and found out that when i type $-2^2$ to the Microsoft Windows calculator, I'll get the (wrong?) answer of $4$. But when I type this to my calculator (Casio fx-991EX) I'll get the answer of $-4$.
I think many people will just write $-2^2$ when they actually mean $(-2)\times(-2)$ and depending how you'll look at the minus sign gives you two completely different answers.
So which one is right? Is the minus sign really a notation for additive inverse of the operation.
Which is the correct answer?
$$-2^2 = -4\quad\text{or}\quad-2^2 = 4$$
As stated by others, this simply boils down to order of operations (you can use your favourite acronym to help you, such as PEDMAS, or in the UK: BIDMAS).
So with ${-2^2}$, we have no Parenthesis, but we do have an Exponent, so we calculate this part first. ${2^2 = 4}$. Hence ${-2^2=-4}$.
With ${(-2)^2}$, we do have Parenthesis, then an Exponent - so ${(-2)^2 = (-2)(-2)=+4}$.
I'd like to mention this is all just convention. We could change the meaning of ${-2^2}$ to mean ${(-2)(-2)=+4}$, but the universal convention is to follow PEDMAS (or BIDMAS) since that's what everyone agrees upon. Otherwise it'd be very difficult to people to understand each other's calculations. We just need a set of rules such that given any expression - two people that try to evaluate it following the same set of rules will arrive to the same answer (so there is no ambiguity). Overtime - you will become so used to the order of operations, you won't need to use PEDMAS or BIDMAS any longer, and you will have a natural understanding of an expression when you see it.