What Is a Function? Inputs, Outputs, f(x) and the Vertical Line Test
Functions as machines, how to read and evaluate notation, the vertical line test for graphs, and piecewise functions that use different rules on different inputs.
Think of a function as a machine. You feed in an input, the machine applies its rule, and out comes exactly one output. "Double it and add 1" is a function: goes in, comes out; goes in, comes out.
The defining rule: each input has one output. Two inputs may share an output ( sends both and to ), but one input may never produce two outputs.
Function notation
names the function and states its rule. is read " of " and means the output when the input is .
does not mean times . The brackets hold the input.
Find .
You can also work backwards. If and , then , so . And you can feed in expressions: .
The vertical line test
On a graph, an input is an -value and its output is the height above it. If a vertical line crosses the graph twice, that input has two outputs, so the graph is not a function.
At the sideways parabola has two heights, so it fails the test.
A graph is a function if every vertical line crosses it at most once.
Piecewise functions
A piecewise function uses different rules on different parts of its domain. Taxi fares, tax bands and phone tariffs often work like this.
The two pieces meet at , so there is no jump.
Using above, find and .
- 1
, so use the first piece: .
The absolute value function is piecewise in disguise: is when and when .
At a boundary, check whether the pieces meet. If they do, the graph joins up there, which is what calculus calls being continuous.
Common questions
- What makes something a function?
Each input must have exactly one output. A rule that could give two different answers for the same input is not a function.
- What does f(x) mean?
It is the output of the function for the input . If , then .
The What Is a Function? lesson has worked examples and unlimited practice that adapts to you.