Functions explained
A function is a rule that takes an input and produces exactly one output. This guide explains function notation, domain and range, how to evaluate a function, and the vertical line test that checks whether a graph is one.
What a function is
Write a function as f(x), read f of x, where x is the input. The defining feature is that each input gives one and only one output; feeding in the same x always returns the same value. A function is a reliable machine: same input in, same output out.
Domain and range
The domain is the set of allowed inputs, and the range is the set of possible outputs. Some functions accept any number; others have restrictions, such as not dividing by zero or not taking the square root of a negative. Identifying the domain and range describes where a function lives.
Evaluating a function
- Replace the variable in the rule with the input value.
- Carry out the arithmetic.
- The result is the output for that input.
If f(x) = 2x + 1, then f(3) = 2(3) + 1 = 7. The input 3 produces the output 7.
The vertical line test
On a graph, a relation is a function only if no vertical line crosses it more than once. That is the visual version of the one-output rule: if a single x mapped to two y values, a vertical line would hit the curve twice. Straight lines and standard parabolas pass; sideways parabolas and circles fail.
- A function maps each input to exactly one output.
- Notation f(x) means the output of the function for input x.
- The domain is the allowed inputs; the range is the possible outputs.
- Evaluate a function by substituting the input into the rule.
- The vertical line test checks whether a graph is a function.
Keep learning
Browse the Guides hub for more algebra and math topics.
FAQ
What is a function in math?
A rule that assigns exactly one output to each input, often written f(x).
What is the domain of a function?
The set of all valid input values the function can accept.
What is the vertical line test?
A graph represents a function if no vertical line intersects it more than once.
