Department of Mathematics --- College of Science --- University of Utah

Mathematics 1010 online


The concept of a function is more central in mathematics than the concept of a number. In this class we use functions only in a very narrow context, but if you go on in mathematics you will encounter functions ubiquitously in every class you take.

Domain, Range, and Rule

For the purposes of this class, you can think of a function as a machine that takes a number (the input), processes it, and produces another number (the output). A given input always produces the same output, but the same output can be produced by different inputs. The way a particular function processes the input is usually described by an algebraic expression (sometimes called the rule). Processing a particular input $ x $ is called evaluating the function at $ x $. The set of all numbers for which you can in fact evaluate the function is called the domain of the function, the set of all possible outputs you obtain in this manner is called the range of the function.

For example, consider the equation

$\displaystyle f(x) = 1+\frac{1}{x}. $

This defined a function whose name is $ f $. (Any letter can be used to be the name of a function, but $ f $ and $ g $ are used particularly frequently.) To obtain the function value (or the value of $ f $) at a number $ x $ we divide $ 1 $ by $ x $ and add $ 1 $. For example, when $ x=1 $ we obtain

$\displaystyle f(1) = 1+\frac{1}{1} = 2. $

The domain of $ f $ is the set of all real numbers except $ x=0 $ since we must not divide by zero. The range of $ f $ is the set of all real numbers except $ 1 $ since in order for $ f(x) $ to equal $ 1 $, the expression $ \frac{1}{x} $ would have to be zero which is not possible.

Sometimes you will be asked to determine the domain of a function. There are more subtle situations, but in this class the domain is always the set of all real numbers, except those where you cannot evaluate the expression. Usually the only reason you might be unable to evaluate a function is that the relevant expression might call for a division by zero, or the computation of a square root of a negative number.

For example, the domain of the function

$\displaystyle g(x) =
\frac{1}{(x-1)(x-2)} $

is the set of all real numbers except $ 1 $ and $ 2 $, and the domain of the function $ h(x) = \sqrt{x} $ is the set of all non-negative numbers (i.e., $ x\geq 0 $).

Evaluating a Function

It is easy to be confused about just what it means to evaluate a function. Functions can be evaluated not just at numbers, but also at algebraic expressions, and at other function values. Let's look at some examples. Suppose that $ u $ is defined

$\displaystyle u(x) = 2x + 1. $


$\displaystyle \begin{array}{rcl} u(1) &=& 2\times 1 + 1 = 3 \\  u(-2) &=& 2\tim...
... 2x+2 + 1 = 2x+3 \\  u(u(x)) &=& 2u(x) + 1 = 2(2x+1)+1 = 4x +
3\\  \end{array} $

Combining Functions

Functions can be combined in various ways to create new functions. Suppose $ u $ and $ v $ are two functions, and $ \bullet $ is one of the arithmetic operations $ + $, $ - $, $ \times $, or $ \div $. Then a new function

$\displaystyle w = u\bullet v $

is defined by

$\displaystyle w(x) = (u\bullet v) (x) = u(x)\bullet v(x). $

In other words, the value of the sum, difference, product, or ratio of two functions is the sum, product, difference, or ratio of the corresponding function values.

For example, suppose as before that

$\displaystyle u(x) = 2x + 1 $

and let

$\displaystyle v(x) =
x^2. $


$\displaystyle \begin{array}{rcl} (u+v)(x) &=& x+1 + x^2 \\  (u-v)(x)
&=& x+1-x^...
...= x^3+x^2 \\  (u\div v)(x)
&=& {\displaystyle \frac{x+1}{x^2}} \\  \end{array} $

Composition of Functions

A function can be evaluated at the value of another (or the same) function. This is called the composition of functions. The composition $ w $ of two functions $ u $ and $ v $ is denoted by

$\displaystyle w =
u \circ v $


$\displaystyle w(x) = u(v(x)). $

For example, letting $ u $ and $ v $ be defined as before we have

$\displaystyle (u\circ v)(x) = u(v(x)) = 2v(x) +
1 = 2x^2 + 1. $

Note that, on the other hand,

$\displaystyle (v \circ u) (x) = v(u(x)) =
(u(x))^2 = (2x+1)^2 = 4x^2 + 4x + 1. $


$\displaystyle u(v(x))\neq v(u(x)). $

In other words, it matters in what sequence we compose two functions. This is a major fact of life in mathematics! Mathematicians are fond of expressing this fact as

Function composition does not commute.

There are subtle issues regarding the domain and range of the functions involved. In particular, when we consider a composition like $ u\circ v $ the range of $ v $ must be a subset of the domain of $ u $.

Graph of a function.

The graph of a function $ f $ is the graph of the equation

$\displaystyle y =
f(x). $

The Figure below shows the graphs of some of the functions on this page, as indicated by color $ f $ (yellow), $ g $ (blue), $ u $ (red), and $ v $ (green).