Now that we have defined the concept of a function, we’ll spend the rest of Chapter IntroductiontoFunctions revisiting families of curves from prior courses in Algebra by viewing them through a ‘function lens’. We start with lines and refer the reader to Section AppLines for a review of the basic properties of lines. The simplest lines are vertical and horizontal lines. We leave it to the reader (see Exercise whynoverticallineshere) to think about why we eschew vertical lines in our discussion here, and begin with a functional description of horizontal lines.

Consider the horizontal lines graphed in the \(xy\)-plane as shown below. The Vertical Line Test, Theorem VLT, tells us that each describes \(y\) as a function of \(x\) so the question becomes how to represent these functions algebraically. The key here is to remember that the equation relating the independent variable \(x\), the dependent variable \(y\), and the function \(f\) is given by \(y = f(x)\).

Figure 1: Graphs of constant functions
Show Alt Text Three examples of horizontal lines

In the graph on the left, \(y\) always equals \(3\) so we have \(f(x) = 3\). Procedurally, ‘\(f(x) = 3\)’ says that the rule \(f\) takes the input \(x\), and, regardless of that input, gives the output \(3\). This is an example of what is called a constant function - a function which returns the same value regardless of the input. Likewise, the function represented by the graph in the middle is \(f(x) = -2\), and the graph on the right (the \(x\)-axis) is the graph of \(f(x) = 0\). In general, we have the following definition:

Some remarks about Definition constantfunction are in order. First, note that we are using ‘\(x\)’ as the independent variable, ‘\(f\)’ as the function name, and the letter ‘\(b\)’ as a parameter. In this context, a parameter is a fixed, but arbitrary, constant used to describe a family of functions. Different values of \(b\) determine different constant functions. For example, \(b = 3\) gives \(f(x) = 3\), \(b = -2\) gives \(f(x) = -2\), and so on. Once \(b\) is chosen, however, it does not change as the independent variable, \(x\), changes.

Also note that we are using the generic defaults for function names and independent variables, namely \(f\) and \(x\), respectively. The functions \(G(t) = \sqrt {\pi }\) and \(Z(\rho ) = 0\) are also fine examples of constant functions. Recall that inherent in the definition of a function is the notion of domain, so we record (as part of the definition) that a constant function has domain \((-\infty , \infty )\). The range of a constant function is the set \(\{b \}\). The value \(b\) in this case is both the maximum and minimum of \(f\), attained at each value in its domain.

The next example showcases an application of constant functions and introduces the notion of a piecewise-defined function.

One of the favorite piecewise-defined functions in mathematical circles is the greatest integer of \(x\), denoted by \(\lfloor x \rfloor \). In Section setsofnumbersboxonthispage we defined the set of integers as \(\mathbb {Z} = \{ \ldots , -3, -2, -1, 0, 1, 2, 3, \ldots \}\). The value \(\lfloor x \rfloor \) is defined to be the largest integer \(k\) with \(k \leq x\). That is, \(\lfloor x \rfloor \) is the unique integer \(k\) such that \(k \leq x < k+1\). Said differently, given any real number \(x\), if \(x\) is an integer, then \(\lfloor x \rfloor = x\). If not, then \(x\) lies in an interval between two integers, \(k\) and \(k+1\) and we choose \(\lfloor x \rfloor = k\), the left endpoint.