Why is the result of $-2^2 = -4$ but $(-2)^2 =4$? I am really new into math, why is $-2^2 = -4 $ and $(-2)^2 = 4 $? 
 A: The order of operations is a convention that give us what operation should we do before. In the given examples there are three operations (given in the priority):operation in parenthesis, power,multiplication  and subtraction so we have
$$-2^2=-4\leftarrow\text{the power has the priority before the subtraction}$$
$$(-2)\cdot(-2)=4\leftarrow\text{the subtraction in the parenthesis has the priority }$$
before the multiplication.
A: Because $-2^2$ means that you take the number $2$, raise it to the second power ($^2$), and then you consider its additive inverse ($-$). So, $2$ raised to the second power is $4$, whose additive inverse is $-4$. This is because exponentiation has a higher priority and it is the first thing you have to do; hence you compute the power before doing anything else, and then you deal with the minus sign.
On the other hand, brackets can change the meaning of a mathematical expression: here $(-2)^2$ simply means that you have to raise $-2$ to the second power, and elementary algebra tells us that $(-2) \cdot (-2) = 4$.
A: It is true that $-2^2$ is ambiguous (unless you know the convention), because $-(2^2) \ne (-2)^2$.  (And, indeed, some calculators or programing languages may do it using their own convention, different from the mathematicians' convention.) The mathematicians' convention is $-2^2 = -(2^2)$.  Why?  Presumably because we often need to write $-(2^2)$.  But if you ever need to write $(-2)^2$ you can just write $2^2$ instead.
A: Universally, exponentiation is agreed to be evaluated before subtraction.
However, there are two opposing wishes that go into the design of a grammar:


*

*Negation is evaluated at the same time as subtraction, to avoid irregularities

*Unary operators are all evaluated before binary operators, to keep things simple


In the first case, $-2^2 = -4$.  In the second case, $-2^2 = 4$.  Most mathematical publications and mathematics forums will use the first case.  However, some software (I believe Haskell like grammars are an example) use the second case.
A: $ -2^2 = - \left( 2^2 \right) = -4 $, whereas $ \left( -2 \right)^2 = \left( -2 \right) \cdot \left( -2 \right) = 4 $, because the negatives cancel. 
A: By convention brackets are evaluated first, then exponentiation, division/multiplication, and finally addition/subtraction. Think of the unary negation operator as a shorthand for "multiply by -1". These rules are usually remembered by students with the BEDMAS acronym.
I prefer to think of the rules as those such that the number of brackets are minimized when writing out a polynomial. For example, consider
$$x^4+5x^3-3x^2+2x+6$$
Were multiplication to have a higher precedence than exponentiation, the expression would look like this
$$x^4+5(x^3)-3(x^2)+2x+6$$
Were the expression just evaluated left to right (no precedence rules), the expression would look like this
$$(x^4)+(5(x^3))-(3(x^2))+(2x)+6$$
Obviously the first example is the easiest to read.
Another approach is to evaluate the "strongest" operations first. Exponentiation is defined as repeated multiplication, so exponentiation is higher on the pecking order. Similarly, multiplication and divisions are defined as repeated additions (or subtractions), so multiplication and divisions would be evaluated before the additions/subtractions. If we need to change the order of operations, we use brackets as follows.
$$x^3-4x^2-11x+30 = (x-2)(x+3)(x-5)$$
Notice how the brackets force us to evaluate the additions and subtractions before the multiplications.
