1.02PureFoundation

Function Notation

You have been writing y=x2+3y = x^{2} + 3 for years. Function notation replaces it with f(x)=x2+3\mathrm{f}(x) = x^{2} + 3, and the change is more than cosmetic: it names the rule, so you can say f(5)\mathrm{f}(5), f(a+h)\mathrm{f}(a+h) or f(2x)\mathrm{f}(2x) without rewriting anything, and it forces you to think about which inputs the rule is actually allowed to take.

30 min Functions

The big picture

A function\textbf{function} is a rule that assigns to every input in a set exactly one\textit{one} output. That single word "one" is what separates a function from a general relationship between xx and yy, and it is why a circle is not the graph of a function while a parabola is. Notation matters because the rest of this chapter — domain and range, composition, inverses — and much of the course after it, from graph transformations to differentiation from first principles, is written in it. Being fluent with expressions like f(x+h)−f(x)\mathrm{f}(x+h) - \mathrm{f}(x) now saves real confusion later.

What you'll be able to do

  • Use function notation f(x)\mathrm{f}(x) and the mapping notation f:x↦…\mathrm{f}: x \mapsto \dots
  • Evaluate functions for numbers and for algebraic inputs
  • Distinguish functions from mappings that are not functions
  • Describe one-to-one and many-to-one functions
1

What function notation says

f(x)=3x−1\mathrm{f}(x) = 3x - 1 reads "f of xx equals 3x−13x - 1". The letter f\mathrm{f} names the rule; the xx in brackets is a placeholder for whatever you feed in.

The same rule can also be written in mapping form, f:x↦3x−1\mathrm{f}: x \mapsto 3x - 1, read "f maps xx to 3x−13x-1". OCR uses both, and they mean exactly the same thing.

To evaluate, replace every\textit{every} xx with the input — in brackets, so that signs and powers behave. f(−2)=3(−2)−1=−7\mathrm{f}(-2) = 3(-2) - 1 = -7.

f(x)=3x−1⟺f:x↦3x−1\mathrm{f}(x) = 3x - 1 \quad\Longleftrightarrow\quad \mathrm{f}: x \mapsto 3x - 1
Two notations, one rule.
Example 1Given g(x)=x2−4x\mathrm{g}(x) = x^{2} - 4x, find g(−3)\mathrm{g}(-3) and solve g(x)=5\mathrm{g}(x) = 5.
1g(−3)=(−3)2−4(−3)=9+12=21\mathrm{g}(-3) = (-3)^{2} - 4(-3) = 9 + 12 = 21.
2g(x)=5\mathrm{g}(x) = 5 means x2−4x=5x^{2} - 4x = 5, so x2−4x−5=0x^{2} - 4x - 5 = 0.
3Factorise: (x−5)(x+1)=0(x-5)(x+1) = 0.
Answerg(−3)=21\mathrm{g}(-3) = 21; x=5x = 5 or x=−1x = -1.
Why this works

g(−3)\mathrm{g}(-3) asks "what comes out when −3-3 goes in?" and g(x)=5\mathrm{g}(x) = 5 asks "what went in if 55 came out?". The first is evaluation; the second is an equation. Keeping those two questions distinct is half of this topic.

2

Algebraic inputs

The input does not have to be a number. f(2x)\mathrm{f}(2x), f(x+1)\mathrm{f}(x+1) and f(a+h)\mathrm{f}(a+h) are all legitimate, and they are evaluated exactly the same way: substitute the whole expression wherever xx appears.

This is where brackets earn their keep. With f(x)=x2\mathrm{f}(x) = x^{2}, f(x+1)=(x+1)2=x2+2x+1\mathrm{f}(x+1) = (x+1)^{2} = x^{2} + 2x + 1 — not x2+1x^{2} + 1.

Notice also that f(x)+1\mathrm{f}(x) + 1 and f(x+1)\mathrm{f}(x+1) are different: one adds after applying the rule, the other adds before. That distinction becomes vertical versus horizontal translation when you study graph transformations.

Example 1For f(x)=2x2−x\mathrm{f}(x) = 2x^{2} - x, find and simplify f(x+h)−f(x)\mathrm{f}(x+h) - \mathrm{f}(x).
1f(x+h)=2(x+h)2−(x+h)=2x2+4xh+2h2−x−h\mathrm{f}(x+h) = 2(x+h)^{2} - (x+h) = 2x^{2} + 4xh + 2h^{2} - x - h.
2Subtract f(x)=2x2−x\mathrm{f}(x) = 2x^{2} - x.
3The 2x22x^{2} and −x-x terms cancel.
Answer4xh+2h2−h4xh + 2h^{2} - h

Tip — Always put the substituted expression in brackets on the first line of working. Most errors with f(x+h)\mathrm{f}(x+h) or f(−x)\mathrm{f}(-x) come from skipping this.

3

When is a mapping a function?

A mapping\textbf{mapping} is any rule linking inputs to outputs. It is a function\textbf{function} only if every input in the chosen set produces exactly one\textit{exactly one} output.

So x↦±xx \mapsto \pm\sqrt{x} is not a function: the input 44 gives two outputs, 22 and −2-2. But x↦xx \mapsto \sqrt{x}, which by convention means the non-negative root, is a function on x≥0x \ge 0.

Graphically, this is the vertical line test\textbf{vertical line test}: a graph represents a function if no vertical line crosses it more than once. A circle fails; a parabola y=x2y = x^{2} passes.

A mapping can also fail to be a function because some input has no\textit{no} output. x↦1xx \mapsto \dfrac{1}{x} is not a function on all real numbers, because 00 has nowhere to go — but it is a function once 00 is excluded.

Why this works

Whether something is a function depends on the set of inputs you allow, not only on the formula. That is exactly why the next lesson, on domain and range, exists.

4

One-to-one and many-to-one

A function is one-to-one\textbf{one-to-one} if different inputs always give different outputs. f(x)=2x+3\mathrm{f}(x) = 2x + 3 is one-to-one: no two values of xx give the same answer.

It is many-to-one\textbf{many-to-one} if at least two inputs share an output. f(x)=x2\mathrm{f}(x) = x^{2} on all real numbers is many-to-one, since f(3)=f(−3)=9\mathrm{f}(3) = \mathrm{f}(-3) = 9.

Graphically, a one-to-one function passes the horizontal line test\textbf{horizontal line test} too: no horizontal line meets its graph more than once.

This classification matters because only one-to-one functions have inverses. Restricting a many-to-one function to part of its domain — x2x^{2} on x≥0x \ge 0, say — can make it one-to-one.

Tip — Mappings can be one-to-many (not functions at all), one-to-one, or many-to-one. Only the last two are functions. Examiners like asking you to classify all four combinations.

Think like an examiner

  • Substitute into f\mathrm{f} with brackets, especially for negative or algebraic inputs.
  • When asked whether a mapping is a function, name a specific input that fails and say why.
  • Distinguish f(x+a)\mathrm{f}(x+a) from f(x)+a\mathrm{f}(x)+a explicitly.
  • Use the precise words one-to-one and many-to-one, justified with an example of two inputs.

Common misconceptions

Reading f(x)\mathrm{f}(x) as f\mathrm{f} multiplied by xx.
f(x)\mathrm{f}(x) means the rule f\mathrm{f} applied to xx.
Writing f(x+1)=x2+1\mathrm{f}(x+1) = x^{2} + 1 when f(x)=x2\mathrm{f}(x) = x^{2}.
Substitute the whole input: (x+1)2(x+1)^{2}.
Evaluating f(−2)\mathrm{f}(-2) for f(x)=x2\mathrm{f}(x) = x^{2} as −4-4.
(−2)2=4(-2)^{2} = 4; brackets keep the sign inside the square.
Calling x↦±xx \mapsto \pm\sqrt{x} a function.
One input gives two outputs, so it is a one-to-many mapping.

Function notation

f:x↦f(x)\mathrm{f}: x \mapsto \mathrm{f}(x)
Mapping notation.
f(a) — output for input a\mathrm{f}(a) \text{ — output for input } a
Evaluation.
f(x+a)≠f(x)+a\mathrm{f}(x+a) \neq \mathrm{f}(x) + a
Inside versus outside.

Stretch yourself

The function f\mathrm{f} is defined by f(x)=ax+b\mathrm{f}(x) = ax + b for constants aa and bb. Given that f(2)=11\mathrm{f}(2) = 11 and f(f(1))=29\mathrm{f}(\mathrm{f}(1)) = 29, find the possible pairs (a,b)(a, b).

Hint — Write f(1)=a+b\mathrm{f}(1) = a + b, then apply f\mathrm{f} to that expression. Use f(2)=11\mathrm{f}(2) = 11 to eliminate bb.

Reveal solution
SolutionFrom f(2)=11\mathrm{f}(2) = 11: 2a+b=112a + b = 11, so b=11−2ab = 11 - 2a. Then f(1)=a+b=11−a\mathrm{f}(1) = a + b = 11 - a, and f(f(1))=a(11−a)+b=11a−a2+11−2a=−a2+9a+11\mathrm{f}(\mathrm{f}(1)) = a(11 - a) + b = 11a - a^{2} + 11 - 2a = -a^{2} + 9a + 11. Setting this equal to 2929: a2−9a+18=0a^{2} - 9a + 18 = 0, so (a−3)(a−6)=0(a-3)(a-6) = 0. If a=3a = 3, b=5b = 5; if a=6a = 6, b=−1b = -1. Check: f(x)=3x+5\mathrm{f}(x) = 3x+5 gives f(1)=8\mathrm{f}(1) = 8, f(8)=29\mathrm{f}(8) = 29 ✓; f(x)=6x−1\mathrm{f}(x) = 6x - 1 gives f(1)=5\mathrm{f}(1) = 5, f(5)=29\mathrm{f}(5) = 29 ✓. So (a,b)=(3,5)(a,b) = (3, 5) or (6,−1)(6, -1). ■\blacksquare

Questions students ask

Is f(x)\mathrm{f}(x) the same as yy?
For graphing, yes — the graph of f\mathrm{f} is y=f(x)y = \mathrm{f}(x). The notation is more flexible because it names the rule and lets you write inputs other than xx.
What is the difference between a mapping and a function?
Every function is a mapping, but a mapping is only a function if each input in its domain has exactly one output.
How do I show a function is many-to-one?
Find two different inputs with the same output, such as f(2)=f(−2)\mathrm{f}(2) = \mathrm{f}(-2) for f(x)=x2\mathrm{f}(x) = x^{2}.
Does the letter matter?
No. f\mathrm{f}, g\mathrm{g} and h\mathrm{h} are conventional names, and f(t)=t2\mathrm{f}(t) = t^{2} defines the same function as f(x)=x2\mathrm{f}(x) = x^{2}.

Key takeaways

  • f(x)\mathrm{f}(x) names a rule and its input; f:x↦…\mathrm{f}: x \mapsto \dots is equivalent.
  • Substitute the whole input, in brackets, wherever xx appears.
  • A function gives exactly one output for each input in its domain.
  • One-to-one: distinct inputs, distinct outputs. Many-to-one: some outputs are shared.
  • Only one-to-one functions have inverses.

How this fits the course

Test yourself

Answer a few questions, then review anything you missed.

Next step

Keep practising

Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.

Browse practice topics

Related lessons

All 6 lessons

Put the methods into practice: see how A-Level maths duels work. An account is required to play; the overview and sample are public.