What is a function? One output for every input
A function is a rule that gives exactly one output for each input. Put in 3, and you always get the same answer back.
Not sure this is the right level? Take the free grade 8 check-up and get a daily practice plan.
What a function is
A function takes an input, does something to it, and gives back an output. The rule “double it and add 1” is a function: put in 3 and you get 7, put in 10 and you get 21. The important part is that each input gives one output only. You never put in 3 and sometimes get 7 and sometimes get 8.
Common Core standard 8.F.A.1 says students should understand that a function is a rule that assigns to each input exactly one output, and that the graph of a function is the set of ordered pairs (input, output). In grade 8 the input is usually called x and the output y, so the rule above is written y = 2x + 1.
Functions are everywhere once you look. The cost of a number of tickets, the distance a car travels in a number of hours and the temperature at each hour of the day are all functions: one input gives one output.
Function notation
Instead of y, you can write f(x), read “f of x”. It means “the output of the function f when the input is x”. If f(x) = 2x + 1, then f(3) means put 3 in: f(3) = 2 × 3 + 1 = 7. The brackets do not mean multiply here; f(3) is just the output for 3.
See it: pictures to draw with your child
Copy these onto paper or a whiteboard. A quick sketch makes the idea concrete before any written method.
Four ways to show a function
The same function can be shown in four ways. Here is y = 2x + 1 each way:
- Equation: y = 2x + 1.
- Table:
| x | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| y | 3 | 5 | 7 | 9 |
- Ordered pairs: (1, 3), (2, 5), (3, 7), (4, 9).
- Graph: plot the pairs and they lie on a straight line.
A mapping diagram draws an arrow from each input to its output. In a function, every input has exactly one arrow leaving it. Two inputs may share an output (y = x² sends both 2 and −2 to 4), and that is fine. What is not allowed is one input with two arrows.
How to tell if it is a function
- Table or ordered pairs: look for an x-value that appears twice with different y-values. If there is one, it is not a function. {(1, 4), (2, 6), (1, 5)} is not a function, because 1 goes to both 4 and 5.
- Repeated y-values are fine: {(1, 4), (2, 4), (3, 4)} is a function. Every input still has only one output.
- Graph: use the vertical line test. Imagine sliding a vertical line across the graph. If it ever crosses the graph twice, two points share an x-value, so it is not a function.
- Real life: “each student’s birthday” is a function of the student, because each student has one birthday. “The students born on each day” is not a function of the day, because one day can have several students.
A full example, start to finish
Is this table a function? Inputs 2, 5, 7, 5; outputs 9, 3, 1, 3.
- Look for repeated inputs. 5 appears twice.
- Compare their outputs. Both times the output is 3.
- Decide. The input 5 still has only one output (3), so the table is a function. The pair (5, 3) has simply been written twice.
Now change the last output to 8, so the pairs are (2, 9), (5, 3), (7, 1) and (5, 8). The input 5 now goes to both 3 and 8, so it is not a function. On a graph, the points (5, 3) and (5, 8) sit one above the other, and a vertical line through x = 5 crosses both.
Finally, evaluate f(x) = 4x − 5 at x = −2: f(−2) = 4 × (−2) − 5 = −8 − 5 = −13. Going the other way, if f(x) = 11, then 4x − 5 = 11, so 4x = 16 and x = 4.
Function practice
Decide if a table, set of pairs or graph is a function, and evaluate f(x). New questions every time.
What comes next
Most grade 8 functions are linear: their graphs are straight lines. The slope lesson measures how steep a line is, slope-intercept form writes it as y = mx + b, and linear or nonlinear shows how to tell straight from curved.
What to say to your child
A short script for teaching it the first time. Pause after each line and let your child do the next step.
- “I’m a machine. Give me a number and I’ll give you one back.” (Use the rule double it and add 1.)
- “You gave me 3, I said 7. Give me 3 again. Do I ever say anything else?”
- “That’s a function: every input has exactly one output.”
- “Now: is ‘the person born on each day of the year’ a function of the day? Why not?”
- “Your turn to be the machine. Pick a rule and I’ll guess it.”
More worked examples
Example 1: Is {(1, 2), (2, 4), (3, 6), (4, 8)} a function?
Yes. Each x appears once, so each input has one output.
Example 2: Is {(3, 1), (3, 5), (4, 2)} a function?
No. The input 3 has two outputs, 1 and 5.
Example 3: f(x) = 3x − 4. Find f(5) and f(−1).
f(5) = 15 − 4 = 11. f(−1) = −3 − 4 = −7.
Practice questions (answers below)
Ask these out loud or write them down. Check each answer, and ask “how did you get that?” for one or two.
- Is {(0, 1), (1, 1), (2, 1)} a function?
- Is {(2, 3), (2, 7), (5, 1)} a function?
- f(x) = 5x + 2. Find f(3).
- f(x) = x² − 1. Find f(−3).
- f(x) = 2x − 6. For which x is f(x) = 10?
- A circle on a graph: function or not?
- Does a horizontal line pass the vertical line test?
- Each student and their height: is height a function of the student?
Show the answers
- Yes: repeated outputs are fine
- No: 2 has two outputs
- 17
- 8
- 8
- Not a function: a vertical line crosses it twice
- Yes
- Yes: each student has one height
Common mistakes
How to teach it at home
Taxi and phone plans
Any bill with a starting fee and a cost per unit is a linear function. Ask: what is the rate of change, and what is the initial value?
Graph a walk
Walk away from a wall, stop, then walk back, while someone times it. Sketch distance against time together.
Input–output game
One person thinks of a rule like “double it and add 1”. The other gives inputs and guesses the rule from the outputs.
By grade
- Grade 6 (6.EE.C.9): independent and dependent variables, with tables and equations.
- Grade 8 (8.F.A.1): understand that a function gives each input exactly one output.
- High school (F-IF): function notation, domain and range, and many new kinds of function.
More for each grade: Grade 8 math and the CBSE class 8 maths guide.
Worksheets and practice

Slope and y-intercept worksheet: printable PDF with an answer key.
Last reviewed
Questions parents ask
What is a function in math?
A rule that gives exactly one output for each input. y = 2x + 1 is a function: every x gives one y.
How do you know if a table is a function?
Check the inputs. If any x-value appears twice with different y-values, it is not a function. Otherwise it is.
What is the vertical line test?
A way to check a graph: if any vertical line crosses the graph more than once, the graph is not a function.
Can a function have the same output twice?
Yes. Two inputs can share an output. Only one input with two different outputs is not allowed.
What grade learns functions?
Grade 8, in Common Core standards 8.F.A.1 to 8.F.B.5. Grade 6 prepares with independent and dependent variables.