IB Maths AA HL
Topic 2 — Functions
Paper 1 & 2
~8 min read
Language of Functions
A function is a rule that takes an input and gives back exactly one output. The vocabulary around them — domain, range, mapping, function notation — is what every later topic builds on. Get fluent with the language now and the rest of the chapter is mostly mechanical.
📘 What you need to know
- A function takes each input to exactly one output. So functions can be one-to-one or many-to-one — but never one-to-many.
- Vertical line test: a sketch is a function if every vertical line crosses it at most once.
- Notation: f(x) means “apply f to input x“. So f(3) means substitute x = 3.
- Domain = set of allowed inputs (in terms of x). Range = set of possible outputs (in terms of f(x)).
- Largest possible domain is usually all real numbers (ℝ) except values that break the function — divide-by-zero, square root of a negative, log of zero or negative.
- Number sets: ℕ (naturals 0, 1, 2, …), ℤ (integers), ℚ (rationals), ℝ (reals). Each set is contained in the next: ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ.
- Piecewise function: different rules apply on different intervals. May or may not be continuous at the boundaries.
Mappings — four types, only two are functions
A mapping links inputs to outputs. There are four flavours:
One-to-one ✓
f(x) = 2x + 5
function — each input has its own unique output
Many-to-one ✓
f(x) = x2
function — different inputs can share an output
One-to-many ✗
y2 = x
not a function — one input gives multiple outputs
Many-to-many ✗
x2 + y2 = 25
not a function — circle fails the vertical line test
Vertical line test: draw any vertical line on the graph. If it ever crosses the curve more than once, it’s not a function. If every vertical line hits at most once, it is.
Function notation, domain & range
Function notation
f(x) = “the output of f when the input is x”
f(3) ⟹ substitute x = 3 into the rule
Domain
set of inputs (in x)
e.g. x ≥ 0, or x ∈ ℝ, x ≠ 2
Range
set of outputs (in f(x))
e.g. f(x) ≥ 1, or f(x) ∈ ℝ
The point (a, b) is on the graph of y = f(x) precisely when f(a) = b. Inputs go on the x-axis, outputs on the y-axis.
If a domain isn’t written next to a function, assume it’s the largest possible — usually all real numbers, with whatever values break the rule excluded.
Number sets — symbols you’ll see in domains
ℕ — naturals
0, 1, 2, 3, …
whole non-negative numbers
ℤ — integers
…, −2, −1, 0, 1, 2, …
whole numbers + negatives
ℚ — rationals
a/b, b ≠ 0
fractions of integers
ℝ — reals
all of the above + π, √2, …
everything on the number line
You’ll also see ℤ+ for positive integers (1, 2, 3, …). The symbol “x ∈ ℝ” reads as “x is a real number”.
Largest possible domain — when do things break?
Start with all real numbers and exclude whatever breaks the rule:
Square root
√(expression)
need expression ≥ 0
Fraction (1 / something)
1expression
need expression ≠ 0
Logarithm
ln(expression)
need expression > 0
Polynomial / exponential
e.g. x3, ex
no restrictions — x ∈ ℝ
Piecewise functions — different rules on different intervals
A piecewise function is a single function defined by different rules depending on which interval the input falls in. To evaluate f(a), check which interval a sits in, then apply the matching rule.
Example piecewise
f(x) =
{ 3x − 2 if x ≤ 4 ; x2 − 8 if x > 4 }
A piecewise function is continuous at a boundary if the two rules give the same value there. Otherwise the graph “jumps”.
The intervals must not overlap — every x belongs to exactly one piece. If they overlapped, you’d have ambiguity (and it wouldn’t be a function).
Worked examples
WE 1Evaluate a function at a given input
Given f(x) = 3x2 − 2x + 1, find f(−2).
Substitute x = −2
f(−2) = 3(−2)² − 2(−2) + 1
= 3(4) + 4 + 1
= 12 + 4 + 1
f(−2) = 17
watch the sign on −2(−2) — two negatives multiply to give a positive
WE 2Find the range of a linear function with a given domain
For f(x) = 2x − 5 with domain −3 ≤ x ≤ 4, find the range of f.
Linear, increasing → endpoints give endpoints
f(−3) = 2(−3) − 5 = −11
f(4) = 2(4) − 5 = 3
range: −11 ≤ f(x) ≤ 3
for a strictly increasing linear function, the smallest input gives the smallest output
WE 3Find the range when the vertex matters
For f(x) = x2 − 4x + 7 with domain 1 ≤ x ≤ 5, find the range of f.
Step 1: Find vertex (minimum since a > 0)
x = −b/(2a) = 4/2 = 2 (lies inside domain 1 ≤ x ≤ 5)
f(2) = 4 − 8 + 7 = 3 → minimum value
Step 2: Check endpoints for maximum
f(1) = 1 − 4 + 7 = 4
f(5) = 25 − 20 + 7 = 12 → maximum
range: 3 ≤ f(x) ≤ 12
for a quadratic, always check whether the vertex lies inside the domain — if yes, that’s an extremum
WE 4Find the largest possible domain
State the largest possible domain for each function:
(a) f(x) = √(x − 3) (b) g(x) = 1x − 5 (c) h(x) = ln(x + 2)
(a) Square root → expression inside ≥ 0
x − 3 ≥ 0 → x ≥ 3
(a) x ≥ 3
(b) Fraction → denominator ≠ 0
x − 5 ≠ 0 → x ≠ 5
(b) x ∈ ℝ, x ≠ 5
(c) Logarithm → input strictly > 0
x + 2 > 0 → x > −2
(c) x > −2
log needs strict > 0 (not ≥) because ln(0) is undefined
WE 5Evaluate a piecewise function and check continuity
The function f is defined by f(x) = { x + 5 if x < 0; x2 + 5 if 0 ≤ x ≤ 3; 3x + 4 if x > 3 }.
(a) Find f(−2), f(2), f(4). (b) Determine whether f is continuous at x = 0 and at x = 3.
(a) Pick the right rule for each input
f(−2): x < 0 → use x + 5 → f(−2) = 3
f(2): 0 ≤ x ≤ 3 → use x² + 5 → f(2) = 9
f(4): x > 3 → use 3x + 4 → f(4) = 16
f(−2) = 3, f(2) = 9, f(4) = 16
(b) Continuity = both pieces agree at the boundary
at x = 0: x + 5 → 5 and x² + 5 → 5 ✓ continuous
at x = 3: x² + 5 → 14 and 3x + 4 → 13 ✗ jump of 1 unit
continuous at x = 0; not continuous at x = 3
the boundary value itself uses the rule that includes the equals sign — at x = 3, that’s x² + 5 → 14
WE 6Classify mappings — function or not?
Classify each as one-to-one, many-to-one, one-to-many, or many-to-many. State whether each is a function.
(a) y = 4x − 7 (b) y = (x − 3)2 (c) x = y2 + 1
(a) Linear: each x → unique y, each y from one x
(a) one-to-one — function ✓
(b) Parabola (∪-shape): each x → one y, but two x-values share the same y
e.g. x = 1 and x = 5 both give y = 4
(b) many-to-one — function ✓
(c) Sideways parabola: solving for y gives y = ±√(x − 1)
one input x gives two outputs (positive and negative roots)
(c) one-to-many — NOT a function ✗
vertical line test: (a) and (b) pass, (c) fails — a vertical line at x = 5 cuts (c) at two points
💡 Top tips
- Vertical line test is the fastest way to spot if a graph is a function.
- Domain in x, range in f(x). Don’t mix them up — examiners do check the variable.
- For a quadratic on a closed interval, always check whether the vertex is inside the domain — that gives the extreme value.
- Three things break a function: divide by zero, square root of negative, log of zero or negative. Memorise these and you’ll handle most “largest possible domain” questions.
- For piecewise, write out which rule you’re using before substituting. Picking the wrong piece is the most common slip.
- Sketch the graph on your GDC when finding a range — it’s much easier to read off the highest and lowest values visually.
- Continuity at a boundary: just check both rules at that point. Equal → continuous. Not equal → jump.
⚠ Common mistakes
- Calling a one-to-many mapping a function. Each input must give exactly one output.
- Forgetting the vertex when finding range of a quadratic on a closed interval. Endpoints aren’t always the extremes.
- Writing range in x instead of f(x). Domain uses x; range uses f(x) (or whatever the function is called).
- Including x = 0 in the domain of 1/x. Always exclude any value that makes a denominator zero.
- For piecewise functions, picking the rule by guess instead of checking the interval. Always look at which interval contains the input first.
- Using ≤ where the boundary is excluded. ln(x) needs x > 0, not x ≥ 0 — log of zero is undefined.
- Treating “many-to-many” as a function with restrictions. It’s not a function in the first place — there’s no rule that gives a single output.
Now you’ve got the language locked down — function notation, domain, range, mappings, piecewise. Everything from here builds on these ideas. The next note tackles composite functions: what happens when you feed the output of one function as the input to another, like f(g(x)).
Need help with the Language of Functions?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.
Book Free Session →