Example 1.7.13 Order of Operations

When evaluating an expression with multiple operations, we must follow the order of operations:

  1. (P)arentheses and other grouping symbols

  2. (E)xponentiation

  3. (M)ultiplication, (D)ivision, and Negation

  4. (A)ddition and (S)ubtraction

\begin{align*} 4-2\left( 3-(2-4)^2 \right)\amp=4-2\left( 3-(\nextoperation{2-4})^2 \right)\\ \amp=4-2\left( 3-\nextoperation{(\highlight{-2})^2} \right)\\ \amp=4-2\left( \nextoperation{3-\highlight{4}} \right)\\ \amp=4-\nextoperation{2\left( \highlight{-1} \right)}\\ \amp=4-\highlight{(-2)}\\ \amp=6 \end{align*}
in-context