Unit 1, lesson 3

Functions as Input-Output Relationships

What makes a rule a function, how a domain, a formula and a table describe the same assignment, why different inputs may share an output, and why f(x) never means multiplication.

  • Theory part 5
  • Practice part 6
  • Functions and Graphs

A vending machine is a fair picture of a function. You press a button and one particular snack drops out, the same snack every time you press that button. Two buttons may give the same snack, and that is fine. A button that sometimes gives chips and sometimes gives a candy bar would be broken. Calculus studies how outputs change as inputs change, and that only makes sense when each input has one definite output.

Key terms

Function

Definition A function ff from a set DD to a set YY is an assignment that gives to every element xx of DD exactly one element of YY. In this course DD and YY are sets of real numbers unless stated otherwise. Two conditions are built into this definition. Every element of DD gets an output, and no element of DD gets more than one.

In plain words A function takes each allowed input and hands back one output, never zero and never two.

Example On the inputs {1,2,3}\{1, 2, 3\}, the assignment 1↦51 \mapsto 5, 2↦72 \mapsto 7, 3↦53 \mapsto 5 is a function. The assignment 1↦51 \mapsto 5, 1↦61 \mapsto 6, 2↦72 \mapsto 7 is not, for two reasons. The input 11 gets two different outputs, and the input 33 gets none.

Input and output

Definition An input of a function is an element xx of its domain. The output at xx is the single element that the function assigns to xx, written f(x)f(x) and also called the value of ff at xx. The set of all outputs, {f(x)∣x∈D}\{f(x) \mid x \in D\}, is the range of ff.

In plain words The input is what you put in, the output is what comes out. In a real situation each comes with its own meaning and units.

Example Let T(m)T(m) be the temperature in degrees Celsius mm minutes after a cup of tea is poured. The input m=10m = 10 is a time in minutes. If T(10)=62T(10) = 62, the output 6262 is a temperature in degrees Celsius. Mixing the two up, for example reading T(10)=62T(10) = 62 as “after 62 minutes”, misreads the function.

Domain

Definition The domain of a function is the set of inputs on which it is defined. It is part of the function and should be stated. When a function is given only by a formula and no domain is stated, the domain is taken to be the set of all real numbers for which the formula produces a real number. A context, such as time or length, may restrict the domain further.

In plain words The domain is the list of inputs the function accepts. Change the domain and you have changed the function.

Example The formula

r(x)=1x−2r(x) = \frac{1}{x - 2}

has domain (−∞,2)∪(2,∞)(-\infty, 2) \cup (2, \infty), since x=2x = 2 makes the denominator zero. So r(4)=12r(4) = \frac{1}{2} and r(0)=−12r(0) = -\frac{1}{2}, but r(2)r(2) does not exist. If the same formula described a quantity at time xx hours after noon with 0≤x≤10 \le x \le 1, the domain would be [0,1][0, 1].

Rule

Definition A rule is a description, usually a formula, that tells how to compute the output from the input. A rule defines a function only together with a domain on which it produces exactly one output for each input. The same rule on different domains gives different functions, and a function may also be given by a rule in words or by several formulas on different parts of its domain.

In plain words The rule is the recipe. The domain says which ingredients the recipe is meant for.

Example The rule “square the input and subtract 11” is the formula g(x)=x2−1g(x) = x^2 - 1. On the domain (−∞,∞)(-\infty, \infty) it gives

g(−2)=(−2)2−1=3,g(0)=−1,g(3)=8.\begin{gathered} g(-2) = (-2)^2 - 1 = 3, \\[0.4em] g(0) = -1, \qquad g(3) = 8. \end{gathered}

Restricted to the domain [0,∞)[0, \infty), the same rule makes a different function, which no longer accepts −2-2.

Function notation

Definition The symbol f(x)f(x) denotes the output of the function ff at the input xx. The letter ff names the function, and the parentheses enclose the input. The notation does not mean ff multiplied by xx. The input may be a number or any expression in the domain, as in f(3)f(3), f(a+h)f(a + h) or f(2x)f(2x), and evaluating means substituting that whole input into the rule.

In plain words Read f(x)f(x) as “f of x”, the output when xx goes in. You cannot cancel or distribute the ff.

Example For f(x)=x2+1f(x) = x^2 + 1,

f(3)=10,f(2x)=(2x)2+1=4x2+1,2f(x)=2x2+2.\begin{gathered} f(3) = 10, \\[0.4em] f(2x) = (2x)^2 + 1 = 4x^2 + 1, \\[0.4em] 2f(x) = 2x^2 + 2. \end{gathered}

So f(2x)f(2x) and 2f(x)2f(x) are different. Also f(1+2)=f(3)=10f(1 + 2) = f(3) = 10, while f(1)+f(2)=2+5=7f(1) + f(2) = 2 + 5 = 7, so you cannot split f(1+2)f(1 + 2) as if ff were a number multiplying a sum.

Table

Definition A table of values lists inputs in one column or row and the corresponding outputs beside them. A table describes a function exactly when each listed input appears with only one output. A finite table gives the values at the listed inputs only. Values at other inputs are not determined by the table unless a rule or an assumption supplies them.

In plain words A table is a list of input and output pairs. It is a function if no input appears with two different outputs.

Example The rule g(x)=x2−1g(x) = x^2 - 1 produces this table.

xx−2-2−1-1001122
g(x)g(x)3300−1-10033

The rule, the table and a picture of arrows from each input to its output all describe the same assignment on these five inputs.

Unique output

Definition Each input of a function has a unique output. For a relation given as a set of input and output pairs, this means that whenever (x,y1)(x, y_1) and (x,y2)(x, y_2) are both pairs with the same input xx, the outputs agree, y1=y2y_1 = y_2. A relation that pairs some input with two different outputs is not a function. The reverse is not required, so different inputs may share an output, and f(x1)=f(x2)f(x_1) = f(x_2) with x1≠x2x_1 \ne x_2 is allowed.

In plain words One input, one output. Two inputs landing on the same output is fine. One input pointing to two outputs is not.

Example In the table of g(x)=x2−1g(x) = x^2 - 1 the inputs −1-1 and 11 share the output 00, and gg is still a function. Now look at this table.

Input00111122
Output44556677

The input 11 appears with the outputs 55 and 66, so this table does not define a function. If the second 11 had output 55 again, it would only repeat the same pair and cause no conflict.

Check yourself

  1. For k(x)=x+1x−3k(x) = \frac{x + 1}{x - 3}, find the domain, k(5)k(5) and k(−1)k(-1).
Show the answer

The denominator is zero at x=3x = 3, so the domain is (−∞,3)∪(3,∞)(-\infty, 3) \cup (3, \infty). The values are

k(5)=62=3,k(−1)=0−4=0.\begin{gathered} k(5) = \frac{6}{2} = 3, \\[0.4em] k(-1) = \frac{0}{-4} = 0. \end{gathered}
  1. Does the assignment 2↦02 \mapsto 0, 4↦04 \mapsto 0, 6↦16 \mapsto 1 define a function on {2,4,6}\{2, 4, 6\}? What about 2↦02 \mapsto 0, 2↦12 \mapsto 1, 6↦16 \mapsto 1 on {2,6}\{2, 6\}?
Show the answer

The first is a function, because each input has one output, and sharing the output 00 is allowed. The second is not, because the input 22 is sent to both 00 and 11.

  1. For f(x)=3x−2f(x) = 3x - 2, compute f(4)f(4) and f(x+1)f(x + 1), and explain why f(4)f(4) does not mean ff times 44.
Show the answer

The values are f(4)=3⋅4−2=10f(4) = 3 \cdot 4 - 2 = 10 and f(x+1)=3(x+1)−2=3x+1f(x + 1) = 3(x + 1) - 2 = 3x + 1. The notation f(4)f(4) means the output when the input is 44, a single number, not a product of ff and 44.

How this lesson connects