An expression means a statement that is we desire to convey. In mathematics many different situations are conveyed in an algebraic form. Those are called as mathematical expressions. In this article let us define and describe one of such forms, namely Numerical Expressions.

## Numerical Expression Definition

In general an expression is defined as a mathematical statement in which variables, constants (mostly real numbers) and all algebraic operators are present. This is more explicitly called as algebraic expression. Such expressions, in most cases, form a part of a function (or a relation).

But, if an expression is built with only with numbers, then it is a special type of expression called as numerical expression. Thus the numerical expression definition is ‘an expression that contains only numbers and all algebraic operators’.

Now, the question is how the numerical expressions are formed? It is a valid question because the topic of algebra deals always a general situation. But in many situations we may have to ‘evaluate’ an algebraic expression for a given value of the variable.

For example, if f(x) = x + 3, the right side is an algebraic expression. But if you want to know what is f(2), then we have to plug in x = 2 and hence f(2) = 2 + 3. Now the right side has become a numerical expression.

## Numerical Expression Solver

Numerical expressions (unlike the algebraic ones) are not meant to be left in the expression form. In other words, those are to be simplified by evaluating.
Considering the same example cited earlier, if f(x) = x + 3, then f(2) = 2 + 3 which is simplified by just adding 2 + 3 = 5.

But all algebraic expressions are not that simple and may have a number of terms connected by multiple operators. Also a term may have a parenthesis or may be a power expression or may a combination of both.

Suppose you are given a particular value of the variable and asked to evaluate the expression for that value of the variable. First task is easy. Plug in the given value for the variable wherever it appears and now the expression is a numerical expression.

But how do you proceed to evaluate, meaning simplify the numerical expression? Which operation is to be done first? We cannot always do the operations in the same order as that of order in which the expression is formed.

For example, if the expression is. 2 + 3 * 4 , then evaluating in the same order as 5 * 4 = 20 is highly incorrect.

Alright, then what is the method of simplification in general or what is the numerical expression solver? Mathematicians formed a rule for the order in which you have to simplify a numerical expression. That rule is famously known as ‘order of operations’. What does the rule say?

It is probable that a numerical expression may have many terms connected with all algebraic operations in between the terms. Also, a term may have a parenthesis or may be a power expression.
So, in general, the method of simplification of a numeric expression must be done in the following order.

1) Simplify the terms in all the parentheses.

2) Evaluate all the power expressions for the exponents in each power expression.

3) Do the multiplication and division that appears after the above steps. It may be noted that it is not that you have to do all the multiplications first and then do all the divisions. Both these operations have equal priority and hence, do the operation whichever comes in the order from left to right.

4) Finally complete all the additions and subtractions.

We can frame a word with all the first letters highlighted above as PEMDAS, which prompts us to follow the order of operations. This word also can be remembered from a humorous phrase ‘Please Excuse Me Dear Aunt Sally’.

## Numerical Expression Examples

To illustrate the correct method of evaluating a numerical expression let us show some numerical expression examples and the method to evaluate those.
Let us first take the same simple example we stated earlier.

### Solved Examples

Question 1: Solve 2 + 3 * 4
Solution:

We stated that the answer of 20 is highly incorrect because the operation of addition of 2 + 3 is done first instead of the priority for multiplication of 3 * 4.
So the correct order is, 2 + 3 * 4 = 2 + 12 = 14.

Question 2: 5 + (2 + 7)2 ÷ 3 * 4 – 1 = ?
Solution:

As per PEMDAS, the first operation is, (2 + 7) = 9. So, the first step is,

5 + (2 + 7)2 ÷ 3 * 4 – 1 = 5 + 92 ÷ 3 * 4 – 1. The next priority is to evaluate the exponent. So,

5 + 92 ÷ 3 * 4 – 1 = 5 + 81 ÷ 3 * 4 – 1.  Now, since the operator of division is seen first, do the operation of division first.

5 + 81 ÷ 3 * 4 – 1 = 5 + 27 * 4 – 1. Now, do the multiplication.

5 + 27 * 4 – 1 = 5 + 108 – 1. Next do the addition.

5 + 108 – 1 = 113 – 1. Finally do the subtraction.

113 – 1 = 112.

Thus the correct evaluation for the given numerical expression is 112.