Skip to main content
NSWMaths AdvancedSyllabus dot point

What makes a rule a function rather than just a relation, how does f(x)f(x) notation let us name and evaluate that rule, and how do the vertical and horizontal line tests sort every graph into one of four types?

Define and use function notation, distinguish a function from the more general relation using the vertical line test, and classify relations as one-to-one, many-to-one, one-to-many or many-to-many using the horizontal line test

A Year 11 Maths Advanced answer on functions and notation: the function machine and f(x)f(x) notation, evaluating and substituting expressions into a function, the difference between a function and a relation, the vertical line test, and one-to-one, many-to-one, one-to-many and many-to-many classification via the horizontal line test, with worked examples and practice questions.

Generated by Claude Opus 4.819 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

What this dot point is asking

This dot point sets up the language used for the rest of the course. Three ideas sit together. First, function notation: the rule f(x)f(x), read as a machine that turns an input into a single output, and how to evaluate it, including substituting whole expressions like f(a+1)f(a + 1). Second, the difference between a function and the more general relation, decided cleanly by the vertical line test. Third, the horizontal line test, which sorts every graph into one of four types: one-to-one, many-to-one, one-to-many and many-to-many. None of this is hard once the "input to output" picture is fixed, but it is examined constantly and underpins everything later: domain and range, inverse functions, logarithms as the reverse of exponentials, and reading a graph backwards. The goal is to make f(x)f(x) as automatic as the y=y = \dots you already know, and to never mislabel a relation.

The answer

A function is a rule with one output per input

Informally, yy is a function of xx when yy is completely determined by xx through some rule. The variable xx is the independent variable (the input you choose) and yy is the dependent variable (the output the rule hands back). The single defining property is this: each input has exactly one output. A rule that could give two different outputs for the same input is not a function.

It helps to picture the rule as a machine: you feed in a value of xx, the machine applies its rule, and a single value comes out. The diagram below is the machine for f(x)=2x+1f(x) = 2x + 1, with a table of inputs and the one output each produces.

The function machine for f(x) = 2x + 1A box labelled f takes an input x on the left and returns the output 2x plus 1 on the right, with a table of inputs minus two to three and their outputs.fxinput2x + 1outputxf(x)-2-3-1-101132537Each input x has exactly one output f(x) = 2x + 1.

Function notation f(x)f(x)

Instead of writing y=2x+1y = 2x + 1, we can give the rule a name, usually ff, and write f(x)=2x+1f(x) = 2x + 1. This Euler notation, in use since 1735, sits alongside the y=y = \dots form throughout the course. The symbol f(x)f(x) is read "ff of xx" and means "the output of the rule ff when the input is xx". It is not ff multiplied by xx.

The power of the notation is that it lets you name a specific output. To evaluate ff at a number, substitute that number for every xx:

  • f(0)=2(0)+1=1f(0) = 2(0) + 1 = 1, read "ff of zero equals one".
  • f(3)=2(3)+1=7f(3) = 2(3) + 1 = 7.

You can name several functions at once, say f(x)f(x), g(x)g(x) and h(x)h(x), and a function can be described in words ("cube the number and subtract 77" is g(x)=x37g(x) = x^3 - 7) rather than by a formula.

Substituting expressions, not just numbers

The input to a function need not be a number: you can substitute another letter, or a whole expression. The rule is always the same, replace every xx with whatever is in the brackets, then simplify. This skill is the engine of differentiation from first principles later, so it is worth drilling now.

For f(x)=x2+1f(x) = x^2 + 1:

  • f(a)=a2+1f(a) = a^2 + 1 (just rename the input).
  • f(a+2)=(a+2)2+1=a2+4a+5f(a + 2) = (a + 2)^2 + 1 = a^2 + 4a + 5 (expand the bracket fully).
  • f(2a)=(2a)2+1=4a2+1f(2a) = (2a)^2 + 1 = 4a^2 + 1 (square the whole input, so the 22 is squared too).

The classic slip is to forget the brackets: f(2a)f(2a) is (2a)2+1=4a2+1(2a)^2 + 1 = 4a^2 + 1, not 2a2+12a^2 + 1. Substitute the input inside brackets and the algebra stays honest.

Relations: the more general idea

Not every graph is a function. A circle such as x2+y2=9x^2 + y^2 = 9 has, for the input x=0x = 0, the two outputs y=3y = 3 and y=3y = -3, so it breaks the "one output per input" rule. The general word for any set of ordered pairs, function or not, is a relation. Like a function, a relation has a graph, a domain and a range; unlike a function, a relation may have two or more points sharing the same xx-coordinate. A function is therefore a special kind of relation, just as a square is a special kind of rectangle.

The vertical line test

Because a function forbids one input from having two outputs, you can spot a function straight off its graph: two points with the same xx lie on the same vertical line. So draw vertical lines and look for a double crossing.

Here the test is applied to two graphs. The parabola y=x2y = x^2 passes (every vertical line meets it once), so it is a function. The circle x2+y2=9x^2 + y^2 = 9 fails (a vertical line meets it twice), so it is only a relation.

The vertical line testLeft, a parabola where every vertical line meets the curve once, so it is a function. Right, a circle where a vertical line meets the curve twice, so it is not a function.xymeets once: a functiony = x squaredxymeets twice: not a functionx squared + y squared = 9

Reading a graph backwards, and the horizontal line test

The vertical line test reads a graph forwards, from xx to yy. You can also read it backwards, from yy to xx: to solve f(x)=bf(x) = b, draw the horizontal line y=by = b and read off where it meets the curve. If that horizontal line meets the curve more than once, then that one output bb comes from several inputs.

Counting those backward crossings is exactly the horizontal line test, the companion of the vertical one with "vertical" and "horizontal" swapped. For a graph that is already a function (so it passes the vertical test), the horizontal test sorts it further:

  • If it passes the horizontal test (no horizontal line meets it twice), it is one-to-one: read forwards or backwards, there is never more than one answer. It is a one-to-one correspondence between domain and range.
  • If it fails the horizontal test, it is many-to-one: read forwards there is one output, but read backwards at least one yy has several xx-values mapping to it.

Below, both y=2xy = 2x and y=x2y = x^2 are functions, but y=2xy = 2x is one-to-one (each height reached once) while y=x2y = x^2 is many-to-one (the height y=4y = 4 comes from x=2x = 2 and x=2x = -2, which is why 44 has two square roots).

The horizontal line test on two functionsLeft, the line y equals two x where every horizontal line meets once, so it is one-to-one. Right, the parabola y equals x squared where a horizontal line meets twice, so it is many-to-one.xymeets once: one-to-oney = 2xxymeets twice: many-to-oney = x squared

The four types of relations, stage by stage

Putting the two tests together classifies every graph into exactly one of four types. The vertical test decides function or not; the horizontal test then decides "to-one" or "to-many". Building the four cases up one at a time makes the pattern click: each panel below changes one test result, sweeping through all four combinations.

Stage 1, one-to-one (passes both tests). The line y=2xy = 2x passes the vertical test, so it is a function, and it passes the horizontal test too. Every input has one output and every output comes from one input, so it is a one-to-one correspondence. Read it forwards or backwards and there is never more than one answer.

One-to-oneThe line y equals two x passes both the vertical and horizontal line tests, so it is a one-to-one function.xyStage 1y = 2xVertical passes (a function); horizontal passes too.One-to-one: one input, one output, both ways.

Stage 2, many-to-one (passes vertical, fails horizontal). The parabola y=x2y = x^2 still passes the vertical test, so it is a function, but the horizontal line y=2.25y = 2.25 meets it at x=1.5x = 1.5 and x=1.5x = -1.5, so it fails the horizontal test. A function that fails horizontally is many-to-one: many inputs share one output.

Many-to-oneThe parabola y equals x squared passes the vertical line test but fails the horizontal line test, so it is a many-to-one function.xyStage 2y = x squaredVertical passes (a function); horizontal fails.Many-to-one: y = 2.25 comes from x = 1.5 and x = -1.5.

Stage 3, one-to-many (fails vertical, passes horizontal). The sideways parabola y2=xy^2 = x fails the vertical test (the line x=2.25x = 2.25 meets it at y=1.5y = 1.5 and y=1.5y = -1.5), so it is not a function. But it passes the horizontal test, since each height yy gives a single x=y2x = y^2. A non-function that passes horizontally is one-to-many.

One-to-manyThe sideways parabola y squared equals x fails the vertical line test but passes the horizontal line test, so it is one-to-many and not a function.xyStage 3y squared = xVertical fails (not a function); horizontal passes.One-to-many: x = 2.25 gives y = 1.5 and y = -1.5.

Stage 4, many-to-many (fails both tests). The circle x2+y2=4x^2 + y^2 = 4 fails the vertical test (a vertical line meets it twice) and the horizontal test (a horizontal line meets it twice). Failing both, it is many-to-many: at least one input gives several outputs and at least one output comes from several inputs. That completes all four combinations.

Many-to-manyThe circle x squared plus y squared equals four fails both the vertical and horizontal line tests, so it is many-to-many and not a function.xyStage 4x squared + y squared = 4Both tests fail (not a function).Many-to-many: a vertical and a horizontal line each meet twice.

Functions and relations need not act on numbers. In a database that records each employee's home postcode, the input is a person and the output is a postcode: it is a function (each person has one postcode), and with more employees than NSW postcodes it must be many-to-one, since some postcode is shared.

How exam questions ask about functions and notation

The wording is usually a direct cue to one of these moves:

  • "Find f(2)f(2)" or "evaluate the function at..." wants you to substitute the value for every xx and simplify. Watch negatives: f(3)f(-3) means substitute 3-3 inside brackets.
  • "Find f(a+h)f(a + h)" or "f(2x)f(2x)" wants you to substitute the whole expression in brackets and expand. The marks are for the correct substitution and full expansion, so keep the brackets.
  • "Show that this graph is (not) a function" wants the vertical line test: either state that every vertical line meets it once, or exhibit a single vertical line crossing twice.
  • "Is the function one-to-one or many-to-one?" wants the horizontal line test applied to a graph already known to be a function. One crossing for every horizontal line means one-to-one; one repeated height means many-to-one.
  • "Classify the relation" wants the full four-type answer: run both tests and name the type.
  • "Solve f(x)=kf(x) = k from the graph" is reading the graph backwards: draw y=ky = k and read off the xx-values where it meets the curve.
  • A worded context (a fee, a fare, a height) defines a function in disguise. Substituting a value reads it forwards; solving for the input reads it backwards.

Practice questions

Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.

foundation2 marksA function is defined by f(x)=3x5f(x) = 3x - 5. Find f(2)f(2), f(1)f(-1) and f(0)f(0).
Show worked solution →

Substitute each input for xx. The rule f(x)=3x5f(x) = 3x - 5 multiplies the input by 33 and then subtracts 55.

Find f(2)f(2):

f(2)=3(2)5=65=1.f(2) = 3(2) - 5 = 6 - 5 = 1.

Find f(1)f(-1). Take care with the negative:

f(1)=3(1)5=35=8.f(-1) = 3(-1) - 5 = -3 - 5 = -8.

Find f(0)f(0):

f(0)=3(0)5=05=5.f(0) = 3(0) - 5 = 0 - 5 = -5.

State the answers. f(2)=1f(2) = 1, f(1)=8f(-1) = -8 and f(0)=5f(0) = -5. Notice f(0)=5f(0) = -5 is the value where the graph would cross the yy-axis, since the input there is x=0x = 0.

foundation2 marksUse the vertical line test to decide whether each of these is a function: (a) the parabola y=x2y = x^2, (b) the circle x2+y2=9x^2 + y^2 = 9. Explain your reasoning in one line each.
Show worked solution →
State the test
A graph is a function exactly when no vertical line crosses it more than once, because that would mean one input xx gives two different outputs yy.
Test (a) the parabola y=x2y = x^2
Every vertical line x=ax = a meets the parabola at exactly one point, (a,a2)(a, a^2). It passes, so y=x2y = x^2 is a function.
Test (b) the circle x2+y2=9x^2 + y^2 = 9
The vertical line x=0x = 0 meets the circle at (0,3)(0, 3) and (0,3)(0, -3), two points. One input gives two outputs, so it fails, and x2+y2=9x^2 + y^2 = 9 is not a function (it is a relation).
Conclusion
The parabola is a function; the circle is only a relation. A single vertical line crossing twice is all the evidence you need to rule a graph out.
core3 marksA plumber charges a fixed call-out fee plus an hourly rate, so the total cost in dollars for a job of nn hours is C(n)=90+75nC(n) = 90 + 75n. Find C(0)C(0) and C(3)C(3), say what each means, and find the length of a job that costs $315.
Show worked solution →

Find C(0)C(0) and read its meaning. Put n=0n = 0:

C(0)=90+75(0)=90.C(0) = 90 + 75(0) = 90.

This is the cost of a 00 hour job, the call-out fee of $90 that is charged just for turning up.

Find C(3)C(3):

C(3)=90+75(3)=90+225=315.C(3) = 90 + 75(3) = 90 + 225 = 315.

A 33 hour job costs $315.

Solve C(n)=315C(n) = 315 for the job length. Set the rule equal to 315315:

90+75n=315    75n=225    n=3.90 + 75n = 315 \;\Rightarrow\; 75n = 225 \;\Rightarrow\; n = 3.

State the answer. A job costing $315 lasts n=3n = 3 hours, which matches C(3)=315C(3) = 315 found above. Here nn is the input and CC is the output: finding C(3)C(3) reads the rule forwards, and solving C(n)=315C(n) = 315 reads it backwards.

core3 marksFor h(x)=x2+xh(x) = x^2 + x, find and fully simplify h(a+1)h(a)h(a + 1) - h(a).
Show worked solution →

Write down h(a+1)h(a + 1) by replacing every xx with a+1a + 1.

h(a+1)=(a+1)2+(a+1).h(a + 1) = (a + 1)^2 + (a + 1).

Expand carefully. Expand the square first, (a+1)2=a2+2a+1(a + 1)^2 = a^2 + 2a + 1:

h(a+1)=a2+2a+1+a+1=a2+3a+2.h(a + 1) = a^2 + 2a + 1 + a + 1 = a^2 + 3a + 2.

Write down h(a)h(a):

h(a)=a2+a.h(a) = a^2 + a.

Subtract and collect like terms.

h(a+1)h(a)=(a2+3a+2)(a2+a)=2a+2.h(a + 1) - h(a) = (a^2 + 3a + 2) - (a^2 + a) = 2a + 2.

State and check. The simplified result is h(a+1)h(a)=2a+2h(a + 1) - h(a) = 2a + 2. Check at a=2a = 2: h(3)=9+3=12h(3) = 9 + 3 = 12 and h(2)=4+2=6h(2) = 4 + 2 = 6, so h(3)h(2)=6h(3) - h(2) = 6, and 2(2)+2=62(2) + 2 = 6 agrees.

exam3 marksClassify each graph as one-to-one, many-to-one, one-to-many or many-to-many, giving the result of each line test: (a) y=x3y = x^3, (b) y=xy = |x|, (c) x=y2x = y^2.
Show worked solution →
Recall the rule
The vertical line test decides function (passes) versus not a function (fails); the horizontal line test then splits "to-one" (passes) from "to-many" (fails).
(a) y=x3y = x^3
It passes the vertical test (one output per input), so it is a function. It also passes the horizontal test, since y=x3y = x^3 is always increasing and each height is reached once. Passing both, it is one-to-one.
(b) y=xy = |x|
It passes the vertical test, so it is a function. But the horizontal line y=2y = 2 meets it at x=2x = 2 and x=2x = -2, so it fails the horizontal test. Function but horizontal-fail means many-to-one.
(c) x=y2x = y^2 (a sideways parabola)
The vertical line x=4x = 4 meets it at y=2y = 2 and y=2y = -2, so it fails the vertical test and is not a function. It passes the horizontal test (each height yy gives a single x=y2x = y^2). Not a function but horizontal-pass means one-to-many.
State the answers
(a) one-to-one, (b) many-to-one, (c) one-to-many. None here is many-to-many; that needs both tests to fail, as a full circle does.
exam4 marksA Sydney taxi charges a flagfall plus a per-kilometre rate, so the fare in dollars for a trip of dd kilometres is F(d)=4.20+2.50dF(d) = 4.20 + 2.50d. (a) Find F(0)F(0) and explain what it represents. (b) Find the fare for a 1212 km trip. (c) A passenger is charged $24.20. How far did they travel? (d) Is FF a one-to-one or a many-to-one function? Justify briefly.
Show worked solution →

(a) Find F(0)F(0). Put d=0d = 0:

F(0)=4.20+2.50(0)=4.20.F(0) = 4.20 + 2.50(0) = 4.20.

This is the fare for a 00 km trip, the flagfall of $4.20 charged the moment the meter starts.

(b) Fare for 1212 km. Put d=12d = 12:

F(12)=4.20+2.50(12)=4.20+30.00=34.20.F(12) = 4.20 + 2.50(12) = 4.20 + 30.00 = 34.20.

A 1212 km trip costs $34.20.

(c) Solve F(d)=24.20F(d) = 24.20 (read the rule backwards).

4.20+2.50d=24.20    2.50d=20.00    d=8.4.20 + 2.50d = 24.20 \;\Rightarrow\; 2.50d = 20.00 \;\Rightarrow\; d = 8.

The passenger travelled 88 km. Check: F(8)=4.20+2.50(8)=4.20+20.00=24.20F(8) = 4.20 + 2.50(8) = 4.20 + 20.00 = 24.20, correct.

(d) Classify FF. The graph of F(d)=4.20+2.50dF(d) = 4.20 + 2.50d is a straight line with a non-zero gradient, so every horizontal line meets it exactly once. It passes both line tests, so FF is one-to-one: each fare corresponds to exactly one distance, which is why part (c) had a single answer.

Related dot points