Mathwords logoReference LibraryMathwords

Function

Function

A relation for which each element of the domain corresponds to exactly one element of the range. For example, Math formula: f(x) = √x is a function because each number x in the domain has only one possible square root. On the other hand, f(x) = ±√x, a relation that is not a function since each positive x has two possible values. is not a function because there are two possible values for any positive value of x.

 

 

See also

Vertical line test

Key Formula

f(x)=yf(x) = y
Where:
  • ff = The name of the function (the rule that maps inputs to outputs)
  • xx = The input value, chosen from the domain
  • yy = The output value, belonging to the range

Worked Example

Problem: Given the function f(x) = 2x + 3, find f(4) and verify that each input produces exactly one output.
Step 1: Write down the function rule.
f(x)=2x+3f(x) = 2x + 3
Step 2: Substitute x = 4 into the rule.
f(4)=2(4)+3f(4) = 2(4) + 3
Step 3: Perform the arithmetic.
f(4)=8+3=11f(4) = 8 + 3 = 11
Step 4: Check the function requirement: no matter how many times you substitute 4, you always get 11. The input 4 maps to exactly one output, so this is indeed a function.
Answer: f(4) = 11. The input 4 produces exactly one output, confirming f(x) = 2x + 3 is a function.

Another Example

This example uses a set of ordered pairs instead of a formula, showing how to test the definition directly. It also illustrates a non-function, which is just as important to recognize.

Problem: Determine whether the set of ordered pairs {(1, 5), (2, 8), (3, 5), (1, 9)} represents a function.
Step 1: List the inputs (first elements): 1, 2, 3, 1.
Step 2: Check whether any input appears more than once with a different output. The input 1 appears twice: once paired with 5 and once paired with 9.
(1,5)and(1,9)(1, 5) \quad \text{and} \quad (1, 9)
Step 3: Because the single input x = 1 is assigned two different outputs (5 and 9), the relation fails the definition of a function.
Answer: This set of ordered pairs is NOT a function because the input 1 maps to two different outputs.

Frequently Asked Questions

How do you tell if a graph is a function?
Use the vertical line test. Imagine sliding a vertical line across the graph from left to right. If every vertical line touches the graph at most once, the graph represents a function. If any vertical line crosses the graph in two or more places, at least one input has multiple outputs, so it is not a function.
What is the difference between a function and a relation?
A relation is any set of ordered pairs — it places no restriction on how inputs and outputs are paired. A function is a special kind of relation where each input corresponds to exactly one output. Every function is a relation, but not every relation is a function.
Can two different inputs give the same output in a function?
Yes. The rule only restricts each input to one output, not the other way around. For example, in f(x) = x², both x = 3 and x = −3 produce the output 9. This is perfectly valid for a function. A function where different inputs always give different outputs is called a one-to-one function.

Function vs. Relation

FunctionRelation
DefinitionA rule where each input maps to exactly one outputAny set of ordered pairs linking inputs and outputs
RestrictionNo input can have more than one outputNo restriction — an input can pair with many outputs
Vertical line testAlways passes (each vertical line hits the graph at most once)May fail (a vertical line can hit the graph more than once)
Exampley = x² (each x gives one y)x² + y² = 25 (a circle; most x-values give two y-values)
RelationshipEvery function is a relationNot every relation is a function

Why It Matters

Functions are the backbone of nearly every topic you encounter after algebra — from graphing lines and parabolas to studying exponential growth, trigonometry, and calculus. Understanding the concept of "one input, one output" is essential because it guarantees predictable behavior, which is what makes modeling real-world situations (distance vs. time, cost vs. quantity) mathematically reliable. Standardized tests like the SAT and ACT routinely ask you to evaluate functions, identify their domains, and interpret their graphs.

Common Mistakes

Mistake: Thinking that two inputs giving the same output means it is not a function.
Correction: The rule only goes one direction: each input must produce one output. Multiple inputs sharing an output is perfectly fine. For instance, f(x) = x² sends both 3 and −3 to 9, and it is still a function.
Mistake: Confusing f(x) notation with multiplication — reading f(x) as "f times x."
Correction: The notation f(x) means "the output of function f when the input is x." It is not a product. Writing f(3) = 11 means the function f assigns the value 11 to the input 3.

Related Terms

  • RelationBroader concept; every function is a relation
  • DomainThe set of all allowed inputs of a function
  • RangeThe set of all possible outputs of a function
  • Vertical Line TestGraphical test to determine if a relation is a function
  • Element of a SetIndividual members of the domain or range
  • Square RootUsed in examples distinguishing functions from non-functions