Function

Definitionnoun

What is a function in math?

A function is a rule that gives exactly one output for each input. If you put in one x-value, a function gives back one y-value. In f(x) = 2x + 1, the input 3 gives the output 7. Two inputs may share an output, but one input can never have two different outputs.

In Spanish
función
Also called
input-output rule, mapping, f of x
Grade level
Algebra 1
Grade 8Algebra 1Algebra 2CCSS 8.F.A.1CCSS HSF-IF.A.1CCSS HSF-IF.A.2SATACT

Function in a picture

A function versus a relation that is not a functionLeft: the function f of x equals x squared maps inputs negative 2, negative 1, 1 and 2 to outputs 4, 1, 1 and 4; each input has one arrow. Right: the relation y squared equals x maps input 1 to both 1 and negative 1, and input 4 to both 2 and negative 2, so it is not a function.Function ✓f(x) = x²−2−11214inputoutputone arrow from each input;shared outputs are fineNot a function ✗y² = x14−2−112inputoutputinput 4 gives 2 and −2two arrows from one input
Check the inputs: in a function each one sends out exactly one arrow. Outputs may be shared (left), but an input with two arrows (right) breaks the rule.

Formal definition and notation

A function f from a set D (the domain) to a set R assigns to each element x of D exactly one element f(x) of R. The set of outputs actually produced is the range. A relation, any set of ordered pairs (x, y), is a function exactly when no two pairs have the same first coordinate and different second coordinates. The graph of f is the set of points (x, f(x)), the graph of the equation y = f(x).

Symbol Read it as Meaning
f(x) f of x the output of function f for the input x; it does not mean f times x
f(3) = 7 f of 3 equals 7 input 3 gives output 7, the point (3, 7) on the graph
y = f(x) y equals f of x the output is called y; x is the independent variable
x → 2x + 1 x maps to two x plus one arrow notation for the same rule

Key facts

  • A function can be shown four ways: an equation (y = 2x + 1), a table, a graph or words (“double it and add 1”).
  • The allowed inputs form the domain; the outputs form the range. See domain and range.
  • Every non-vertical line y = mx + b is a function. A vertical line such as x = 4 is not: the input 4 has infinitely many outputs.
  • A circle such as x2 + y2 = 25 is not a function: the input 3 gives both y = 4 and y = −4.
  • In a real situation, the output depends on the input: the cost of gas is a function of the number of gallons.

Function test

Function test
each input → exactly one output
Table
no x-value is repeated with a different y-value
Mapping
exactly one arrow leaves each input
Graph
every vertical line crosses the graph at most once (the vertical line test)

The test only looks at inputs. Repeated outputs are fine: f(x) = x2 gives f(−2) = f(2) = 4 and is still a function.

Try it: function machine

Interactive

Type an input and press Run (or Enter). The machine applies the rule “multiply by 2, then add 1” and logs each input-output pair in the table. Run the same input twice: a function always gives the same output.

This interactive needs JavaScript. The worked examples below show the same ideas step by step.

Function examples, step by step

Example 1: Evaluate a function

Warm-up

For f(x) = 3x − 4, find f(5).

  1. f(5) means: use the input 5 in place of x.
  2. f(5) = 3(5) − 4.
  3. 3 × 5 = 15, and 15 − 4 = 11.

Answer: f(5) = 11, so the point (5, 11) is on the graph.

Example 2: Is this relation a function?

Core

Is the relation {(1, 4), (2, 7), (1, 9), (3, 4)} a function?

  1. List the inputs (first coordinates): 1, 2, 1, 3.
  2. The input 1 appears twice, with outputs 4 and 9.
  3. One input with two different outputs breaks the rule.
  4. (The output 4 appearing twice, for inputs 1 and 3, would be fine on its own.)

Answer: No. The input 1 has two outputs, 4 and 9, so the relation is not a function.

Example 3: A function in context

Test-style

The cost in dollars of n concert tickets, including a booking fee, is C(n) = 15n + 40. Find C(6) and say what it means. How many tickets cost 160 dollars?

  1. C(6) = 15(6) + 40 = 90 + 40 = 130: six tickets cost 130 dollars.
  2. For the second question the output is known: 15n + 40 = 160.
  3. Subtract 40: 15n = 120.
  4. Divide by 15: n = 8.

Answer: C(6) = 130, so 6 tickets cost 130 dollars, and 160 dollars buys 8 tickets.

Common mistakes

✗ MistakeThe table x: 2, 2, 5 and y: 3, 8, 1 is a function.
✓ InsteadIt is not: the input 2 gives both 3 and 8.

One input cannot have two different outputs in a function. Scan the input column for repeats with different outputs.

✗ Mistakef(x) = x2 is not a function, because f(2) and f(−2) are both 4.
✓ InsteadIt is a function. Each input still has just one output.

The rule restricts inputs, not outputs. Many inputs may share an output.

✗ MistakeIf f(x) = x + 6, then f(3) means f × 3.
✓ Insteadf(3) means the output when the input is 3: f(3) = 3 + 6 = 9.

In function notation the parentheses hold the input. f is the name of the rule, not a number.

✗ MistakeA circle passes the vertical line test because a horizontal line hits it twice.
✓ InsteadUse vertical lines: x = 0 crosses the circle x2 + y2 = 4 at (0, 2) and (0, −2), so it fails.

A vertical line is a single input. Two crossings mean two outputs for that input.

Not to be confused with

Functionvs.Relation

A relation is any set of ordered pairs. A function is a relation with exactly one output per input. {(1, 2), (1, 3)} is a relation but not a function.

Functionvs.Equation

An equation is any statement with an equal sign. Some equations define functions (y = 3x); others do not (x = y2, x = 4).

Functionvs.Domain and Range

The domain and range are the sets of inputs and outputs. The function is the rule that pairs them. For f(x) = x2, the domain is all real numbers and the range is y ≥ 0.

Quick check: 3 questions

Question 1 of 3

If f(x) = 2x − 5, what is f(4)?

Show answer and explanation

Answer: C. f(4) = 2(4) − 5 = 8 − 5 = 3. 13 adds 5 instead of subtracting, 8 forgets the −5, and −1 skips the 2.

Question 2 of 3

Which set of ordered pairs is a function?

Show answer and explanation

Answer: B. In B every input (2, 3, 4) appears once; sharing the output 5 is allowed. A repeats input 1, C repeats input 0, and D repeats input 3, each with different outputs.

Question 3 of 3

Which equation does NOT define y as a function of x?

Show answer and explanation

Answer: D. In x = y2, the input 9 gives y = 3 and y = −3. The others give one y for each x; y = 5 is a horizontal line, a constant function.

Function: frequently asked questions

What is the vertical line test?

It is a quick way to check a graph. Imagine sliding a vertical line across the graph. If it ever crosses the graph more than once, some input has two outputs, so the graph is not a function. A parabola opening up passes; a circle or a sideways parabola fails. A vertical line itself, like x = 4, fails.

What does f(x) mean?

f(x), read f of x, is the output of the function f when the input is x. It replaces y and records the input at the same time. If f(x) = x2 + 1, then f(3) = 10 means input 3, output 10. Other letters work too: g(t), C(n), h(x).

Can two different inputs have the same output?

Yes. A function only forbids one input having two outputs. f(x) = x2 sends both 3 and −3 to 9, and it is a function. A constant function such as f(x) = 5 sends every input to the same output. Functions where no outputs repeat are called one-to-one.

Practice and tools

Sources

  1. Common Core State Standards, Grade 8 Functions (8.F.A.1)
  2. Common Core State Standards, High School Functions: Interpreting Functions (HSF-IF.A.1, HSF-IF.A.2)
  3. OpenStax, Intermediate Algebra 2e, 3.5 Relations and Functions

Updated November 2026·Reviewed by the Effortless Math team·Standards: CCSS 8.F.A.1, CCSS HSF-IF.A.1, CCSS HSF-IF.A.2

Cite this entry

Effortless Math Team. “Function.” Effortless Math Dictionary. Updated November 2026. https://www.effortlessmath.com/math-dictionary/function/

Flashcard

TermFunctionone input in, one output out
DefinitionA rule that gives exactly one output for each input. For f(x) = 2x + 1, f(3) = 7. Two outputs for one input means not a function.
Study the full deck

Browse all terms in the Math Dictionary · More functions terms · Random term