IB Mathematics: Analysis and Approaches · Topic 2 · Functions
2.2 Functions, domain and range
Define a function, state its domain and range, test whether a relation is a function, and write sets of values in interval notation.
1/5A function gives exactly one output for each input
- A function gives exactly one output for each input
- Domain and range describe the possible inputs and outputs
- Mappings and graphs show whether a relation is a function
- Interval notation writes sets of values compactly
- Division and square roots restrict which inputs are allowed
- Check your recall
- Practice: 10 questions
Part 1 of 5: A function gives exactly one output for each input
A taxi fare depends on the distance travelled. For each distance, there is one fare. A function works in the same way: each input has exactly one output.
A function can be shown as a mapping, such as . It can also be written as a rule, . Here means the output when the input is 3.
So . The letter is only a name. Other functions might be called or . The letter is only a placeholder for any input in the domain.
Worked example
Evaluate a function
- Replace with -2: .
- Square first: .
- Add: .
Answer: .
Key terms · tap one for its definition
function
A function assigns exactly one output to each input in its domain.
mapping
A mapping is a rule or diagram that pairs each input value with an output value.
Part 2 of 5: Domain and range describe the possible inputs and outputs
Every function has a set of allowed inputs. For the taxi fare, distances cannot be negative. This set is the domain of the function.
The outputs that actually occur form the range. The range depends on both the rule and the domain. It can be much smaller than the set of all real numbers.
If no domain is given, assume the largest set of real numbers that works. Write to say that can be any real number. On a graph, the domain is read along the -axis and the range is read along the -axis.
Worked example
Domain and range of a short list
- The domain is the given inputs: .
- Find each output: , , , .
- List the different outputs once each.
Answer: Domain: . Range: .
Key terms · tap one for its definition
domain
A function’s domain is the set of inputs where the function is defined.
range
A function’s range is the set of all outputs that the function produces.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: C · Worked explanation
Part 3 of 5: Mappings and graphs show whether a relation is a function
A relation is any rule that pairs inputs with outputs. It may allow two outputs for one input. Only some relations are functions.
Check a mapping by looking at each input. Each input must lead to one output only. Different inputs may share an output, and the rule is still a function.
Types of mapping
- Mapping type
- One-to-one
- Example pairs
- and
- Function?
- Yes
- Mapping type
- Many-to-one
- Example pairs
- and
- Function?
- Yes
- Mapping type
- One-to-many
- Example pairs
- and
- Function?
- No
For a graph, use the vertical line test. Draw vertical lines through the graph. If any line meets the graph more than once, one input has two outputs. The graph is then not a function. A circle fails this test. The graph of passes it, because each vertical line meets it at most once.
Key term
vertical line test
The vertical line test says a graph represents a function if no vertical line meets it more than once.
Part 4 of 5: Interval notation writes sets of values compactly
Writing domains as inequalities can be slow. A set of values from one endpoint to another is an interval. Brackets show whether each endpoint is included. Many domains and ranges are intervals, so this notation appears often.
Square brackets include an endpoint, and round brackets exclude it. For example, means . Infinity is not a number, so it always takes a round bracket. Use to join two intervals. The symbols and show that an interval continues without end.
Inequalities and interval notation
- Inequality
- Interval notation
- Inequality
- Interval notation
- Inequality
- Interval notation
- Inequality
- Interval notation
- Inequality
- Interval notation
Worked example
Domain and range in interval notation
- Domain: .
- Check the ends: and .
- Between them the graph reaches , the smallest output.
- The largest output is 4.
Answer: Domain and range .
Key term
interval
An interval specifies the input values from a lower endpoint to an upper endpoint.

Quick check
One question on the part you just read
Easy
Show answer and explanation
Answer: D · Worked explanation
Part 5 of 5: Division and square roots restrict which inputs are allowed
Now that the notation is clear, look at which inputs a rule allows. Two restrictions come up often. Both follow from the rule that every allowed input needs a defined output.
- Division: the denominator cannot be zero.
- Square root: the expression under the root cannot be negative.
For example, has domain . Exclude any input that breaks a restriction. The domain is every real number that remains.
Worked example
Domain and range of a square root
- The expression under the root must satisfy .
- So , and the domain is .
- At , . As increases, increases without limit.
- A square root is never negative.
Answer: Domain ; range .
You can read a range from a graph in the same way. Find the lowest and highest heights of the curve. The curve in the figure starts at and rises without limit.
Check your recall[14 marks]
6 written questions. Answer each one in your head or on paper, then open the mark scheme.
- 1.Define[1 mark]
Define the term function.
Show mark schemeHide mark scheme
Model answer
A function assigns exactly one output to each input in its domain.
- 1 mark for stating that each input has exactly one output
- 2.Explain[2 marks]
Explain why a relation containing the pairs and is not a function.
Show mark schemeHide mark scheme
Model answer
The input 3 is paired with two different outputs, 5 and 8. A function must give exactly one output for each input.
- 1 mark for stating that the input 3 has two outputs
- 1 mark for linking this to a function needing exactly one output per input
- 3.Describe[2 marks]
Describe how the vertical line test shows that a graph is not a function.
Show mark schemeHide mark scheme
Model answer
Draw vertical lines across the graph. If any vertical line meets the graph more than once, one input has two outputs, so the graph is not a function.
- 1 mark for drawing vertical lines through the graph
- 1 mark for stating that a line meeting the graph more than once means the graph is not a function
- 4.Calculate[3 marks]
Calculate and for .
Show mark schemeHide mark scheme
Model answer
and .
- 1 mark for substituting both inputs correctly
- 1 mark for obtaining
- 1 mark for obtaining
- 5.Determine[3 marks]
Determine the domain and range of . Give both in interval notation.
Show mark schemeHide mark scheme
Model answer
The expression under the root must be non-negative, so and . The domain is . A square root is never negative, and it reaches 0, so the range is .
- 1 mark for stating the condition
- 1 mark for giving the domain
- 1 mark for giving the range
- 6.Deduce[3 marks]
Deduce the domain of , in interval notation.
Show mark schemeHide mark scheme
Model answer
The denominator cannot be zero, so . The domain is .
- 1 mark for identifying that the denominator must not be zero
- 1 mark for stating
- 1 mark for writing

Practice this topic
10 quick-fire multiple-choice questions, easy to hard. Tap an answer to see if you're right and the worked explanation. (The written questions with mark schemes are under “Check your recall” above.)
0 right0 of 10 answered
Includes the 2 quick checks in the note above.
EasyCalculate[1 mark]
Show answer and explanation
Answer: A · Worked explanation
MediumDetermine[1 mark]
Show answer and explanation
Answer: B · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: C · Worked explanation
MediumDetermine[2 marks]
Show answer and explanation
Answer: D · Worked explanation
MediumDeduce[1 mark]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: B · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: A · Worked explanation
HardDetermine[2 marks]
Show answer and explanation
Answer: D · Worked explanation