Resources For Teachers For Tutors For Students & Parents Pricing
Year 12 Maths - Methods (Unit 3 & Unit 4) Functions, relations and graphs

Identifying and describing relations and functions

20 practice questions 0 video lessons Theory + worked examples
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

A relation is any set of ordered pairs \((x,y)\); a function is a relation in which each \(x\)-value gives exactly one \(y\)-value. The vertical-line test checks this on a graph, while the domain and range record the allowed inputs and the resulting outputs — and a relation can be described by a rule, a set of pairs, or a graph.

A relation is a set of ordered pairs \((x,y)\). The domain is the set of all first coordinates (the inputs, or \(x\)-values) and the range is the set of all second coordinates (the outputs, or \(y\)-values). A relation may be given by a rule such as \(y=2x+1\), by listing the pairs such as \(\{(0,1),(1,3),(2,5)\}\), or by a graph.

A function is a special relation in which every input is paired with exactly one output — no \(x\)-value may give two different \(y\)-values. On a graph this is the vertical-line test: if every vertical line meets the graph at most once, the relation is a function. Functions are written with function notation \(y=f(x)\), where \(f(a)\) is the output when \(x=a\); for example if \(f(x)=x^{2}\) then \(f(3)=9\).

A function is one-to-one if each output comes from exactly one input (it also passes the horizontal-line test), and many-to-one if some output comes from several inputs — for instance \(y=x^{2}\) is many-to-one because \(x=2\) and \(x=-2\) both give \(4\). A mapping diagram, drawing an arrow from each input to its output, makes this structure clear for a small finite relation.

Key idea. A relation is a function precisely when every \(x\) maps to exactly one \(y\). Use the vertical-line test to decide "function or not", and the horizontal-line test to decide "one-to-one or many-to-one".
Vertical-line test on a functionThe parabola y equals x squared. A vertical dashed line at x = 1 meets the curve at exactly one point, so the graph is a function. x y y = x² x = 1
Passes the test: every vertical line meets \(y=x^{2}\) once, so it is a function
Vertical-line test on a relation that is not a functionThe sideways parabola x equals y squared. A vertical dashed line at x = 2 meets the curve at two points, so the graph is a relation but not a function. x y x = y² x = 2
Fails the test: the line \(x=2\) meets \(x=y^{2}\) twice, so it is a relation but not a function

The domain and range of a relation, written in set-builder form:

\[\text{dom}=\{\,x : (x,y)\text{ is in the relation}\,\}, \qquad \text{ran}=\{\,y : (x,y)\text{ is in the relation}\,\}\]
dom={x:(x,y)},ran={y:(x,y)}

Function notation names the rule and lets you evaluate an output:

\[y=f(x),\qquad f:A\to B,\ x\mapsto f(x) \qquad\text{e.g. } f(x)=2x+1\Rightarrow f(3)=7\]
y=f(x),f(3)=2(3)+1=7

The single-valued condition (function) and the one-to-one condition:

\[\big(x,y_{1}\big),\big(x,y_{2}\big)\in f\ \Rightarrow\ y_{1}=y_{2} \qquad\qquad f(a)=f(b)\ \Rightarrow\ a=b\ \ (\text{one-to-one})\]
f(a)=f(b)a=b
Reading a graph. Vertical line meets the graph more than once \(\Rightarrow\) not a function; horizontal line meets it more than once \(\Rightarrow\) many-to-one. The domain is the spread of the graph along the \(x\)-axis, the range its spread along the \(y\)-axis.

How to identify and describe a relation or function

  1. Read the relation. Note whether it is given as a rule, a listed set of pairs, or a graph.
  2. Function or not? Check that each \(x\)-value gives only one \(y\)-value — on a graph apply the vertical-line test; from a rule, see whether solving for \(y\) gives a single value (e.g. \(y=\pm\sqrt{\;}\) means two).
  3. Classify. If it is a function, decide one-to-one or many-to-one using the horizontal-line test.
  4. State domain and range. The domain is every allowed \(x\); the range is every resulting \(y\). Watch for restrictions such as division by zero or a negative under a square root.
  5. Describe it. Give the rule, the set of pairs, or the graph as required, using function notation \(y=f(x)\) when it is a function.
Quick shortcut. A single unbroken curve that never doubles back over an \(x\)-value is a function; if the same \(x\) ever produces two \(y\)-values (like a circle or a sideways parabola), it is only a relation.
Example 1 — a listed set of pairs
Decide whether \(\{(-2,4),(0,0),(1,1),(3,9)\}\) is a function, and state its domain and range.
Solution
Check the inputs — no \(x\)-value is repeated:
\(x\)-values\(=\)\(-2,\ 0,\ 1,\ 3\) (all different)
Each input has exactly one output, so it is a function. Read off domain and range:
domain\(=\)\(\{-2,0,1,3\}\)
range\(=\)\(\{0,1,4,9\}\)
\(\therefore\) it is a function; domain \(\{-2,0,1,3\}\), range \(\{0,1,4,9\}\)
dom={-2,0,1,3}
Example 2 — function notation
For \(f(x)=x^{2}-3x\), find \(f(0)\), \(f(2)\) and \(f(-1)\), then solve \(f(x)=0\).
Solution
Substitute each value into the rule:
\(f(0)\)\(=\)\(0^{2}-3(0)=0\)
\(f(2)\)\(=\)\(4-6=-2\)
\(f(-1)\)\(=\)\(1+3=4\)
Solve \(f(x)=0\) — factorise:
\(x^{2}-3x\)\(=\)\(x(x-3)=0\)
\(x\)\(=\)\(0\ \text{ or }\ 3\)
\(\therefore\) \(f(0)=0,\ f(2)=-2,\ f(-1)=4\); and \(f(x)=0\) at \(x=0,3\)
f(2)=4-6=-2
Example 3 — reading a graph
The graph shows \(y=x^{2}\) for \(-1\le x\le 2\). Explain why it is a function, and state its domain and range.
Solution
Domain and range from a graphThe graph of y equals x squared for x from minus 1 to 2 inclusive, with closed endpoints at (minus 1, 1) and (2, 4); the domain is minus 1 to 2 and the range is 0 to 4. x y 2 4 -1 1 y = x²
Function test — every vertical line meets the curve once:
vertical-line test\(\Rightarrow\)one \(y\) per \(x\), so a function
Domain is the \(x\)-spread; range runs from the vertex value \(0\) up to the highest point:
domain\(=\)\([-1,\,2]\)
range\(=\)\([0,\,4]\)
\(\therefore\) a (many-to-one) function; domain \([-1,2]\), range \([0,4]\)
ran=[0,4]
Example 4 — a rule that is not a function
Does \(x^{2}+y^{2}=9\) define \(y\) as a function of \(x\)? State the domain and range of the relation.
Solution
Solve for \(y\) to see how many outputs each \(x\) gives:
\(y^{2}\)\(=\)\(9-x^{2}\)
\(y\)\(=\)\(\pm\sqrt{9-x^{2}}\)
The \(\pm\) gives two \(y\)-values (e.g. \(x=0\Rightarrow y=\pm 3\)), so it fails the vertical-line test:
\(x=0\)\(\Rightarrow\)\(y=3\text{ or }y=-3\) — not a function
Domain needs \(9-x^{2}\ge 0\); the circle has radius \(3\), so:
domain\(=\)\([-3,\,3]\)
range\(=\)\([-3,\,3]\)
\(\therefore\) a relation but not a function; domain \([-3,3]\), range \([-3,3]\)
y=±9-x2

Common pitfalls

Repeated \(y\)-values are fine; repeated \(x\)-values are not. \(\{(1,2),(3,2)\}\) is a function (two inputs may share an output), but \(\{(1,2),(1,5)\}\) is not, because the input \(1\) has two outputs.
Vertical for "function", horizontal for "one-to-one". The vertical-line test decides whether a graph is a function; the horizontal-line test decides whether a function is one-to-one. Do not swap them.
\(f(x)\) is not multiplication. \(f(x)\) means the output of \(f\) at \(x\), not \(f\times x\). Also remember to exclude \(x\)-values that break the rule, such as division by zero or a negative under a square root.

Frequently asked questions

What is the difference between a relation and a function?

A relation is any set of ordered pairs \((x,y)\); a function is a relation in which each \(x\)-value gives exactly one \(y\)-value. Every function is a relation, but \(\{(1,2),(1,5)\}\) is a relation that is not a function.

What is the vertical-line test?

If every vertical line meets a graph at most once, each \(x\) gives only one \(y\) and the graph is a function. If some vertical line cuts it more than once — as a circle does — it is not a function.

What do the domain and range of a function mean?

The domain is the set of allowed inputs (\(x\)-values); the range is the set of resulting outputs (\(y\)-values). For \(y=x^{2}\) with \(-1\le x\le 2\), the domain is \([-1,2]\) and the range is \([0,4]\).

What does the notation f(x) mean?

\(f(x)\) is the output of \(f\) for the input \(x\) — not \(f\times x\). If \(f(x)=x^{2}-3x\) then \(f(2)=4-6=-2\).

What is the difference between a one-to-one and a many-to-one function?

One-to-one: each output comes from exactly one input (it passes the horizontal-line test). Many-to-one: some output comes from several inputs, such as \(y=x^{2}\) where \(x=2\) and \(x=-2\) both give \(4\).

How can you describe a relation?

By a rule such as \(y=2x+1\), by listing its ordered pairs such as \(\{(0,1),(1,3)\}\), or by drawing its graph. A mapping diagram of arrows from inputs to outputs also works for a small finite relation.