What Is a Function?
Learning goals
- Require exactly one output for each allowed input
- Read and evaluate function notation such as and
- Apply the vertical line test to a graph
- State the domain and range of a simple rule
- Show one function as a rule, table, graph or words
A function is a rule with one output for each allowed input
A function is a rule that takes an input, does something definite to it, and hands back exactly one output for every input it allows. The doubling rule is a function: feed it and it returns , feed it and it returns . The doubling rule never leaves any doubt about which number comes out. Everyday rules work the same way: “assign to each person their exact height right now” is a function, since every person has one height at this moment, but “assign to each height the person who is that tall” is not, since many different people can share a height.
That last requirement is the whole heart of the definition, so state it plainly: a function may never send one input to two different outputs. It is perfectly allowed for two different inputs to land on the same output. Squaring sends both and to , and that is fine, because each input still has a single, definite result. What is forbidden is the reverse, one input branching into two answers.
Here is a rule that breaks the requirement. Consider “send a number to a value whose square equals it.” Give it the input and there are two numbers whose square is , namely and :
The input produces two outputs, so this rule is not a function. A function has to make up its mind, one input, one output.
Why function notation?
You already have a way to write outputs, the letter . Function notation adds two things a bare leaves out: which rule produced the output, and which input was used.
Real problems rarely involve a single relationship. You might track a car’s distance, its speed, and its fuel all at once. If every output is just called , then three different rules are wearing the same label, and an equation cannot say which it means. Function notation fixes this by naming the rule. Write to say ” is the name of the rule, and is the output it produces.” For the rule , this becomes
read aloud as ” of equals .” Different letters name different rules, so , , and can sit on the same page as three distinct machines.
Function notation also keeps the input attached to its output. Compute the output of at and at :
Each statement carries its own input, so the output is never separated from the input that made it. That is the payoff: names the rule, so several rules can appear on the same page without confusion, and pins an output to the exact input that produced it.
Reading and evaluating
Take the notation apart once so it never trips you up. In , the letter is the name of the function, and the quantity inside the parentheses is the input the rule acts on. The whole symbol stands for the output. The name can be any letter that is convenient: , , and are common. And a descriptive letter such as for an area or for a cost is even better when it reminds you what the rule does.
One warning up front, because it is the most common misread of all. The parentheses in do not mean multiplication. is not ” times ”; it means “apply the rule to the input .” There is no hidden product here, only the instruction to run the machine.
To evaluate a function at a particular input, substitute that number for everywhere it appears, then simplify. This is exactly the substitution you have done since your first algebra lesson, now wearing a cleaner label.
Worked example 1 Evaluating at several inputs
The rule is “triple the input, then subtract .” Substitute each input for and simplify.
At , replace every with :
At :
At , keep the parentheses so the sign is handled correctly:
The same substitution works even when the input is a letter instead of a number. At , replace every with and simplify only what can be simplified:
Nothing combines further, because stands for a number that has not been chosen yet, but the steps are identical to the three above: replace , then simplify.
Four inputs, four outputs, and each line records which input produced which output. Notice that has nothing to do with the output being zero; the input is , and the machine still returns its own answer.
Check your understanding
If , what is ?
Substitute for in the rule and simplify.
The input is and the output is . The parentheses tell you to apply the rule, not to multiply by .
Check your understanding
If , what is ?
Substitute for , exactly as you would substitute a number, then simplify what can be simplified.
The letter is not a number the rule can combine with , so is as simple as the output gets.
When a rule is not a function
The definition draws a sharp line: one input, one output. A rule sits on the wrong side of that line the instant a single input is tied to two different outputs. It is worth learning to spot this in the three ways relationships usually appear.
As a set of ordered pairs, a rule is a function when no input value is paired with two different output values. The set is a function, and so is , where every input lands on the same output (repeated outputs are allowed). But is not a function, because the input is paired with both and .
As a table, the same test reads down the input column: if any input appears twice with different outputs beside it, the rule is not a function. As a graph, there is a quick visual version of the test, worth knowing because you have already plotted points and lines in the coordinate plane.
Every point on a graph is an input paired with its output: the input is the point’s horizontal position, the output its vertical position. A vertical line fixes one horizontal position, so it fixes one input, and every point where that line touches the graph is an output for that input. If the line touches the graph twice, that one input has two different outputs, exactly what a function forbids. If it touches once, the input has exactly one output, and if it misses the graph entirely, that input simply is not in the domain.
Check your understanding
Look at Graph B above, on the right. Find where its dashed vertical line meets the curve. Based on the vertical line test, is Graph B a function, and why?
Every point on that dashed vertical line shares the same horizontal position, so it fixes one input. Look at where the line meets the curve: it touches at two separate points, the two solid dots, so that one input is paired with two different outputs, exactly what a function forbids. That is why Graph B fails the vertical line test, while Graph A, whose vertical line meets it only once, passes.
Worked example 2 Deciding whether a rule is a function
Test each relationship against the one rule: does any input have two different outputs?
The set is a function. The inputs are , , and , all different, and each has a single output. The output appears twice, but that is allowed, since it comes from two different inputs.
The table below is not a function:
| input | ||||
|---|---|---|---|---|
| output |
The input shows up twice with two different outputs, and . One input, two outputs, so the relationship fails to be a function:
Finally, the equation is not a function of . Choose the input and solve for the output: gives or , two outputs for one input. A vertical line at would cross its graph twice, confirming the same verdict.
Check your understanding
Which set of input-output pairs is NOT a function?
Scan each set for an input that is paired with two different outputs. In the third set the input appears twice with different outputs.
That single input with two outputs breaks the definition. The second set repeats the output , but its inputs are all different, so it is a perfectly good function.
Domain and range
Two more words complete the vocabulary, and both are just names for collections of numbers.
The domain of a function is the set of all inputs it is allowed to take. The range is the set of all outputs it actually produces. Input goes with domain, output goes with range, and you can describe each in plain words without any special symbols. In this lesson, “number” means a real number, the kind you already plot on a number line.
Most rules built from adding, subtracting, and multiplying accept every number, so their domain is simply “all numbers.” Two situations shrink the domain, and both come from operations you already know cannot be done. Division by zero is undefined, so any input that would make a denominator zero is thrown out. And in this course the square root of a negative number is not a real number, so a square root forces its inside to stay zero or positive. For example, has domain “all numbers except ,” because would divide by zero. The square root rule has domain “all numbers greater than or equal to ,” because a negative input has no real square root.
The range takes a little more thought, because it depends on what the rule can actually reach. For , every output is a square, and a square is never negative, so no output can be below . Every nonnegative number is reached too: to land exactly on some target , use the input , since . So the range is “all numbers greater than or equal to ,” the lower bound and every value above it, both accounted for.
Worked example 3 Finding a domain and a range
Find the domain of , and find the range of .
For the domain of , the only danger is a zero denominator. Set the denominator equal to zero to find the forbidden input:
Every other number is fine, so the domain of is “all numbers except .”
For the range of , start from what can do. Since for every input, adding pushes every output up by one:
A table of sample values shows the pattern; the smallest entry is , at :
No output can fall below . And every number is actually reached: solve for , which gives , a real number precisely because . So the range of is “all numbers greater than or equal to ,” with a reason for both halves of that claim.
Check your understanding
What is the domain of ?
The rule divides by , so the one forbidden input is the value that makes the denominator zero.
Every other number gives a valid output, so the domain is all numbers except .
Check your understanding
What is the range of ?
Since for every input, adding pushes every output up by .
The smallest output is , reached at . Every number is also reached, by solving to get , so the range is all numbers greater than or equal to .
Four ways to show the same function
A single function can be presented in four different outfits, and a fluent reader recognizes it in all of them. Take the rule “double the input and add one.” Here it is four ways at once.
As a rule (an equation), it is compact and ready to evaluate:
As a table, it lists sample inputs beside their outputs:
| input | ||||
|---|---|---|---|---|
As a graph, it is the collection of points in the coordinate plane, which for this rule is the straight line you would get from . As words, it is the sentence “double the input, then add one.” All four describe the very same pairing of inputs with outputs. The rule and the words tell you how to produce any output; the table shows a handful of sample pairs, while the graph pictures every pair the function has, over whatever stretch of inputs is drawn.
Check your understanding
A rule sends , , and . Which equation matches this rule?
Test each input against : , , and . All three match. The other rules fail somewhere: gives , not ; gives , not ; and gives , not .
Worked example 4 Turning words into a rule, then reading it back
A rule says “square the input, then subtract .” Write it in function notation, then find .
Translate the sentence one operation at a time. “Square the input” is , and “subtract ” appends :
Now evaluate at , substituting carefully:
So the words, the rule, and the value are three views of the same function. Going from words to notation is just naming the steps; going from notation to a value is just substitution.