Scribe logoScribeNotes & practice
Sign inStart free
  1. Notes
  2. ›IB Mathematics: Applications and Interpretation
  3. ›2 Functions
  4. ›2.2 Functions, domain and range

IB Mathematics: Applications and Interpretation · Topic 2 · Functions

2.2 Functions, domain and range

Define a function, use function notation, and decide from a graph or a set of values whether a relation is a function.

  • 4 min read
  • 5 parts
  • 10 questions
  • Draft
Start a Quick 5 on this topic→Jump to the 10 questions
1/5A function gives exactly one output for each input
  1. 1A function gives exactly one output for each input
  2. 2Function notation names the rule and the input
  3. 3Domain and range describe allowed inputs and possible outputs
  4. 4A vertical line test shows whether a graph is a function
  5. 5Lists of pairs also reveal whether a relation is a function
  6. Check your recall
  7. Practice: 10 questions
1

Part 1 of 5: A function gives exactly one output for each input

A vending machine gives one item for each code you press. The same code never gives two different items. This reliable link between inputs and outputs is the idea behind a function.

A relation is any set of pairs linking inputs to outputs. It becomes a function when no input is paired with two different outputs. Several inputs may share one output.

Inputs are usually called xxx and outputs are usually called yyy. A graph, a table or an equation can show the pairs.

Common mistake

Two inputs giving the same output is allowed. One input giving two different outputs is not.

Key terms · tap one for its definition

function

A function assigns exactly one output to each input in its domain.

relation

A relation is a set of ordered pairs that links each input to one or more outputs.

Part 1 done

2

Part 2 of 5: Function notation names the rule and the input

Now that a function is a rule, it needs a short name.

We name a function with a letter, such as fff. The symbol f(x)f(x)f(x) means the output of fff when the input is xxx. This is function notation, and it is read “f of x”.

The bracket holds the input. It does not mean multiplication. To find f(3)f(3)f(3), replace every xxx in the rule with 3.

Other letters work too. A cost function might be C(n)C(n)C(n), where nnn is the number of items bought.

Worked example

Evaluating a function

Let f(x)=x2−2x+3f(x)=x^2-2x+3f(x)=x2−2x+3. Find f(3)f(3)f(3) and f(−2)f(-2)f(−2).
  1. 1
    Substitute 3 for xxx: f(3)=32−2(3)+3f(3)=3^2-2(3)+3f(3)=32−2(3)+3.
  2. 2
    Simplify: f(3)=9−6+3=6f(3)=9-6+3=6f(3)=9−6+3=6.
  3. 3
    Substitute -2 for xxx: f(−2)=(−2)2−2(−2)+3f(-2)=(-2)^2-2(-2)+3f(−2)=(−2)2−2(−2)+3.
  4. 4
    Simplify: f(−2)=4+4+3=11f(-2)=4+4+3=11f(−2)=4+4+3=11.

Answer: f(3)=6f(3)=6f(3)=6 and f(−2)=11f(-2)=11f(−2)=11.

Key term

function notation

Function notation writes f(x)f(x)f(x) for the output of the function fff when the input is xxx.

Part 2 done

Quick check

One question on the part you just read

Easy

State which description defines a function.
Show answer and explanation

Answer: A · Worked explanation

A function pairs every input with exactly one output. Several inputs may share an output, so requiring each output to have exactly one input is wrong. Requiring every output to be different describes a stricter condition. Allowing one or more outputs per input would permit relations that are not functions.
3

Part 3 of 5: Domain and range describe allowed inputs and possible outputs

A rule may not accept every number, so we must say which inputs are allowed. The set of allowed inputs is the domain. The set of outputs that actually occur is the range.

Some rules restrict the domain. You cannot divide by zero, and you cannot take the square root of a negative number. Context can restrict it too, because a number of tickets must be whole.

Domain and range of three rules

RuleDomainRange
f(x)=x2f(x)=x^2f(x)=x2all real numbersy≥0y\ge 0y≥0
f(x)=xf(x)=\sqrt{x}f(x)=x​x≥0x\ge 0x≥0y≥0y\ge 0y≥0
f(x)=1xf(x)=\frac{1}{x}f(x)=x1​x≠0x\ne 0x=0y≠0y\ne 0y=0
Rule
f(x)=x2f(x)=x^2f(x)=x2
Domain
all real numbers
Range
y≥0y\ge 0y≥0
Rule
f(x)=xf(x)=\sqrt{x}f(x)=x​
Domain
x≥0x\ge 0x≥0
Range
y≥0y\ge 0y≥0
Rule
f(x)=1xf(x)=\frac{1}{x}f(x)=x1​
Domain
x≠0x\ne 0x=0
Range
y≠0y\ne 0y=0

To find the range, ask which outputs can be reached. A square is never negative, so x2x^2x2 gives only zero or positive outputs.

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 outputs that the function produces from its domain.

Part 3 done

4

Part 4 of 5: A vertical line test shows whether a graph is a function

Often a relation is given as a graph rather than a rule. Each input is a position on the horizontal axis. A function allows only one output at that position, so a vertical line should cross the graph at most once.

This is the vertical line test. Imagine sweeping a vertical line across the graph. If it ever meets the graph twice, the relation is not a function.

Figure 1. A vertical line at x = 1 meets the circle twice, so the circle is not a function.

A circle fails the test. The line x=1x=1x=1 meets it at two points, so the input 1 has two outputs.

Exam tip

When a graph fails the test, name the input where a vertical line meets it twice. Say that it has two outputs.

Key term

vertical line test

The vertical line test states that a graph shows a function only if every vertical line meets it at most once.

Part 4 done

Quick check

One question on the part you just read

Easy

Given f(x)=3x−2f(x)=3x-2f(x)=3x−2, calculate f(5)f(5)f(5).
Show answer and explanation

Answer: B · Worked explanation

Replace xxx with 5 to get f(5)=3(5)−2=15−2=13f(5)=3(5)-2=15-2=13f(5)=3(5)−2=15−2=13. The value 17 comes from adding 2 instead of subtracting it. The value 9 comes from subtracting 2 before multiplying, giving 3(5−2)3(5-2)3(5−2), which ignores the order of operations. Multiplication comes before subtraction, so 3(5)3(5)3(5) must be found before 2 is taken away.
5

Part 5 of 5: Lists of pairs also reveal whether a relation is a function

Not every relation comes as a graph. A list of pairs is a function when no input appears with two different outputs. Check each input in turn, and look for any input that repeats.

The inputs listed form the domain, and the outputs form the range. List each value once. A mapping diagram draws the pairs as arrows, and a function has exactly one arrow leaving each input.

Worked example

Testing sets of pairs

Decide whether each set is a function. Give the domain and range of any function. Set A is {(1,4),(2,5),(3,4)}\{(1,4),(2,5),(3,4)\}{(1,4),(2,5),(3,4)}. Set B is {(1,4),(2,5),(1,6)}\{(1,4),(2,5),(1,6)\}{(1,4),(2,5),(1,6)}.
  1. 1
    In set A, the inputs 1, 2 and 3 each appear once.
  2. 2
    So set A is a function, even though the output 4 repeats.
  3. 3
    The domain of A is {1,2,3}\{1,2,3\}{1,2,3} and the range is {4,5}\{4,5\}{4,5}.
  4. 4
    In set B, the input 1 appears with outputs 4 and 6.
  5. 5
    So set B is not a function.

Answer: Set A is a function with domain {1,2,3}\{1,2,3\}{1,2,3} and range {4,5}\{4,5\}{4,5}. Set B is not a function.

Be careful with the range. It contains only outputs that really occur, not every number the rule might give.

Note read

Check your recall[14 marks]

6 written questions. Answer each one in your head or on paper, then open the mark scheme.

  1. 1.Define[2 marks]

    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 is assigned exactly one output
    • 1 mark for referring to the inputs belonging to the domain
  2. 2.Write down[2 marks]

    Write down the domain and the range of f(x)=xf(x)=\sqrt{x}f(x)=x​.

    Show mark schemeHide mark scheme

    Model answer

    The domain is x≥0x\ge 0x≥0 and the range is y≥0y\ge 0y≥0.

    • 1 mark for stating the domain as x≥0x\ge 0x≥0
    • 1 mark for stating the range as y≥0y\ge 0y≥0
  3. 3.Calculate[2 marks]

    Given g(x)=3x2−4g(x)=3x^2-4g(x)=3x2−4, calculate g(−2)g(-2)g(−2).

    Show mark schemeHide mark scheme

    Model answer

    g(−2)=3(−2)2−4=12−4=8g(-2)=3(-2)^2-4=12-4=8g(−2)=3(−2)2−4=12−4=8.

    • 1 mark for substituting -2 to give 3(−2)2−43(-2)^2-43(−2)2−4
    • 1 mark for obtaining 8
  4. 4.Explain[2 marks]

    Explain why the set of pairs {(1,5),(2,7),(1,9),(3,4)}\{(1,5),(2,7),(1,9),(3,4)\}{(1,5),(2,7),(1,9),(3,4)} is not a function.

    Show mark schemeHide mark scheme

    Model answer

    The input 1 is paired with two different outputs, 5 and 9. A function allows only one output for each input.

    • 1 mark for identifying that input 1 has outputs 5 and 9
    • 1 mark for stating that a function allows only one output for each input
  5. 5.Describe[4 marks]

    Describe how the vertical line test shows that a graph is not a function.

    Show mark schemeHide mark scheme

    Model answer

    Draw a vertical line, or imagine one, at each position along the horizontal axis. Count the points where it meets the graph. If any vertical line meets the graph more than once, one input has several outputs. The graph is then not a function.

    • 1 mark for drawing or imagining vertical lines
    • 1 mark for considering positions along the horizontal axis
    • 1 mark for counting where each line meets the graph
    • 1 mark for concluding that more than one meeting point means it is not a function
  6. 6.Determine[2 marks]

    Determine the domain of h(x)=1x−3h(x)=\frac{1}{x-3}h(x)=x−31​.

    Show mark schemeHide mark scheme

    Model answer

    Division by zero is not allowed, so x−3≠0x-3\ne 0x−3=0. The domain is all real numbers except x=3x=3x=3.

    • 1 mark for recognising that the denominator cannot be zero
    • 1 mark for stating x≠3x\ne 3x=3

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.

3.

Easy·State[1 mark]

State what the domain of a function is.
Show answer and explanation

Answer: B · Worked explanation

The domain is the set of inputs where the function is defined. The set of outputs that actually occur is the range, so describing outputs confuses the two terms. Inputs giving an output of zero are only some of the inputs, so they do not form the whole domain.
4.

Medium·Determine[1 mark]

Determine the range of f(x)=x2+1f(x)=x^2+1f(x)=x2+1 for all real inputs.
Show answer and explanation

Answer: B · Worked explanation

A square is never negative, so x2≥0x^2\ge 0x2≥0. Adding 1 gives f(x)≥1f(x)\ge 1f(x)≥1, so the range is y≥1y\ge 1y≥1. The statement y≥0y\ge 0y≥0 is the range of x2x^2x2 alone and ignores the shift of 1. The range is not all real numbers because outputs below 1 never occur.
5.

Medium·Determine[1 mark]

Determine the domain of g(x)=x−4g(x)=\sqrt{x-4}g(x)=x−4​.
Show answer and explanation

Answer: C · Worked explanation

The square root needs a non-negative value, so x−4≥0x-4\ge 0x−4≥0, which gives x≥4x\ge 4x≥4. The input x=4x=4x=4 is allowed because g(4)=0=0g(4)=\sqrt{0}=0g(4)=0​=0, so x>4x>4x>4 wrongly leaves it out. The condition x≠4x\ne 4x=4 would be needed only for a denominator, not for a square root.
6.

Medium[1 mark]

Which set of pairs is a function?
Show answer and explanation

Answer: B · Worked explanation

In {(1,2),(2,2),(3,2)}\{(1,2),(2,2),(3,2)\}{(1,2),(2,2),(3,2)} each input 1, 2 and 3 appears once, so it is a function even though the output 2 repeats. Each other set pairs one input with two outputs: input 2 with 5 and 7, input 0 with 1 and -1, or input 1 with 2 and 3.
7.

Medium·Calculate[2 marks]

A taxi fare is C(d)=2+1.5dC(d)=2+1.5dC(d)=2+1.5d euros for a journey of ddd kilometres. Calculate C(6)C(6)C(6).
Show answer and explanation

Answer: A · Worked explanation

Substitute d=6d=6d=6: C(6)=2+1.5(6)=2+9=11C(6)=2+1.5(6)=2+9=11C(6)=2+1.5(6)=2+9=11 euros. The value 9 euros leaves out the fixed charge of 2 euros. The value 21 euros comes from multiplying the sum 2+1.52+1.52+1.5 by 6, which breaks the rule because only the 1.5 is multiplied by the distance.
8.

Hard·Determine[2 marks]

A function has a graph that is a straight segment from (1, 3) to (5, 11), including both end points. Determine its domain and range.
Show answer and explanation

Answer: C · Worked explanation

The inputs run along the horizontal axis from 1 to 5, so the domain is 1≤x≤51\le x\le 51≤x≤5. The outputs run from 3 to 11, so the range is 3≤y≤113\le y\le 113≤y≤11. Swapping the two intervals confuses inputs with outputs, and repeating 1 to 5 for the range ignores the outputs.
9.

Hard·Deduce[2 marks]

The relation y2=xy^2=xy2=x contains the pairs (4,2)(4,2)(4,2) and (4,−2)(4,-2)(4,−2). Deduce whether it is a function.
Show answer and explanation

Answer: B · Worked explanation

The input 4 is paired with both 2 and -2, so one input has two outputs. A function cannot do this, so the relation is not a function. Having an output for every x≥0x\ge 0x≥0 is not enough. The input x=0x=0x=0 does have an output, namely y=0y=0y=0, so claiming that it has no output is false.
10.

Hard·Determine[2 marks]

Determine the domain of h(x)=x−2x−5h(x)=\frac{\sqrt{x-2}}{x-5}h(x)=x−5x−2​​.
Show answer and explanation

Answer: D · Worked explanation

The square root requires x−2≥0x-2\ge 0x−2≥0, so x≥2x\ge 2x≥2. The denominator cannot be zero, so x≠5x\ne 5x=5. Both conditions must hold together, giving x≥2x\ge 2x≥2 with x≠5x\ne 5x=5. Using only x≥2x\ge 2x≥2 forgets that h(5)h(5)h(5) would need division by zero, and using only x≠5x\ne 5x=5 allows inputs below 2.

Keep going

Next topic2.3 Graphs of functionsPrevious topic2.1 Straight lines

More in Topic 2 · Functions

  1. 2.1Straight linesNotes · 10 questions
  2. 2.2Functions, domain and rangeNotes · 10 questions
  3. 2.3Graphs of functionsNotes · 10 questions
  4. 2.4Key features of graphsNotes · 10 questions
  5. 2.5Modelling with functionsNotes · 10 questions
  6. 2.6The modelling processNotes · 10 questions
  7. 2.7Composite and inverse functionsNotes · 10 questions· HL only
  8. 2.8Transformations of graphsNotes · 10 questions· HL only
  9. 2.9Further modelsNotes · 10 questions· HL only

All IB Mathematics: Applications and Interpretation topics →

Draft: written by Scribe and checked automatically, not yet by a subject reviewer.

Practice questions are original, written by Scribe and checked automatically for correctness.

Topic codes follow the official numbering. Not endorsed by IB Diploma Programme or any exam board.

On this page

0/5 read

  1. 1A function gives exactly one output for each input
  2. 2Function notation names the rule and the input
  3. 3Domain and range describe allowed inputs and possible outputs
  4. 4A vertical line test shows whether a graph is a function
  5. 5Lists of pairs also reveal whether a relation is a function
  6. Check your recall
  7. Practice: 10 questions
All coursesScribeHow it worksPricingPrivacyTerms

Notes and questions are written by Scribe in our own words. Topic codes follow the official course numbering so you can find your place. Not produced or endorsed by the IB, College Board, AQA, OCR, Pearson Edexcel or any exam board.

© 2026 Scribe

A relation that fails the vertical line test

y-3-2-10123-3-2-10123x
  • Upper half
  • Lower half
  • Vertical line x = 1
  • (1, 1.73)
  • (1, −1.73)