maths.freeNumber Theory › 3. Real Number Systems and Number Theory › Order of Operations

Order of Operations

Simplify expressions using order of operations.

Order of Operations

After completing this module, you should be able to:

  1. Simplify expressions using order of operations.
  2. Simplify expressions using order of operations involving grouping symbols.

Simplify Expressions Using Order of Operations

The order in which mathematical operations is performed is a convention that makes it easier for anyone to correctly calculate. They follow the acronym EMDAS:

EExponents
M/DMultiplication and division
A/SAddition and Subtraction

So, what does EMDAS tell us to do? In an equation, moving left to right, we begin by calculating all the exponents first. Once the exponents have been calculated, we again move left to right, calculating the multiplications and divisions, one at a time. Multiplication and division hold the same position in the ordering, so when you encounter one or the other at this step, do it. Once the multiplications and divisions have been calculated, we again move left to right, calculating the additions and subtractions, one at a time. Additions and subtractions hold the same position in the ordering, so when you encounter one or the other at this step, do it. (You may have previously learned the order of operations as PEMDAS, with parentheses first; we will add that aspect later on.) We’ll explore this as we work an example.

Using Two Order of Operations

Try it.

Calculate \(21-4\times 13\).

Solution

There are no exponents in this expression, so the next operations to check are multiplication and division.

Step 1: Moving left to right, the first multiplication encountered is 4 multiplied by 13. We perform that operation first.

\(\begin{array}{l}21-4\times 13 \\ =21-52\end{array}\)

Step 2: The only operation remaining is the subtraction.

\(21-52=-31\).

So, \(21-4\times 13=-31\).

Using Two Order of Operations

Try it.

Calculate \(4\times {8}^{3}\).

Solution

Step 1: Moving left to right, we see there is an exponent. We calculate the exponent first.

\(4\times {8}^{3}=4\times (8\times 8\times 8)=4\times 512\)

Step 2: The only operation remaining is the multiplication.

\(4\times 512=2,048\)

So, \(4\times {8}^{3}=2,048\).

Using Three Order of Operations

Try it.

Calculate \(2+{3}^{2}\times 4\).

Solution

Step 1: To calculate this, move left to right, and compute all the exponents first. The only exponent we see is the squaring of the 3, so that is calculated first.

\(2+{3}^{2}\times 4=2+(3\times 3)\times 4=2+9\times 4\)

Step 2: Since the exponents are all calculated, now calculate all the multiplications and divisions moving left to right. The only multiplication or division present is 9 times 4.

\(2+9\times 4=2+36\)

Step 3: Moving left to right, perform the additions and subtractions. There is only one such operation, 2 plus 36.

\(2+36=38\)

So, \(2+{3}^{2}\times 4=38\).

Even if the expression being calculated gets more complicated, we perform the operations in the order: EMDAS.

Condensed — the full section is in OpenStax Contemporary Mathematics.

Using the Order of Operations Involving Grouping Symbols

We have examined how to use the order of operations, denoted by EMDAS, to correctly calculate expressions. However, there may be expressions where a multiplication should happen before an exponent, or a subtraction before a division. To indicate an operation should be performed out of order, the operation is placed inside parentheses. When parentheses are present, the operations inside the parentheses are performed first. Adding the parentheses to our list, we now have PEMDAS, as shown below.

PParentheses
EExponents
M/DMultiplication and division(division is just the multiplication by the reciprocal)
A/SAddition and subtraction(subtraction is just the addition of the negative)

As said previously, parentheses indicate that some operation or operations will be performed outside the standard order of operation rules. For instance, perhaps you want to multiply 4 and 7 before squaring. To indicate that the multiplication happens before the exponent, the multiplication is placed inside parentheses: \({(4\times 7)}^{2}\).

This means operations inside the parentheses take precedence, or happen before other operations. Now, the first step in calculating arithmetic expressions using the order of operations is to perform operations inside parentheses first. Inside the parentheses, you follow the order of operation rules EMDAS.

Prioritizing Parentheses in the Order of Operations

Try it.

Correctly apply the rules for the order of operations to accurately compute the following:

\((10-3)\times {5}^{3}\).

Solution

Step 1: Perform all calculations within the parentheses before all other operations.

\((10-3)\times {5}^{3}=7\times {5}^{3}\)

Step 2: Since all parentheses have been cleared, move left to right, and compute all the exponents next.

\(7\times {5}^{3}=7\times 125\)

Step 3: Perform all multiplications and divisions moving left to right.

\(7\times 125=875\)

Be aware that there can be more than one set of parentheses, and parentheses within parentheses. When one set of parentheses is inside another set, do the innermost set first, and then work outward.

Condensed — the full section is in OpenStax Contemporary Mathematics.

Key Concepts

  • Establishing shared rules on which arithmetic operations are calculated first is necessary. Without them, different people may find different values for the same expression.
  • The highest precedence is with expressions in parentheses. This allows parts of an expression to be calculated in an order different than the basic order of operations.
  • The lowest precedence is addition and subtraction, as they are the basis for all other calculations.
  • Multiplication and division have precedence over addition and subtraction, as they are representations of repeated addition or subtraction.
  • Exponents have precedence over multiplication and division, as they represent repeated multiplication and division.

Practice (8)

Try each one on paper first. Reveal the answer to check; verified ones can be opened in the solver for every step.

  1. Calculate \(21-4\times 13\).

    Жавобни кўрсатиш

    There are no exponents in this expression, so the next operations to check are multiplication and division.

    Step 1: Moving left to right, the first multiplication encountered is 4 multiplied by 13. We perform that operation first.

    \(\begin{array}{l}21-4\times 13 \\ =21-52\end{array}\)

    Step 2: The only operation remaining is the subtraction.

    \(21-52=-31\).

    So, \(21-4\times 13=-31\).

  2. Calculate \(4\times {8}^{3}\).

    Жавобни кўрсатиш

    Step 1: Moving left to right, we see there is an exponent. We calculate the exponent first.

    \(4\times {8}^{3}=4\times (8\times 8\times 8)=4\times 512\)

    Step 2: The only operation remaining is the multiplication.

    \(4\times 512=2,048\)

    So, \(4\times {8}^{3}=2,048\).

  3. Calculate \(2+{3}^{2}\times 4\).

    Жавобни кўрсатиш

    Step 1: To calculate this, move left to right, and compute all the exponents first. The only exponent we see is the squaring of the 3, so that is calculated first.

    \(2+{3}^{2}\times 4=2+(3\times 3)\times 4=2+9\times 4\)

    Step 2: Since the exponents are all calculated, now calculate all the multiplications and divisions moving left to right. The only multiplication or division present is 9 times 4.

    \(2+9\times 4=2+36\)

    Step 3: Moving left to right, perform the additions and subtractions. There is only one such operation, 2 plus 36.

    \(2+36=38\)

    So, \(2+{3}^{2}\times 4=38\).

  4. Correctly apply the order of operations to compute the following:

    \(4-25\times 6/10\times {3}^{2}+7\times {2}^{3}\).

    Жавобни кўрсатиш

    Step 1: To do so, calculate the exponents first, moving left to right. There are two occurrences of exponents in the expression, 3 squared and 2 cubed.

    \(4-25\times 6/10\times {3}^{2}+7\times {2}^{3}=4-25\times 6/10\times 9+7\times 8\)

    Step 2: Now that the exponents are calculated, perform the multiplication and division, moving left to right. The first is the product of 25 and 6.

    \(\begin{array}{l}4-25\times 6/10\times 9+7\times 8 \\ =4-150/10\times 9+7\times 8\end{array}\)

    Step 3: Next is the 150 divided by 10.

    \(\begin{array}{l}4-150/10\times 9+7\times 8 \\ =4-15\times 9+7\times 8\end{array}\)

    Step 4: Next is 15 multiplied by 9.

    \(\begin{array}{l}4-15\times 9+7\times 8 \\ =4-135+7\times 8\end{array}\)

    Step 5: Finally, multiply the 7 and 8.

    \(\begin{array}{l}4-135+7\times 8 \\ =4-135+56\end{array}\)

    As all the multiplications and divisions have been calculated, the additions and subtractions are performed, moving left to right.

    \(\begin{array}{l}4-135+56 \\ =-131+56 \\ =-131+56 \\ =-75\end{array}\)

    The computed value is −75.

  5. Correctly apply the rules for the order of operations to accurately compute the following:

    \(10-3\times {5}^{3}/15+56/4\).

    Жавобни кўрсатиш

    Step 1: Calculate exponents first, moving left to right:

    \(\begin{array}{l}10-3\times {5}^{3}/15+56/4 \\ =10-3\times 125/15+56/4\end{array}\)

    Step 2: Multiply and divide, moving left to right:

    \(\begin{array}{l}10-3\times 125/15+56/4 \\ =10-375/15+56/4 \\ =10-25+56/4 \\ =10-25+14\end{array}\)

    Step 3: Add and subtract, moving left to right:

    \(\begin{array}{l}10-25+14 \\ =-15+14 \\ =-1\end{array}\)

  6. Correctly apply the rules for the order of operations to accurately compute the following: \((-8)/2\times 3-9\times {2}^{4}/12+9\times {(-4)}^{2}/{2}^{3}\).

    Жавобни кўрсатиш

    Step 1: Calculate the exponents first, moving left to right:

    \(\begin{array}{l}(-8)/2\times 3-9\times {2}^{4}/12+9\times {(-4)}^{2}/{2}^{3} \\ =(-8)/2\times 3-9\times 16/12+9\times {12}^{2}/{2}^{3} \\ =(-8)/2\times 3-9\times 16/12+9\times 144/{2}^{3} \\ =(-8)/2\times 3-9\times 16/12+9\times 144/8\end{array}\)

    Step 2: Multiply and divide, moving left to right:

    \(\begin{array}{l}=(-8)/2\times 3-9\times 16/12+9\times 144/8 \\ =(-4)\times 3-9\times 16/12+9\times 144/8 \\ =(-12)-9\times 16/12+9\times 144/8 \\ =(-12)-144/12+9\times 144/8 \\ =(-12)-12+9\times 144/8 \\ =(-12)-12+1,296/8 \\ =(-12)-12+162\end{array}\)

    Step 3: Add and subtract, moving left to right:

    \(=(-12)-12+162=(-24)+162=138\)

  7. Correctly apply the rules for the order of operations to accurately compute the following:

    \((10-3)\times {5}^{3}\).

    Жавобни кўрсатиш

    Step 1: Perform all calculations within the parentheses before all other operations.

    \((10-3)\times {5}^{3}=7\times {5}^{3}\)

    Step 2: Since all parentheses have been cleared, move left to right, and compute all the exponents next.

    \(7\times {5}^{3}=7\times 125\)

    Step 3: Perform all multiplications and divisions moving left to right.

    \(7\times 125=875\)

  8. Correctly apply the rules for order of operations to accurately compute the following:

    \(4+2\times ({3}^{2}-{(2+5)}^{2}\times 4)/(3+8)\).

    Жавобни кўрсатиш

    Step 1: Perform all calculations within the parentheses before other operations. Evaluate the innermost parentheses first. We can work separate parentheses expressions at the same time. The innermost set of parentheses has the 2 + 5 inside. The 3 + 8 is in a separate set of parentheses, so that addition can occur at the same time as the 2 + 5.

    \(\begin{array}{l}4+2\times ({3}^{2}-{(2+5)}^{2}\times 4)/(3+8) \\ =4+2\times ({3}^{2}-{(7)}^{2}\times 4)/(11)\end{array}\)

    Step 2: Now that those parentheses have been handled, move on to the next set of parentheses. Applying the order of operation rules inside that set of parentheses, the exponent is evaluated first, then the multiplication, and then the addition.

    \(\begin{array}{l}4+2\times ({3}^{2}-{7}^{2}\times 4)/11 \\ =4+2\times ({3}^{2}-49\times 4)/11 \\ =4+2\times (-187)/11\end{array}\)

    Step 3: Since all parentheses have been cleared, apply the EMDAS rules to finish the calculation.

    \(4+2\times (-187)/11=4-374/11=4-34=-30\)

Symbols used here

\log_b x,\ \ln x
logarithm, natural log
The exponent b must be raised to for x; ln uses base e.
\sum_{k=1}^{n} a_k
summation
Add a_k for k = 1 up to n.
\prod_{k=1}^{n} a_k
product
Multiply a_k for k = 1 up to n.
\mathbb{N},\ \mathbb{Z},\ \mathbb{Q},\ \mathbb{R},\ \mathbb{C}
number sets
Naturals, integers, rationals, reals, complex numbers.
a \equiv b \pmod n
congruent modulo n
n divides a − b; a and b have the same remainder.
a \mid b,\ \gcd(a,b)
divides, greatest common divisor
b is a multiple of a; the largest number dividing both.
\varphi(n),\ \pi(x)
Euler's totient, prime-counting function
Count of 1..n coprime to n; number of primes up to x.
\mathbb{Z}/n\mathbb{Z},\ \mathbb{Z}_n
integers modulo n
The remainders 0…n−1 with clock arithmetic.
a \bmod n
remainder
What is left after dividing a by n.

How to: Order of Operations

  1. Simplify expressions using order of operations.
  2. Simplify expressions using order of operations involving grouping symbols.
  3. order of operations
  4. PEMDAS
  5. Establishing shared rules on which arithmetic operations are calculated first is necessary. Without them, different people may find different values for the same expression.
  6. The highest precedence is with expressions in parentheses. This allows parts of an expression to be calculated in an order different than the basic order of operations.
  7. The lowest precedence is addition and subtraction, as they are the basis for all other calculations.
  8. Multiplication and division have precedence over addition and subtraction, as they are representations of repeated addition or subtraction.

Questions people ask

Why are primes so important?

Every integer factors into primes in exactly one way, so primes are the atoms of multiplication. Cryptography relies on that factoring being easy to state and hard to do.

How do I tell whether a big number is prime?

Trial division up to the square root works for small numbers. For large ones, probabilistic tests (Miller–Rabin) give an answer that is wrong with negligible probability, and deterministic tests (AKS) exist but are slower.

Ўзингизни синаб кўринг

Parts of this page are adapted from OpenStax Contemporary Mathematics (CC BY-NC-SA 4.0). Condensed and re-explained here; errors are ours.

Кўпроқ Number Theory