Skip to main content

How to Use Operator Precedence in Algebra

By Kathleen Knowles, 03 Jul 2020

The mathematical term operator refers to the various symbols used in arithmetic and other branches of mathematics to represent a type of mathematic manipulation. This definition, however, does not capture all aspects of mathematics. The widespread use of operators in programming and physics makes the meaning behind "operator" too big to be described in a few sentences.

Regardless, an operator in algebraic terms tells us what type of calculation to perform on an expression involving two numbers.

Algebra and Operators

Algebra is a branch of mathematics involving the study and manipulation of symbols using defined laws. These laws apply to almost all branches of mathematics.

Algebra's unique feature is that it uses letters and other symbols to represent numbers. These are called variables. The use of variables permits the assignment of different numerical values depending on the situation.

For example, in the expression, x + 2, the letter x can assume any value. Let's assign it the value of 5. The sum of the expression is, therefore, 7.

The operator in this expression is “+”. It defines how x and 2 should be manipulated. In this case, we add the variable with 2.

Operator Precedence AKA Order of Operations

There are situations in algebra when more than one operator is used in an expression. We must now determine which operation to do first.

Here is an example of this instance:

x + y * 6

Let's now assume x = 2 and y = 3. Your possible solutions could be:

Case 1:               2 + 3 * 6 = 5 * 6 = 30

Case 2:               2 + 3 * 6 = 2 + 18 = 20

The math in both cases is correct, but according to Operator Precedence, also known as Order of Operations, only one case is the right answer.

Why Operator Precedence Exists

If we used the above mathematical expression to represent a process or some other phenomenon, another person who uses the expression might arrive at a different result. Without a law to the expression, it opens it up to inconsistent usage.

To resolve this problem, mathematicians all over the world agreed on which operators should have precedence over others.

The Order of Operations Explained

Anything in parentheses and brackets is calculated first, regardless of the operator inside. Exponents and square roots are calculated second. Multiplication and division hold precedence over addition and subtraction.

If you are in the US, you can remember this order by the acronym PEMDAS (Parentheses, Exponents, Multiplication, Division, Addition, Subtraction).

In other English speaking countries, including Nigeria, they use the variation BODMAS (Bracket Of Division, Multiplication, Addition, and Subtraction).

Convention also states that if operators are of the same precedence -- as is the case with multiplication/division and addition/subtraction -- then the expression should be evaluated from left to right.

The rules of Operator Precedence apply even if variables are used instead of numbers.

Example 1

Step 1: 6 + 3 * 4 + 8

Step 2: 6 + 12 + 8 = 26

Multiplication was done before addition. Note on the second step of the evaluation that addition was the only operator. Based on the commutative nature of addition (6 + 3 = 3 + 6 = 9), an expression involving only addition can be done in any order.

Example 2

Step 1: 2 * 6 / 3 – 3

Step 2: 12 / 3 – 3

Step 3: 4 – 3 = 1

Both multiplication and division are at the same precedence, so the expression is evaluated from left to right.

Example 3

Step 1: 2 * 2^3 + 11

Step 2: 2 * 8 + 11

Step 3: 16 + 11 = 27

The exponential is evaluated first before the multiplication.

Example 4

Step 1: (3 + 2) ^ 2

Step 2: 5 ^ 2 = 25

Here, brackets are used to break the convention by forcing the addition operator to be evaluated before the exponentiation.

Example 5

Step 1: [5 – (8 - 5)] * 2

Step 2: (5 - 3) * 2

Step 3: 2 * 2 = 4

Where the brackets are nested, a different type of brackets may be used, such as square brackets or curly braces.

Other Cases

There are some situations when you may be unsure of the order in which you should solve a multi-operator equation. Despite your knowledge of operator precedence, when you're given a lot of data, it can throw you off. Here are some common instances you may encounter:

Cascaded Exponentials

3 ^ 2 ^ 2 = 3 ^ 4 = 81.

In cascading exponentials, the cascaded powers are evaluated first.

Division

100 / 10 / 2

The correct order of division is from left to right.

10 / 2 = 5

If done the other way, it will be 100 / 5 = 20.

Division is not commutative. However, multiplication is commutative and will yield the same answer regardless of the direction of operation.

Implied Multiplication

There are cases when multiplication is not explicit, such as 2 / 3x. This expression should be evaluated as 2 / (3x). The implied multiplication in the denominator takes precedence over the division.

Conclusion

Knowing the correct order of operator precedence is important in various fields such as computer programming, physics, and all areas of mathematics. Fortunately, it is easy to learn this useful tool.

Be the first to comment below.

Leave a comment




Comment Preview

HTML: You can use simple tags like <b>, <a href="...">, etc.

To enter math, you can can either:

  1. Use simple calculator-like input in the following format (surround your math in backticks, or qq on tablet or phone):
    `a^2 = sqrt(b^2 + c^2)`
    (See more on ASCIIMath syntax); or
  2. Use simple LaTeX in the following format. Surround your math with \( and \).
    \( \int g dx = \sqrt{\frac{a}{b}} \)
    (This is standard simple LaTeX.)

NOTE: You can mix both types of math entry in your comment.

Subscribe

* indicates required

SquareCirclez is a "Top 100" Math Blog

SquareCirclez in Top 100 Math Blogs collection
From Math Blogs

top