Expression Evaluation, Including Variables and Functions

If you have been following the links from top to bottom on the Expression Evaluation page, you probably noticed that variables and functions were mentioned early on, and then afterwards, through most of the material, only numbers were used in the examples.

That is because the main topics under discussion when explaining the evaluation of expressions concern operators, operands, and precedence. The operands we used were numbers, but any symbol representing a value could have been used, and all of the conclusions would remain the same.

In other words, here is an expression that has in it he numbers 4, 5, and 6, and the subtraction and division operators:

4 - 5 / 6

As stated earlier, division has precedence over subtraction, so five is divided by six, and this value is then subtracted from four.

Here is a similar situation with variables and functions, rather than numbers, representing values:

x - f(x) / y

The same rules of precedence apply. The output value of the function, f(x), is divided by the value of y, producing some intermediate value. This intermediate value is then subtracted from x to get the final value for the expression.

Of course, you would need to know the actual values for x, f(x), and y to come up with the actual final value for this expression. The purpose here, though, is to note that the order of operations works the same for numbers, variables, and functions.


And now we will examine an interesting note about the raise to a power operation, and how it is written for numbers, variables, and functions.

The proper notation for the power of a number, say the second power of 4, is:


The proper notation for the power of a variable, say the second power of x, is:


But, the proper notation for the power of a function, say the second power of f(x), is not:


Correctly written, the second power of f(x), or f(x) squared, is:


Although it is usually not seen, this would be the same as (f(x))2. So:

f2(x) = (f(x))2


Now, also note that:

4-1 means 1/41 or 1/4


x-1 means 1/x1 or 1/x


f-1(x) does not mean 1/f(x)

The symbol f-1(x) means the inverse of the function f(x). And inverse functions really have nothing to do, (necessarily), with reciprocals. If you want to state 1/f(x) using notation similar to above, then:

(f(x))-1 means 1/f(x)


Where are you?

Introduction to Expressions

Other Representations Besides Numbers for Values

Introduction to Operators and Operands

More about Operators and Operands

Unary Operations

Raise to a Power Operation


Here: And Now Including Variables and Functions

Just a Few Notes about Multiplication

Terms and Factors


Custom Search