Functions and Relations
Theory
The domain of a function or relation is the set of allowed \(x\)-values and the range is the set of \(y\)-values it produces. This Year 11 Mathematics Advanced page shows how to write sets of numbers in interval notation, as inequalities and in words, how to find the natural domain of functions with fractions and square roots, and how to find the range from the vertex, from a restricted domain, from a graph and from standard results.
A relation is a set of ordered pairs \((x,y)\). It can be given as a list, a rule such as \(x^{2}+y^{2}=25\), or a graph. A function is a relation in which each \(x\)-value is paired with exactly one \(y\)-value, for example \(f(x)=x^{2}-4\).
The domain is the set of all \(x\)-values (first coordinates). The range is the set of all \(y\)-values (second coordinates). For \(\{(0,4),(2,1),(2,3),(5,4)\}\) the domain is \(\{0,2,5\}\) and the range is \(\{1,3,4\}\): each value is listed once.
If no domain is given, a function has its natural domain: every real \(x\) for which the rule gives a real number. Two things are not allowed: dividing by zero, and taking the square root of a negative number.
An interval is an unbroken set of real numbers. In interval notation a square bracket \([\ \ ]\) means the endpoint is included and a round bracket \((\ \ )\) means it is excluded. The symbol \(\infty\) (infinity) is not a number, so it always takes a round bracket. The symbol \(\cup\) (union) joins two intervals. On a number line or graph, a closed dot is included and an open dot is excluded.
Interval notation, inequalities and words describe the same set of numbers:
| Inequality | Interval notation | In words |
|---|---|---|
| \(a\le x\le b\) | \([a,b]\) | from \(a\) to \(b\), both included |
| \(a\lt x\lt b\) | \((a,b)\) | between \(a\) and \(b\), both excluded |
| \(a\le x\lt b\) | \([a,b)\) | \(a\) included, \(b\) excluded |
| \(x\ge a\) | \([a,\infty)\) | all real numbers greater than or equal to \(a\) |
| \(x\gt a\) | \((a,\infty)\) | all real numbers greater than \(a\) |
| \(x\le b\) | \((-\infty,b]\) | all real numbers less than or equal to \(b\) |
| \(x\neq a\) | \((-\infty,a)\cup(a,\infty)\) | all real numbers except \(a\) |
| all real \(x\) | \((-\infty,\infty)\) | all real numbers |
Natural domain: rule out the \(x\)-values that break the function.
Ranges worth knowing (natural domain):
How to find the natural domain
- Look for a denominator and a square root.
- Write the condition for each: denominator \(\neq 0\); expression under the root \(\ge 0\); a root in the denominator needs \(\gt 0\).
- Solve each condition, combine them, and write the answer as an inequality or in interval notation.
For a quadratic under the root, use its graph. \((x+1)(5-x)\ge 0\) has zeros \(x=-1\) and \(x=5\); the parabola is concave down, so it is \(\ge 0\) between the zeros: \(-1\le x\le 5\). A concave up parabola such as \(x^{2}-4\) is positive outside its zeros: \(x\lt -2\) or \(x\gt 2\).
How to find the range
- Quadratic: find the vertex (complete the square if needed). The \(y\)-value of the vertex is the minimum (concave up) or maximum (concave down).
- Restricted domain: check the vertex (if it lies inside the domain) and both endpoints. The smallest and largest of these values give the range.
- Square roots, \(2^{x}\), fractions: use the standard results. A fraction with a positive constant top and a bottom of at least \(c\gt 0\) lies between \(0\) and \(\dfrac{\text{top}}{c}\) (Example 4).
- From a graph: read the lowest and highest \(y\)-values, and the left and right ends. Use a square bracket for a closed dot and a round bracket for an open dot.
- From a list of ordered pairs: the domain is the set of first coordinates and the range is the set of second coordinates, each value listed once.
(ii) The domain of a function is \([3,\infty)\). Write this domain as an inequality and as a worded description.
(i) \(-1\) is excluded, so use \((\); \(6\) is included, so use \(]\).
\(\therefore\) \(\boldsymbol{(-1,6]}\)
(ii) A square bracket means \(3\) is included, and the interval continues forever to the right.
\(\therefore\) \(\boldsymbol{x\ge 3}\): all real numbers greater than or equal to \(3\).
(i) \(f(x)=\sqrt{6-3x}\), as an inequality and in interval notation
(ii) \(g(x)=\dfrac{3}{x^{2}-x-6}\)
(i) The expression under the square root must be non-negative:
| \(6-3x\) | \(\ge\) | \(0\) |
| \(6\) | \(\ge\) | \(3x\) |
| \(x\) | \(\le\) | \(2\) |
\(\therefore\) domain: \(\boldsymbol{x\le 2}\), that is \(\boldsymbol{(-\infty,2]}\)
(ii) The function is undefined where the denominator is zero:
| \(x^{2}-x-6\) | \(=\) | \(0\) |
| \((x-3)(x+2)\) | \(=\) | \(0\) |
\(x=3\) or \(x=-2\)
\(\therefore\) domain: all real \(x\), \(\boldsymbol{x\neq -2,\ 3}\), that is \((-\infty,-2)\cup(-2,3)\cup(3,\infty)\)
(i) Find the range of \(f(x)\).
(ii) Find the range of \(f(x)\) for the domain \(-3\le x\le 1\).
(i) Complete the square to find the minimum value:
| \(f(x)\) | \(=\) | \(x^{2}+4x+4-4+7\) |
| \(\) | \(=\) | \((x+2)^{2}+3\) |
\((x+2)^{2}\ge 0\), so \(f(x)\ge 3\), with \(f(-2)=3\).
\(\therefore\) range \(=\boldsymbol{[3,\infty)}\)
(ii) Check the vertex and both endpoints. The vertex \((-2,3)\) lies inside the domain: minimum \(3\).
| \(f(-3)\) | \(=\) | \(9-12+7=4\) |
| \(f(1)\) | \(=\) | \(1+4+7=12\) |
The largest value is \(12\) (at \(x=1\)).
\(\therefore\) range \(=\boldsymbol{[3,12]}\), that is \(3\le f(x)\le 12\)
(ii) Find the range of \(g(x)=\dfrac{6}{x^{2}+2}\). Give your answer in interval notation and as a worded description.
(i) Two conditions:
Square root: \(x+3\ge 0\), so \(x\ge -3\).
Denominator: \(x-1\neq 0\), so \(x\neq 1\).
\(\therefore\) domain \(=\boldsymbol{[-3,1)\cup(1,\infty)}\)
(ii) Bound the denominator: \(x^{2}\ge 0\), so \(x^{2}+2\ge 2\), with equality only at \(x=0\).
| \(0\lt\dfrac{6}{x^{2}+2}\) | \(\le\) | \(\dfrac{6}{2}\) |
| \(\) | \(=\) | \(3\) |
\(g(0)=3\). As \(x\to\pm\infty\), \(g(x)\to 0\) but never reaches \(0\).
\(\therefore\) range \(=\boldsymbol{(0,3]}\): all real numbers greater than \(0\) and less than or equal to \(3\).
Common pitfalls
Frequently asked questions
What is the difference between domain and range?
The domain is the set of \(x\)-values (inputs) a function or relation uses. The range is the set of \(y\)-values (outputs) it produces.
What do square and round brackets mean in interval notation?
A square bracket means the endpoint is included and a round bracket means it is excluded. So \([-3,4)\) means \(-3\le x\lt 4\).
How do you find the natural domain of a function?
Find the \(x\)-values that would make a denominator zero or put a negative number under a square root, and leave them out. Everything else is in the natural domain.
How do you find the range of a quadratic function?
Find the vertex, by completing the square if needed. If the parabola is concave up the range is \(y\ge\) the \(y\)-value of the vertex; if concave down it is \(y\le\) that value.
What is the range of y = 1/x?
All real numbers except \(0\). A fraction with numerator \(1\) can never equal \(0\), but it takes every other real value. The domain is also all real numbers except \(0\).