A function is a rule assigning every input exactly one output.
y=f(x)
Quick Answer
A function is a rule assigning every input exactly one output. You use one whenever a single quantity settles another: the hours you park settle the fee, a Celsius reading settles the Fahrenheit one, the weight of a parcel settles the postage. Writing f(x) names the rule f and its output at the input x, so f(3) means the output when the input is 3. Different inputs may share an output; one input may never have two.
Why This Matters
Once a relationship is a function you can ask for the output at a given input, graph it, reverse it or chain it with another rule, and each of those moves relies on the output being unambiguous. If one input could produce two outputs, a statement like f(4)=7 would not even make sense, and a calculator could not plot the rule.
Intuitive Explanation
Picture a class list with each student's birthday. Each student has exactly one birthday, so the pairing student → birthday is a function: name a student and the date is settled. Two students can share 14 March, and that is fine. Now read the same list the other way, birthday → student. The input 14 March points to two people, so the reversed pairing is not a function. The same pairs pass or fail depending on which side is the input.
With formulas the check is the same. For f(x)=x2, the input 3 gives 9 and only 9, and so does −3. Two inputs landing on one output is allowed. On a graph, every input is a vertical line, so if every vertical line meets the graph at most once, the graph shows a function. This is the vertical line test.
Some rules look like functions but fail. The equation x2+y2=25 draws a circle, and the input x=3 gives both y=4 and y=−4. The instruction 'a number whose square is x' fails for the same reason, since 9 has two square roots, 3 and −3. That is why x is defined to give only the non-negative root: choosing one output is exactly what turns a relation into a function.
Think of it like this.A function works like a car-park ticket machine: enter how long you stayed and it prints one fee. Two different stays can cost the same, but the same stay never prints two different fees. Unlike the machine, a function's rule can be any formula, and its inputs need not be whole hours.
Core idea.A function is a rule that pairs each allowed input with one and only one output.
When to Use
Use function language when one quantity determines another: the cost depends on the weight, height is given as a function of time, or a rule is written f(x). Then test it. In a table, look for an input repeated with different outputs; on a graph, use vertical lines; in an equation, solve fory and look for a ±. If an input genuinely has several partners, as with 'people born in a given year', you have a relation. If you only need one unknown number, you have an equation to solve, not a function to study.
Tip.Ask: Does every allowed input give exactly one output, never two?
How to Recognize It
Before calling a relationship a function, look at how it is given, as pairs, a graph, an equation or a description, and test the inputs one at a time.
1.
In a table or list of pairs, does some x-value appear twice with different y-values?
Yes means a relation but not a function: the pairs (2,5) and (2,7) already break it. No means the pairs pass, and repeated outputs never matter.
2.
On the graph, can a vertical line hit the curve in two places?
Yes means two outputs share one input, so the graph is a relation; the sideways parabola x=y2 fails at x=4. If no vertical line hits twice, it is a function.
3.
When you solve the equation for y, do you get a ± or two branches?
Yes, as with x2+y2=25, means the equation describes a relation; keeping one branch, such as y=25−x2, gives a function. A single expression in x means a function.
4.
Is the problem after one unknown number rather than how one quantity depends on another?
Yes means an equation to solve, like 3x+2=11, not a function to study. If every input is supposed to get a result, function language fits.
Function compared with Relation, Equation, and Variable
All four rows involve letters and pairs of numbers, so they blur together. Ask what is being described: one quantity (variable), an equality to solve (equation), any pairing (relation), or a pairing with one output per input (function).
Function compared with Relation, Equation, and Variable
Type
Meaning
Key test
Formula
Example
Function
Use this when you have a rule and need to confirm each input produces exactly one output.
Does every allowed input give exactly one output, never two?
y=f(x)
A table shows inputs 1,2,3 mapped to outputs 5,5,7. Is this a function?
Relation
Any pairing of inputs and outputs, allowing an input to repeat with different outputs.
Use when you only have a set of pairs and have not checked the one-output rule.
set of (x,y) pairs
{(1,2),(1,3)} is a relation but not a function
Equation
A statement that two expressions are equal; it may or may not define a function.
Use when you are solving for unknowns, not assigning outputs to inputs.
—
x2+y2=25 is an equation, not a function
Variable
A single symbol standing for an unknown or changing number, not a whole input-to-output rule.
Use when you label one quantity, not the pairing between two.
—
x alone is a variable; f(x)=2x is a function
Function
Meaning
Use this when you have a rule and need to confirm each input produces exactly one output.
Key test
Does every allowed input give exactly one output, never two?
Formula
y=f(x)
Example
A table shows inputs 1,2,3 mapped to outputs 5,5,7. Is this a function?
Relation
Meaning
Any pairing of inputs and outputs, allowing an input to repeat with different outputs.
Key test
Use when you only have a set of pairs and have not checked the one-output rule.
Formula
set of (x,y) pairs
Example
{(1,2),(1,3)} is a relation but not a function
Equation
Meaning
A statement that two expressions are equal; it may or may not define a function.
Key test
Use when you are solving for unknowns, not assigning outputs to inputs.
Example
x2+y2=25 is an equation, not a function
Variable
Meaning
A single symbol standing for an unknown or changing number, not a whole input-to-output rule.
Key test
Use when you label one quantity, not the pairing between two.
Example
x alone is a variable; f(x)=2x is a function
Formula & Notation
y=f(x)
f:X→Y is a function ⟺∀x∈X,∃!y∈Y:(x,y)∈f
How to read it:f(x) denotes the output of function f at input x. Also written f:X→Y.
Worked Examples
Example 1 — Is it a function?
Easy
A table shows inputs 1,2,3 mapped to outputs 5,5,7. Is this a function?
Show the steps and the answer
Pair each input with its output: 1→5, 2→5, 3→7.
Whether a table is a function is decided input by input, so read what each input is paired with.
Scan the input row for repeats: 1, 2 and 3 each appear once.
Only an input listed twice with different outputs would break the rule, and there is none.
Note that the output 5 appears twice, for inputs 1 and 2.
Two inputs sharing an output is allowed, the way two students can share a birthday.
Answer:Yes, it is a function
Takeaway:Repeated outputs are fine. Scan the inputs: only an input paired with two different outputs stops a table from being a function.
Example 2 — Sideways parabola
Standard
Does x=y2 define y as a function of x?
Show the steps and the answer
Solve fory: y2=x gives y=±x.
The ± is the warning sign: each positive x comes with two values of y.
Test one input: x=4 gives y=2 (since 22=4) and y=−2 (since (−2)2=4).
One input with two outputs is a counterexample, and one counterexample is enough.
Picture the graph: a parabola opening to the right. The line x=4 crosses it at (4,2) and (4,−2).
The vertical line test is the same check done on a graph: two crossings means two outputs.
Compare with y=x2, where x=2 and x=−2 both give y=4.
Swapping the roles of x and y turns 'two inputs share an output', which is allowed, into 'one input has two outputs', which is not.
Answer:No, it is not a function of x
Takeaway:A ± after solving for the output means some input has two outputs. Keeping only y=x, the top half, would make it a function.
Example 3 — Find the mistake: is a circle a function?
Application
Priya is asked whether x2+y2=25 defines y as a function of x. She writes: "It is an equation in x and y, and every x I try gives me a y, so it is a function." Find the mistake and correct it.
Show the steps and the answer
Try x=3: 9+y2=25, so y2=16 and y=4 or y=−4.
Priya checked that each x gives a y; a function also needs each x to give only one.
Read the graph: x2+y2=25 is a circle of radius 5 centred at the origin, and the line x=3 meets it at (3,4) and (3,−4).
A vertical line meeting the curve twice is the graphical form of one input with two outputs.
Find the inputs with a single output: only x=5 and x=−5, where y=0.
Every input strictly between −5 and 5 has two outputs, so the failure is the rule, not a rare exception.
Split the circle into y=25−x2 (top half) and y=−25−x2 (bottom half).
Each half passes the vertical line test, which is how graphing calculators draw a circle.
Answer:Not a function: x=3 gives both y=4 and y=−4. Each half, y=25−x2 or y=−25−x2, is a function on [−5,5].
Takeaway:Being an equation is not enough. Solve fory or draw vertical lines; a single input with two outputs settles the question.
Where You'll See It
Postage priced by parcel weight
A courier charges $4 up to 1 kg, $7 over 1 kg up to 3 kg, and $12 over 3 kg up to 10 kg. Each weight gets exactly one price, so price is a function of weight, even though 0.4 kg and 0.9 kg parcels both cost $4. A price list showing two prices for 2 kg would be broken.
Celsius to Fahrenheit
The rule F=1.8C+32 turns each Celsius reading into exactly one Fahrenheit reading: 20∘C becomes 68∘F and 100∘C becomes 212∘F. Because no reading has two conversions, a weather app can apply the rule automatically to every number it shows.
Barcode scanner at a till
A scanner reads a barcode and returns one price. Thousands of barcodes can map to $1.99, and that causes no trouble. If one barcode were stored with two prices, the till could not charge the customer: that is precisely the situation a function rules out.
Common Mistakes
The slip:Calling any equation in x and y a function
Instead:check first that each x gives only one y (vertical line test).
The slip:Thinking one output can come from only one input
Instead:functions allow many inputs to share an output; they forbid one input giving many outputs.
The slip:Reading f(x) as f times x
Instead:it means the output of rule f at input x.
Mini Practice
Try these on your own. Tap Reveal when you want to check.
1.
Is the relation {(2,5),(3,7),(2,9),(4,1)} a function? Point to the specific pairs that decide it.
Hint:Look for any input that appears more than once.
2.
Given f(x)=3x2−4, find f(−2).
Hint:Replace every x with (−2) and square before multiplying.
3.
Does y=∣x−1∣ define y as a function of x? Compute y for x=3 and for x=−1.
Hint:Can any single x produce two different y values? Two inputs sharing an output is a separate question.
4.
Does the circle x2+y2=25 define y as a function of x? Test the input x=3.
Hint:Solve fory when x=3 and count the answers.
5.
Table A pairs each student in a class with their birthday month. Table B pairs each month with the students born in it. Which table describes a function, and which is only a relation?
Hint:For each input, can there be more than one output?
6.
For f(x)=x+5, a student says: 'f(3) means f times 3, so I cannot find it without knowing f.' Correct the student.
Hint:What does the notation f(input) name?
Want the full set?
50 practice questions for this concept — free to try, every one with a complete worked
solution showing the why, not just the answer.
No. A y-intercept is the output at the input x=0, and a function gives each input only one output, so it has at most one. It can have none, if 0 is outside its domain, as with f(x)=x1. It can, however, have many x-intercepts: f(x)=x2−4 crosses the x-axis at −2 and 2, because several inputs may share the output 0.
Is y=5 a function, even though there is no x in it?
Yes. It is a constant function: every input x is paired with the output 5, so each input still has exactly one output. Its graph is a horizontal line, which passes the vertical line test. The vertical line x=5 is the opposite case: the single input 5 is paired with every y, so it is not a function of x.
Can a function exist with no formula at all?
Yes. A function only needs a rule that settles one output per input, and the rule can be a table, a list or a sentence. Each student's locker number is a function from students to numbers if every student has exactly one locker. Many real functions, such as the noon temperature on each day of a year, are recorded as data and have no neat formula.
If y is a function of x, is x automatically a function of y?
Not always. y=x2 is a function of x, but going backwards, y=9 comes from both x=3 and x=−3, so x is not a function of y. Reversing works only when no two inputs share an output, a property called one-to-one. That property is exactly what you need later to build an inverse function.
This is a starting point: you only need to be comfortable substituting a number into a formula. Function adds the one-output rule and the f(x) notation for the output at x. Next, Domain asks which inputs are allowed, Range asks which outputs come out, and Function Notation builds fluency with expressions such as f(x+1) and f(2)−f(1).