What is a function in math?
Learn more with Tiger
A function is a rule that assigns exactly one output to each allowed input. The set of allowed inputs is the domain and the set of outputs produced is the range.
Key rule
One input may never produce two different outputs. On a graph this is the vertical line test: if any vertical line crosses the curve more than once, the curve is not a function. Two different inputs are allowed to share an output, which is why x² is still a function.
Worked example
f(x) = x² is a function: f(2) = 4 and f(−2) = 4, so one output is reused but no input has two outputs. The circle x² + y² = 25 is not a function of x, because x = 0 gives both y = 5 and y = −5.
Check: repeated outputs are fine; repeated inputs with different outputs are not.