What Is a Function?
Learning goals
- Require exactly one output for each input
- Read as the output at three, not a product
- Evaluate by substituting everywhere and simplifying
- Apply the vertical line test to a graph
- State the domain and range, excluding what a rule forbids
- Show one function as a rule, table, graph or words
A function is a rule with one output for each input
A function is a rule that takes an input, does something definite to it, and hands back exactly one output. 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, because every person has one height at this moment. Turn that around, though, and consider “assign to each height the person who is that tall.” That rule is not a function, because plenty of different people share a height, so a single input would have many outputs.
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 a bare is not enough
You already have a way to write outputs, the letter , so why bother with anything new? Because quietly drops two pieces of information you often need.
The first is the name of the rule. 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 you cannot tell in an equation which you mean. Function notation gives each rule its own name. Call one rule , another , another , and now , , and are three distinct machines you can discuss without confusion.
The second is the input that was used. Start from and compute the output when :
You get , but the symbol "" has already forgotten that the input was . Compute the output at as well and you get a second "", and nothing in the notation ties either output back to the input that made it. Once a page has several of these, the bookkeeping falls apart.
Function notation fixes both problems in one stroke. Write the same rule as
read aloud as ” of equals .” The letter names the rule, and whatever you put in the parentheses is the input. Now the output at is written , and you can record the whole fact on one line, input and output together:
Each statement carries its own input, so no output is ever orphaned. That is the payoff: names the rule so several rules can coexist, and pins the 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:
Three inputs, three 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 .
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.
Why the vertical line test works#
Every point on the graph of a rule is an ordered pair (input, output). The input is plotted as the point’s horizontal coordinate, and the output as its vertical coordinate. Fix any single input, say . Every point that shares this input has the same horizontal coordinate , so all of them lie on one vertical line, the line . No point with a different input lies on that line. The points of the graph that this vertical line passes through are therefore exactly the outputs the rule assigns to the input .
Now apply the definition of a function. The rule is a function precisely when no input has two outputs. In the picture, that means the vertical line can contain at most one point of the graph, for every choice of . If some vertical line met the graph in two points, those two points would share the input but have different outputs. A single input with two outputs is exactly what a function forbids.
So a graph represents a function if and only if no vertical line crosses it more than once. The test is not a separate rule to memorize; it is the phrase “one output per input” translated into a picture. An input the rule leaves undefined simply has no point above it, which is why a vertical line is allowed to miss the graph entirely.
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.
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 the range is “all numbers greater than or equal to .” The input ranges over every number, but the outputs only ever fill the nonnegative side.
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:
The smallest output is , reached at , and the outputs climb without bound from there. So the range of is “all numbers greater than or equal to .”
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 .
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, while the table and the graph show you particular ones.
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.