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.

Input xOutput y13253749rule: y = 2x + 1
A mapping diagram for y = 2x + 1. Each input has exactly one arrow, so it is a function.
Function: one point on each vertical lineNot a function: x = 2 has two points
The vertical line test: a vertical line crosses a function’s graph at most once.

Four ways to show a function

The same function can be shown in four ways. Here is y = 2x + 1 each way:

x1234
y3579

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

A full example, start to finish

Is this table a function? Inputs 2, 5, 7, 5; outputs 9, 3, 1, 3.

  1. Look for repeated inputs. 5 appears twice.
  2. Compare their outputs. Both times the output is 3.
  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.

  1. “I’m a machine. Give me a number and I’ll give you one back.” (Use the rule double it and add 1.)
  2. “You gave me 3, I said 7. Give me 3 again. Do I ever say anything else?”
  3. “That’s a function: every input has exactly one output.”
  4. “Now: is ‘the person born on each day of the year’ a function of the day? Why not?”
  5. “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.

  1. Is {(0, 1), (1, 1), (2, 1)} a function?
  2. Is {(2, 3), (2, 7), (5, 1)} a function?
  3. f(x) = 5x + 2. Find f(3).
  4. f(x) = x² − 1. Find f(−3).
  5. f(x) = 2x − 6. For which x is f(x) = 10?
  6. A circle on a graph: function or not?
  7. Does a horizontal line pass the vertical line test?
  8. Each student and their height: is height a function of the student?
Show the answers
  1. Yes: repeated outputs are fine
  2. No: 2 has two outputs
  3. 17
  4. 8
  5. 8
  6. Not a function: a vertical line crosses it twice
  7. Yes
  8. Yes: each student has one height

Common mistakes

{(1, 4), (2, 4)} called “not a function”Thinks outputs cannot repeat.Fix: only inputs matter: each input needs one output, but outputs may repeat.
f(3) read as f × 3Treats the brackets as multiplication.Fix: f(3) means the output when the input is 3.
Uses a horizontal line testChecks the wrong direction on a graph.Fix: slide a vertical line: one input, one point.
Sign slip in f(−2)Writes 4 × −2 as 8.Fix: put negative inputs in brackets: 4 × (−2) = −8.

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

Worksheets and practice

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.