The order in which we evaluate expressions can be ambiguous. Take, for example, the expression \(-4+2 \cdot 8\). If we perform the addition first, then we get \(-16\) as a result (the question mark over the equal sign indicates that the result is questionable). \[\begin -4+2 \cdot 8 &\overset -2 \cdot 8\\ &\overset-16 \end \nonumber \] On the other hand, if we perform the multiplication first, then we get \(12\) as a result. \[\begin -4+2 \cdot 8 &\overset -4 + 16\\ &\overset12 \end \nonumber \] So, what are we to do? Of course, grouping symbols would remove the ambiguity.
Grouping Symbols Parentheses, brackets, and absolute value bars can be used to group parts of an expression. For example: \[3+5(9-11) \quad \text
Thus, if the example above is grouped as follows, we are forced to evaluate the expression inside the parentheses first. \[\begin
Simplify: \(-3-4 \cdot 8\).
Solution
Because of the established Rules Guiding Order of Operations, this expression is no longer ambiguous. There are no grouping symbols or exponents present, so we immediately go to rule three, evaluate all multiplications and divisions in the order that they appear, moving left to right. After that we invoke rule four, performing all additions and subtractions in the order that they appear, moving left to right.
\[\begin -3-4 \cdot 8&= -3-32 \quad \color \text < Multiply first: >4 \cdot 8=32 \\ &= -3+(-32) \quad \color \text < Add the opposite. >\\ &= -35 \quad \color \text < Add: >-3+(-32)=-35\\ \text -3-4 \cdot 8&= -35 \end \nonumber \]
Simplify: \(-4+2 \cdot 8\).
Answer
When simplifying expressions, observe the following rule to neatly arrange your work:
One equal sign per line.
This means that you should not arrange your work horizontally.
That’s three equal signs on a single line. Rather, arrange your work vertically, keeping equal signs aligned in a column.
Solution
There are no grouping symbols or exponents present, so we immediately go to rule three, evaluate all multiplications and divisions in the order that they appear, moving left to right.
Answer
Example \(\PageIndex\) can be a source of confusion for many readers. Note that multiplication takes no preference over division, nor does division take preference over multiplication. Multiplications and divisions have the same level of preference and must be performed in the order that they occur, moving from left to right. If not, the wrong answer will be obtained.
Here is what happens if you perform the multiplication in Example \(\PageIndex\) before the division.
\(\color\text\) Multiplications and divisions must be performed in the order that they occur, moving from left to right.
Solution
Recall that for any integer a, we have \((-1)a =-a\). Because negating is equivalent to multiplying by \(-1\), the Rules Guiding Order of Operations require that we address grouping symbols and exponents before negation.
Thus, \((-7)^2 = 49\), but \(-7^2 = -49\). Note: This example demonstrates that \((-7)^2\) is different from \(-7^2\).
Answer
Let’s try an example that has a mixture of exponents, multiplication, and subtraction.
Solution
The Rules Guiding Order of Operations require that we address exponents first, then multiplications, then subtractions.
Answer
The Rules Guiding Order of Operations require that expressions inside grouping symbols (parentheses, brackets, or curly braces) be evaluated first.
Solution
The Rules Guiding Order of Operations require that we first evaluate the expressions contained inside the grouping symbols.
Answer
Like parentheses and brackets, you must evaluate what is inside them first, then take the absolute value of the result.
Solution
We must first evaluate what is inside the absolute value bars.
Answer
When grouping symbols are nested, the Rules Guiding Order of Operations tell us to evaluate the innermost expressions first.
Solution
The Rules Guiding Order of Operations require that we first address the expression contained in the innermost grouping symbols. That is, we evaluate the expression contained inside the brackets first.
Answer
A variable is a symbol (usually a letter) that stands for an unknown value that may vary.
Let’s add the definition of an algebraic expression.
When we combine numbers and variables in a valid way, using operations such as addition, subtraction, multiplication, division, exponentiation, the resulting combination of mathematical symbols is called an algebraic expression.
\[2a, \quad x+5, \quad \text \quad y^ \nonumber \]
being formed by a combination of numbers, variables, and mathematical operators, are valid algebraic expressions.
An algebraic expression must be well-formed. For example, \[2+-5x \nonumber \] is not a valid expression because there is no term following the plus sign (it is not valid to write \(+−\) with nothing between these operators). Similarly, \[2+3(2 \nonumber \] is not well-formed because parentheses are not balanced.
In this section we will evaluate algebraic expressions for given values of the variables contained in the expressions. Here are some simple tips to help you be successful.
Tips for Evaluating Algebraic Expressions
Evaluate the expression \(x^-2xy+y^\) at \(x=-3\) and \(y=2\).
Solution
Following Tips for Evaluating Algebraic Expressions, first replace all occurrences of variables in the expression \(x^-2xy+y^\) with open parentheses. Next, substitute the given values of variables (\(-3\) for \(x\) and \(2\) for \(y\)) in the open parentheses.
Finally, follow the Rules Guiding Order of Operations to evaluate the resulting expression.
Answer
If a fraction bar is present, evaluate the numerator and denominator separately according to the Rules Guiding Order of Operations, then perform the division in the final step.
Evaluate the expression \[\dfrac \nonumber\] at \(a=5, b=-3, c=2,\) and \(d=-4\).
Solution
Following Tips for Evaluating Algebraic Expressions, first replace all occurrences of variables in the expression \((ad−bc)/(a+b)\) with open parentheses. Next, substitute the given values of variables (\(5\) for \(a\), \(-3\) for \(b\), \(2\) for \(c\), and \(-4\) for \(d\)) in the open parentheses.
Finally, follow the Rules Guiding Order of Operations to evaluate the resulting expression. Note that we evaluate the expressions in the numerator and denominator separately, then divide.
Answer
The graphing calculator is a splendid tool for evaluating algebraic expressions, particularly when the numbers involved are large.
Use the graphing calculator to simplify the following expression: \[-213-35[-18-211(15-223)] \nonumber \]
Solution
The first difficulty with this expression is the fact that the graphing calculator does not have a bracket symbol for the purposes of grouping. The calculator has only parentheses for grouping. So we first convert our expression to the following:
Note that brackets and parentheses are completely interchangeable. The next difficulty is determining which of the minus signs are negation symbols and which are subtraction symbols. If the minus sign does not appear between two numbers, it is a negation symbol. If the minus sign does appear between two numbers, it is a subtraction symbol. Hence, we enter the following keystrokes on our calculator. The result is shown in Figure \(\PageIndex\).
Figure \(\PageIndex\): Calculating \(-213-35[-18-211(15-223)]\)
Use the graphing calculator to evaluate: \[-2-2[-2-2(-2-2)] \nonumber \]
Answer
Use the graphing calculator to evaluate: \[\dfrac \nonumber \]
Solution
You might ask “Why do we need a calculator to evaluate this exceedingly simple expression?” After all, it’s very easy to compute.
Well, let’s enter the expression \(5+5/5+5\) in the calculator and see how well we understand the Rules Guiding Order of Operations (see first image in Figure \(\PageIndex\)). Whoa! How did the calculator get \(11\)? The answer is supposed to be \(1\)! Let’s slow down and apply the Rules Guiding Order of Operations to the expression \(5+5/5+5\).
Aha! That’s how the calculator got \(11\).
\[5+5 / 5+5 \quad \text < is equivalent to >\quad 5+\dfrac+5 \nonumber \]
Let’s change the order of evaluation by using grouping symbols. Note that:
\[\begin (5+5) /(5+5) &=10 / 10 \quad \color \text < Parentheses first. >\\ &= 1 \quad \color \text < Divide: >10/10 = 1 \end \nonumber \]
Enter \((5+5)(5+5)\) and press the ENTER key to produce the output shown in the second image in Figure \(\PageIndex\)).
Figure \(\PageIndex\)): Calculating \(\dfrac\)
Use the graphing calculator to evaluate: \[\dfrac \nonumber \]
Answer
The graphing calculator has memory locations available for “storing”values. They are lettered A-Z and appear on the calculator case, in alphabetic order as you move from left to right and down the keyboard. Storing values in these memory locations is an efficient way to evaluate algebraic expressions containing variables. Use the ALPHA key to access these memory locations.
Figure \(\PageIndex\)): Upper half of the TI-84.
Use the graphing calculator to evaluate \(|a|-|b|\) at \(a=-312\) and \(b=-875\).
Solution
First store \(-312\) in the variable \(A\) with the following keystrokes. To select the letter \(A\), press the ALPHA key, then the MATH key, located in the upper left-hand corner of the calculator (see Figure \(\PageIndex\)).
Next, store \(-875\) in the variable B with the following keystrokes. To select the letter \(B\), press the ALPHA key, then the APPS key.
The results of these keystrokes are shown in the first image in Figure \(\PageIndex\).
Now we need to enter the expression |a|−| b|. The absolute value function is located in the MATH menu. When you press the MATH key, you’ll notice submenus MATH, NUM, CPX, and PRB across the top row of the MATH menu. Use the right-arrow key to select the NUM submenu (see the second image in Figure \(\PageIndex\)). Note that abs( is the first entry on this menu. This is the absolute value function needed for this example. Enter the expression \(\operatorname(\mathrm)-\operatorname(\mathrm)\) as shown in the third image in Figure \(\PageIndex\). Use the ALPHA key as described above to enter the variables A and B and close the parentheses using the right parentheses key from the keyboard. Press the ENTER key to evaluate your expression.
Figure \(\PageIndex\): Evaluate \(|a|-|b|\) at \(a=-312\) and \(b=-875\).
Use the graphing calculator to evaluate \(|a-b|\) at \(a=-312\) and \(b=-875\).
Answer
This page titled 1.2: Order of Operations is shared under a CC BY-NC-ND 3.0 license and was authored, remixed, and/or curated by David Arnold via source content that was edited to the style and standards of the LibreTexts platform.