Identifying and describing relations and functions
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.
The domain and range of a relation, written in set-builder form:
Function notation names the rule and lets you evaluate an output:
The single-valued condition (function) and the one-to-one condition:
How to identify and describe a relation or function
- Read the relation. Note whether it is given as a rule, a listed set of pairs, or a graph.
- 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).
- Classify. If it is a function, decide one-to-one or many-to-one using the horizontal-line test.
- 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.
- 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.
| \(x\)-values | \(=\) | \(-2,\ 0,\ 1,\ 3\) (all different) |
| domain | \(=\) | \(\{-2,0,1,3\}\) |
| range | \(=\) | \(\{0,1,4,9\}\) |
| \(f(0)\) | \(=\) | \(0^{2}-3(0)=0\) |
| \(f(2)\) | \(=\) | \(4-6=-2\) |
| \(f(-1)\) | \(=\) | \(1+3=4\) |
| \(x^{2}-3x\) | \(=\) | \(x(x-3)=0\) |
| \(x\) | \(=\) | \(0\ \text{ or }\ 3\) |
| vertical-line test | \(\Rightarrow\) | one \(y\) per \(x\), so a function |
| domain | \(=\) | \([-1,\,2]\) |
| range | \(=\) | \([0,\,4]\) |
| \(y^{2}\) | \(=\) | \(9-x^{2}\) |
| \(y\) | \(=\) | \(\pm\sqrt{9-x^{2}}\) |
| \(x=0\) | \(\Rightarrow\) | \(y=3\text{ or }y=-3\) — not a function |
| domain | \(=\) | \([-3,\,3]\) |
| range | \(=\) | \([-3,\,3]\) |
Common pitfalls
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.