• No results found

Graphs of functions

The Cartesian plane is great for visualizing functions, f : R → R.

You can think of a function as a set of input-output pairs (x, f(x)). You can graph a function by letting the y-coordinate represent the function’s output value:

(x, y) = (x, f (x)).

For example, with the function f(x) = x2, we can pass a line through the set of points

(x, y) = (x, x2), and obtain the graph shown in Figure 1.7.

The Cartesian plane When plotting functions by setting y = f(x), we use a special terminology for the two axes. The x-axis represents the independent variable (the one that varies freely), and the y-axis represents the dependent variable f(x), since f(x) depends on x.

Figure 1.7: The graph of the function f (x) = x2 consists of all pairs of points (x, y) in the Cartesian plane that satisfy y = x2.

To draw the graph of any function f(x), use the following procedure. Imagine making a sweep over all of the possible input values for the function. For each input x, put a point at the coordinates (x, y) = (x, f(x)) in the Cartesian plane.

Using the graph of a function, you can literally see what the function does: the

“height” y of the graph at a given x-coordinate tells you the value of the function f (x).

Discussion

To build mathematical intuition, it is essential you understand the graphs of func-tions. Trying to memorize the definitions and the properties of functions is a difficult task. Remembering what the function “looks like” is comparatively easier.

You should spend some time familiarizing yourself with the graphs of the functions presented in the next section.

Functions

1.13 Functions

We need to have a relationship talk. We need to talk about functions. We use functions to describe the relationships between variables. In particular, functions describe how one variable depends on another.

For example, the revenue R from a music concert depends on the number of tickets sold n. If each ticket costs $25, the revenue from the concert can be written as a function of n as follows: R(n) = 25n. Solving for n in the equation R(n) = 7000 tells us the number of ticket sales needed to generate $7000 in revenue. This is a simple model of a function; as your knowledge of functions builds, you’ll learn how to build more detailed models of reality. For instance, if you need to include a 5% processing charge for issuing the tickets, you can update the revenue model to R(n) = 0.95 · 25 · n. If the estimated cost of hosting the concert is C = $2000, then the profit from the concert P can be modelled as

P (n) = R(n) − C

= 0.95 · $25 · n − $2000

The function P (n) = 23.75n − 2000 models the profit from the concert as a function of the number of tickets sold. This is a pretty good model already, and you can always update it later on as you find out more information.

The more functions you know, the more tools you have for modelling reality.

To “know” a function, you must be able to understand and connect several of its aspects. First you need to know the function’s mathematical definition, which describes exactly what the function does. Starting from the function’s definition, you can use your existing math skills to find the function’s domain, its range, and its inverse function. You must also know the graph of the function; what the function looks like if you plot x versus f(x) in the Cartesian plane. It’s also a good idea to remember the values of the function for some important inputs.

Finally—and this is the part that takes time—you must learn about the function’s relationsto other functions.

Functions

Definitions

A function is a mathematical object that takes numbers as inputs and gives numbers as outputs. We use the notation

f : A → B

to denote a function from the input set A to the output set B. In this book, we mostly study functions that take real numbers as inputs and give real numbers as outputs: f : R → R.

We now define some fancy technical terms used to describe the input and output sets.

• The domain of a function is the set of allowed input values.

• The image or range of the function f is the set of all possible output values of the function.

• The codomain of a function describes the type of outputs the function has.

To illustrate the subtle difference between the image of a function and its codomain, consider the function f(x) = x2. The quadratic function is of the form f : R → R. The function’s domain is R (it takes real numbers as inputs) and its codomain is R (the outputs are real numbers too), however, not all outputs are possible. The image of the function f(x) = x2 consists only of the nonnegative real numbers [0, ∞ ≡ {y ∈ R | y ≥ 0}.

A function is not a number; rather, it is a mapping from numbers to numbers.

For any input x, the output value of f for that input is denoted f(x).

Functions

Figure 1.8: An abstract representation of a function f from the set A to the set B.

The function f is the arrow which maps each input x in A to an output f (x) in B. The output of the function f (x) is also denoted y.

We say “f maps x to f(x),” and use the following terminology to classify the type of mapping that a function performs:

• A function is one-to-one or injective if it maps different inputs to different outputs.

• A function is onto or surjective if it covers the entire output set (in other words, if the image of the function is equal to the function’s codomain).

• A function is bijective if it is both injective and surjective. In this case, f is a one-to-one correspondence between the input set and the output set: for each of the possible outputs y ∈ Y (surjective part), there exists exactly one input x ∈ X, such that f(x) = y (injective part).

The term injective is an allusion from the 1940s inviting us to picture the actions of injective functions as pipes through which numbers flow like fluids. Since a fluid cannot be compressed, the output space must be at least as large as the input space. A modern synonym for injective functions is to say they are two-to-two. If we imagine two specks of paint floating around in the “input fluid,” an injective function will contain two distinct specks of paint in the “output fluid.” In contrast, non-injective functions can map several different inputs to the same output. For example f(x) = x2 is not injective since the inputs 2 and −2 are both mapped to the output value 4.

Functions