Functions, domains and ranges
A function is a rule that assigns exactly one output to each permitted input. The permitted inputs form the domain. The outputs the function can actually produce form the range.
Functions give precise language for relationships between quantities. They also underpin graphs, transformations, calculus, numerical methods and mathematical modelling.
Before you start
Section titled “Before you start”You should be comfortable with:
- substituting values into algebraic expressions
- solving equations and inequalities
- sketching standard graphs
- interval notation and inequality notation
If function notation is completely new, the foundation lesson on function notation provides a shorter introduction.
What makes a relation a function?
Section titled “What makes a relation a function?”Suppose a rule sends an input to an output . It is a function if every allowed value of has one and only one output.
For example,
is a function. The input produces the single output . The fact that both and produce does not cause a problem. Different inputs are allowed to share an output.
By contrast, the relation
does not define as a function of for , because
For example, would have two outputs, and .
The crucial test is therefore:
One input cannot be assigned two different outputs.
Function notation
Section titled “Function notation”The notation
names the function and describes its output for an input . The expression is read as ” of ”. It does not mean .
Example 1: evaluating a function
Section titled “Example 1: evaluating a function”Let
To find , replace every with :
Brackets protect the substitution, especially when the input is negative.
Example 2: a negative input
Section titled “Example 2: a negative input”Using the same function,
The square gives , not .
Example 3: an algebraic input
Section titled “Example 3: an algebraic input”Find when .
Substitute the entire expression :
Function notation allows the input to be a number, a variable or a complete expression.
Mappings
Section titled “Mappings”A function can be described as a mapping from one set to another:
This says that maps elements of the set into the set . More explicitly,
means that the input is mapped to the output .
For example,
defines a function from the real numbers to the real numbers.
These two arrows have different jobs:
- names the input and output sets.
- states what happens to an individual input.
Domain, codomain and range
Section titled “Domain, codomain and range”These terms are related but not interchangeable.
- The domain is the set of allowed inputs.
- The codomain is the declared set into which outputs are mapped.
- The range is the set of outputs actually produced.
For a function , the domain is and the codomain is . The range is a subset of :
Example 4: codomain and range are not always equal
Section titled “Example 4: codomain and range are not always equal”Consider
Its domain is and its codomain is also . However, a square cannot be negative, so its range is
or equivalently
The codomain includes negative real numbers, but the function never reaches them.
Finding a domain
Section titled “Finding a domain”Sometimes a domain is stated explicitly. If it is not, use the largest real domain for which the formula makes sense.
At A-level, check especially for:
- denominators, which cannot equal zero
- even roots, whose contents must be non-negative
- logarithms, whose arguments must be positive
Example 5: denominator restriction
Section titled “Example 5: denominator restriction”For
the denominator cannot be zero:
Therefore the domain is
Example 6: square-root restriction
Section titled “Example 6: square-root restriction”For
the expression under the square root must satisfy
Solving gives
So the domain is
Remember that dividing an inequality by reverses its direction.
Example 7: two restrictions together
Section titled “Example 7: two restrictions together”Find the domain of
The square root requires
The denominator requires
Both conditions must hold, so the domain is
Finding a range
Section titled “Finding a range”There is no single method for every function. Useful approaches include:
- using the shape and turning points of a graph
- writing the formula in a form that exposes its minimum or maximum
- setting and asking which values of give a real solution for
- using known ranges of standard functions
Example 8: range of a quadratic
Section titled “Example 8: range of a quadratic”Find the range of
where .
Complete the square:
Since
we have
The value occurs when , so the range is
Example 9: range on a restricted domain
Section titled “Example 9: range on a restricted domain”Let
The completed-square form is still
The minimum occurs at and is . To find the maximum on the closed interval, check the endpoints:
Therefore the range is
Checking only the turning point would miss the maximum.
Example 10: range by rearranging
Section titled “Example 10: range by rearranging”Find the range of
Set
Rearrange for :
This expression exists for every real except . Hence the range is
One-to-one and many-to-one functions
Section titled “One-to-one and many-to-one functions”A function is one-to-one if different inputs always produce different outputs:
For example, on is one-to-one.
A function is many-to-one if at least two different inputs share an output. For on ,
so it is many-to-one.
Both are valid functions. The distinction concerns whether outputs are repeated, not whether each input has one output.
The horizontal line test
Section titled “The horizontal line test”A graph represents a one-to-one function if every horizontal line meets it at most once. If a horizontal line meets it more than once, the function is many-to-one.
This matters because only a one-to-one function can be reversed without ambiguity. Domain restrictions and inverse functions are developed in composite and inverse functions.
Example 11: proving a linear function is one-to-one
Section titled “Example 11: proving a linear function is one-to-one”Let . Suppose . Then
so
and therefore
Thus is one-to-one on .
Solving equations written in function notation
Section titled “Solving equations written in function notation”Example 12: find an input from an output
Section titled “Example 12: find an input from an output”Let
Solve .
Substitute the formula for :
Hence
Two inputs produce the output , which also shows that this quadratic is many-to-one on .
Common misconceptions
Section titled “Common misconceptions”- Thinking means . It names the output of function at input .
- Objecting when two inputs share an output. That is allowed. A function fails only when one input has more than one output.
- Using domain, codomain and range as synonyms. The range contains outputs actually achieved; the codomain is the declared target set.
- Ignoring a stated domain. A restriction can change the range and whether a function is one-to-one.
- Cancelling away restrictions. Even if an algebraic expression simplifies, excluded values from the original rule remain excluded.
- Finding a quadratic range from the constant term. Use the turning point and any domain endpoints.
- Forgetting brackets in substitutions. Write by replacing every with before simplifying.
Quick checks
Section titled “Quick checks”1. Evaluate a function
Section titled “1. Evaluate a function”Given , find and .
Answer
2. Find a domain
Section titled “2. Find a domain”Find the domain of
Answer
Require , so . The domain is .
3. Find a range
Section titled “3. Find a range”Find the range of
where .
Answer
Since ,
The maximum occurs at , so the range is .
4. Classify a function
Section titled “4. Classify a function”Is one-to-one or many-to-one on ?
Answer
It is one-to-one. The function is strictly increasing, so different real inputs cannot produce the same output. Every horizontal line meets its graph exactly once.
What to learn next
Section titled “What to learn next”Next, study composite and inverse functions to combine and reverse function rules. Then use function graphs and graph transformations to connect algebraic rules with their geometry.