What Is a Function? Inputs, Outputs, Rules and Examples

#8th Grade Math#Functions#What Is a Function
TL;DR
The answer to what is a function: a rule that gives every input exactly one output. Below are the function machine, a one-question check for spotting functions and six worked examples.
Bhanzu TeamLast updated on December 3, 202614 min read

Key Points

  • The answer to what is a function in 8th grade is a rule that assigns each input exactly one output, the wording used in the Common Core standards.
  • A relation stops being a function only when one input has two different outputs, so two inputs sharing an output never break the rule.
  • The US Postal Service letter price list effective October 4, 2026 makes price a function of weight, but weight is not a function of price.
  • Function notation such as f(x)f(x) is not required in 8th grade, so 8th grade rules are written like y=3x+2y = 3x + 2.

One button, one snack, every time

Press B4 on a vending machine and exactly one snack should drop. If B4 gave pretzels on Monday and a granola bar on Tuesday, nobody could trust that button. That promise (one button in, one result out) already answers what is a function.

The word is old. Gottfried Leibniz wrote in August 1673 about lines that "perform some function" in a figure. Leonhard Euler made functions the center of his 1748 book on analysis, as the MacTutor history of the function concept records.

Today the same promise runs spreadsheet formulas, weather forecasts and the physics that makes objects fall in video games.

Function machine turning input 4 into output 14, showing what is a function as one input and one output.
A function machine takes the input 4, applies the rule multiply by 3 then add 2, and sends out the output 14, with a small table showing 0 gives 2, 1 gives 5 and 4 gives 14.

What is a function?

The short answer to what is a function fits in one breath. A function is a rule that assigns to each input exactly one output. The input is the number you put in, usually called xx, and the output is the number the rule sends back, usually called yy.

Common Core standard 8.F.A.1 adds that the graph of a function is the set of ordered pairs (x,y)(x, y), each an input with its output. The rule "multiply by 3, then add 2" turns 4 into 14, which makes the pair (4,14)(4, 14).

In 8th grade, your child is expected to see this rule in equations, tables, graphs and words. A footnote to the standard says function notation like f(x)f(x) is not required yet.

The US Postal Service price list effective October 4, 2026 is a real function. A stamped letter costs $0.82 up to 1 ounce, $1.11 up to 2 ounces, $1.40 up to 3 ounces and $1.69 up to 3.5 ounces, so each weight gets one price.

How does a function machine turn inputs into outputs?

A function machine takes one input, applies its rule and sends out one output.

  1. Choose an input, such as x=5x = 5.
  2. Apply the rule "multiply by 3, then add 2", which gives 3×5+23 \times 5 + 2.
  3. Read the output, y=17y = 17, and write the pair (5,17)(5, 17).

As an equation, the rule is y=3x+2y = 3x + 2. Here xx is the input (the independent variable, because you choose it) and yy is the output (the dependent variable, because it depends on xx). Several inputs through one rule build a function input output table.

Input xx Output y=3x+2y = 3x + 2
0 2
1 5
4 14
5 17

Kids fresh from solving equations often expect one answer in total. A function has one answer per input, and each new input may bring a new answer.

Word problems usually give the rule in words.

Words in the problem Math it means
"multiply by 3, then add 2" y=3x+2y = 3x + 2
"up by 4 each time the input goes up by 1" the rule includes 4x4x
"over 1 but not over 2 ounces" 1<w≤21 < w \leq 2, with ww the weight
"an input with two outputs" not a function

How can you tell if something is a function?

Look for an input that shows up with two different outputs. Find one and the relation is not a function. Find none and it is.

A relation is any set of input-output pairs, and a function is a relation that keeps the one-output promise.

  1. List the inputs (the xx values) and nothing else.
  2. Mark any input that appears more than once.
  3. Compare its outputs. Different outputs mean not a function.

Here is the part that confuses almost everyone. Outputs may repeat. In {(6,2),(8,2),(9,4)}\{(6, 2), (8, 2), (9, 4)\} the output 2 appears twice, yet it is a function, because 6 and 8 each have one output. This is called many-to-one. Running a finger down the input column, and only that column, keeps the eyes in the right place.

A mapping diagram shows the check with arrows from an oval of inputs to an oval of outputs. One arrow leaving each input means a function.

Mapping diagrams comparing a function with a relation where input 2 has two outputs.
Two mapping diagrams side by side: on the left, inputs 1, 2, 3 and 4 send one arrow each to the outputs 5, 5, 7 and 9, a function; on the right, input 2 sends arrows to both 3 and 9, so it is not a function.

On a graph, this becomes the vertical line check. If any vertical line crosses the graph more than once, one input has two outputs. Tables, mappings, equations and graphs each get a full walkthrough in recognizing functions.

Try It Yourself

Pick a machine, then send in inputs one at a time and watch each ordered pair land in the table. Keep going until some input comes back with two outputs, or until you are sure none will, and decide whether that machine is a function.

Examples of what is a function

Example 1

Use the rule "multiply by 4, then subtract 7" to find the outputs for the inputs 3, 0 and −2-2.

Write the rule as y=4x−7y = 4x - 7.

y=4(3)−7=12−7=5y = 4(3) - 7 = 12 - 7 = 5
y=4(0)−7=−7y = 4(0) - 7 = -7
y=4(−2)−7=−8−7=−15y = 4(-2) - 7 = -8 - 7 = -15

The pairs are (3,5)(3, 5), (0,−7)(0, -7) and (−2,−15)(-2, -15).

Example 2

Is the set {(1,5),(2,5),(3,5),(4,5)}\{(1, 5), (2, 5), (3, 5), (4, 5)\} a function?

The tempting move is to spot the four 5s and say no, because the outputs repeat.

That checks the wrong column. A function breaks only when one input has two different outputs, and the inputs 1, 2, 3 and 4 each appear once.

So the set is a function. Its rule is y=5y = 5, called a constant function.

Example 3

Is {(2,3),(4,7),(2,9),(6,11)}\{(2, 3), (4, 7), (2, 9), (6, 11)\} a function? If not, which pair could you remove to make it one?

The input 2 appears twice, with the outputs 3 and 9.

One input has two outputs, so it is not a function. Removing (2,3)(2, 3) or (2,9)(2, 9) fixes it.

Example 4

A table pairs the inputs 1, 2, 3 and 4 with the outputs 7, 11, 15 and 19. Find the rule and the output for the input 10.

Each time the input goes up by 1, the output goes up by 4, so the rule starts with 4x4x.

For x=1x = 1, 4x4x is 4 and the output is 7, which is 3 more. The rule is y=4x+3y = 4x + 3.

Check: 4(2)+3=114(2) + 3 = 11, 4(3)+3=154(3) + 3 = 15 and 4(4)+3=194(4) + 3 = 19.

y=4(10)+3=43y = 4(10) + 3 = 43

The input 10 gives 43. Turning tables into rules is the heart of writing linear equations.

Example 5

The rule y=x2y = x^2 takes the inputs −3-3, −1-1, 00, 11 and 33. Is it a function? Is it still one if you swap inputs and outputs?

(−3)2=9,(−1)2=1,02=0,12=1,32=9(-3)^2 = 9, \quad (-1)^2 = 1, \quad 0^2 = 0, \quad 1^2 = 1, \quad 3^2 = 9

Each input has one output, so y=x2y = x^2 is a function, even though 9 and 1 each appear twice.

Swapping gives (9,−3)(9, -3) and (9,3)(9, 3). The input 9 now has two outputs, so the swap is not a function.

Example 6

Using the 2026 postage prices above, find the cost of mailing a 1.5-ounce letter and a 2.5-ounce letter. Is weight a function of price?

A 1.5-ounce letter is over 1 ounce but not over 2, so it costs $1.11. A 2.5-ounce letter is over 2 but not over 3, so it costs $1.40.

$$$1.11 + $1.40 = $2.51$$

Mailing both costs $2.51.

Now start from the price $1.11. Letters of 1.2, 1.5 and 2 ounces all cost $1.11, so one price points to many weights. Weight is not a function of price.

Step graph showing letter price as a function of weight, with 1.5 ounces at 1.11 dollars and 2.5 ounces at 1.40 dollars.
Step graph of US Postal Service stamped letter prices effective October 4, 2026, at 82 cents up to 1 ounce, 1.11 dollars up to 2 ounces, 1.40 dollars up to 3 ounces and 1.69 dollars up to 3.5 ounces, with 1.5 and 2.5 ounces marked.

Why do mathematicians insist on one output?

A rule that can give two answers cannot predict anything. The one-output promise matters anywhere a number has to be trusted.

  • Predictions you can plan around. A post office scale has to name one price for a 2.5-ounce letter, or nobody could budget for postage.
  • Graphs you can read. Each xx value matches at most one point on the graph, so a graph works like a lookup chart.
  • Spreadsheets and code. A cell that multiplies the number beside it by 3 and adds 2 returns one value for each number, every time.
  • A language for change. Euler's 1748 book put functions at the center of analysis, the mathematics of change, where a rule can say how a distance grows as time passes.

High school algebra adds the notation f(x)f(x) and words like domain and range. The promise underneath stays the same.

Where do kids trip up on functions?

Mistake 1: Checking the output column for repeats

Where it slips in: Tables and lists of ordered pairs, as in Examples 2 and 3.

Don't do this: Look at inputs 2, 3, 5, 3 with outputs 4, 6, 10, 8, see no repeated output and call it a function.

The correct way: Check the input column. The input 3 has the outputs 6 and 8, so the table is not a function.

The first instinct is to scan the right-hand column, because that is where answers usually live.

Wrong and right ways to check a table, showing input 3 with outputs 6 and 8 is not a function.
Wrong versus right check of a table with inputs 2, 3, 5, 3 and outputs 4, 6, 10, 8: the wrong side scans the output column and finds no repeats, while the right side scans the input column and finds 3 paired with both 6 and 8.

Mistake 2: Thinking a function must be a straight line or a formula

Where it slips in: Curved graphs and price charts.

Don't do this: Say y=x2y = x^2 is not a function because (1,1)(1, 1), (2,4)(2, 4) and (3,9)(3, 9) do not line up. Or call a postage chart a non-function because it has no equation.

The correct way: Check inputs and outputs only. The Common Core grade 8 standards use the area of a square, with those same points, as a function that is not linear. The linear and nonlinear functions lesson compares the two families.

Most 8th grade graphs are lines, so "function" and "line" start to feel like one word.

Mistake 3: Using relation and function as the same word

Where it slips in: Vocabulary questions such as "Is this relation a function?"

Don't do this: Call {(2,3),(4,7),(2,9),(6,11)}\{(2, 3), (4, 7), (2, 9), (6, 11)\} from Example 3 a function because it is a set of pairs.

The correct way: Every set of input-output pairs is a relation, and only relations with one output per input are functions. The page on relations and functions sets them side by side.

The two words appear together so often that they blur.

What most guides miss about functions

Direction matters. Most guides ask whether a relation is a function and stop, yet the same pairs can keep the promise one way and break it the other. Example 5 works from input to output, and its swap does not. Price is a function of weight, and weight is not a function of price.

The second gap is wrong answers. The IES practice guide on algebra (2015, revised 2019) recommends using solved problems so students analyze the reasoning. A tempting wrong solution, like reading the four 5s in Example 2 as a broken rule, shows exactly where the idea gets misread.

Key Takeaways

  • Every input leads to exactly one output, however the rule is written.
  • Repeated outputs are fine, and only an input with two different outputs breaks the rule.
  • Swapping inputs and outputs can turn a function into a relation that is not one, as y=x2y = x^2 shows.
  • Tables, sentences, ordered pairs and price charts can all be functions, so what is a function depends on the pairing, never on a straight line.
  • For more practice spotting the input that splits into two outputs, explore Bhanzu's 8th grade math curriculum or work with an algebra tutor.

A Practical Next Step

Work these three problems on paper, then compare with the answers.

  1. Use the rule y=2x−5y = 2x - 5 to find the outputs for the inputs 0, 3 and 8.
  2. Is {(1,4),(3,4),(5,8),(1,6)}\{(1, 4), (3, 4), (5, 8), (1, 6)\} a function?
  3. A table pairs the inputs 2, 4 and 6 with the outputs 9, 15 and 21. Find the rule and the output for the input 10.

Answers: 1. −5-5, 11 and 1111. 2. No, the input 1 has the outputs 4 and 6. 3. y=3x+3y = 3x + 3, and the input 10 gives 33.

Practice these to solidify your understanding. If reading the input column catches you, return to Mistake 1. Want a live Bhanzu trainer to walk through more what is a function problems? Book a free demo class, online globally, or in person at our McKinney, TX center.

Read More

Research Behind This Article

  1. J J O'Connor and E F Robertson, MacTutor History of Mathematics, The function concept (2005). mathshistory.st-andrews.ac.uk
  2. Common Core State Standards Initiative, Grade 8: Functions (2010). thecorestandards.org
  3. United States Postal Service, Notice 123: Price List, effective October 4, 2026 (2026). pe.usps.com
  4. OpenStax, College Algebra 2e, 3.1 Functions and Function Notation (2021). openstax.org
  5. Institute of Education Sciences, What Works Clearinghouse, Teaching Strategies for Improving Algebra Knowledge in Middle and High School Students (2019). ies.ed.gov

Quick Quiz: Check Yourself

Three levels, new numbers every time: find outputs from a rule, spot the input that breaks a function, then price two letters from a postage chart.

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

Does my 8th grader need to use f(x)f(x) notation?
No. The Common Core grade 8 standards say function notation is not required, so what is a function in math at this level is a rule like y=4x+3y = 4x + 3. In high school, f(4)=19f(4) = 19 will mean the rule turns 4 into 19.
What are the types of functions?
Most function examples in 8th grade are either linear, with straight-line graphs, or nonlinear, such as y=x2y = x^2 or a postage chart.
Is a function in programming the same as a function in math?
Close, but not quite. A programming function is a named block of code that takes inputs and returns a result, and many behave like a function in math. One that picks a random number can return different results for the same input, so it would not count in math.
What does domain and range of a function mean?
In function input output tables, the domain is the set of inputs and the range is the set of outputs. For (1,5)(1, 5), (2,5)(2, 5) and (3,7)(3, 7), the domain is {1,2,3}\{1, 2, 3\} and the range is {5,7}\{5, 7\}.
How do you tell if something is a linear function?
Knowing how to tell if something is a function comes first. Then check whether the output changes by the same amount each time the input goes up by 1, as in Example 4.
How can I help my child if functions feel confusing at home?
Play a rule-guessing game. One person thinks of a rule such as "double it and add 1", the other calls out inputs, and together you write the pairs until someone names the rule. If the trouble is reading long word problems or confidence rather than the math itself, talk to your child's teacher first, since they see the classwork every day. If your child is about two grade levels behind on a foundation skill like solving equations, a tutor who works one on one is a reasonable next step.
✍️ Written By
Bhanzu Team
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →