Functions, relations and graphs
Relations versus functions, the vertical line test, and how to find domain and range from a graph, using interval notation.
A graph shows a whole function at once: where it is positive, where it peaks, which values it never reaches. Most questions in this course are answered faster from a sketch than from a formula, so this section links the two.
The graph of a function
A stone is thrown upwards and its height after $x$ seconds is $y = 4x(5 - x)$ metres. Each input and its output make an ordered pair:
| $x$ | $0$ | $1$ | $2$ | $2.5$ | $3$ | $4$ | $5$ |
|---|---|---|---|---|---|---|---|
| $y$ | $0$ | $16$ | $24$ | $25$ | $24$ | $16$ | $0$ |
Plot all such pairs and they join into a smooth arch. Because the stone is in only one place at any time, no two points on the graph share an $x$-coordinate. That gives a more precise definition: a function is a set of ordered pairs in which no two pairs have the same first coordinate.
Domain and range
The domain is the set of all $x$-values that are used. The range is the set of all $y$-values that come out. For the stone, time runs from $0$ until it lands at $5$ seconds, and the height goes from $0$ up to $25$ m. So the domain is $[0, 5]$ and the range is $[0, 25]$.
A filled dot at an endpoint means it is included and an open dot means it is not, exactly as with intervals in 2A. An arrow means the graph keeps going.
The natural domain
If a function is given as a formula with no restriction, its domain is every $x$ that can legally be substituted. This is the natural domain. For now, only two things are illegal:
- dividing by zero, so a denominator can't be $0$;
- square-rooting a negative, so the inside of a root must be $\ge 0$.
Find the natural domain of (a) $f(x) = \sqrt{2x + 6}$ (b) $g(x) = \dfrac{1}{\sqrt{4 - x}}$.
Find the natural domain of $h(x) = \dfrac{\sqrt{x + 2}}{x - 1}$.
Relations and the vertical line test
Not every graph is a function. The circle $x^2 + y^2 = 25$ contains both $(3, 4)$ and $(3, -4)$, so the input $3$ has two outputs. Any set of ordered pairs is called a relation. A function is a special relation, just as a square is a special rectangle.
On a graph, two points with the same $x$-coordinate sit on one vertical line. So:
Faint orange: the parabola y = x² − 2. Blue: the circle x² + y² = 9. Slide the dashed vertical line.
- Can you find any position where the line meets the parabola twice? What does that tell you?
- Find two points on the circle with the same $x$-coordinate. That pair is your proof the circle is not a function.
- Which $x$-values give the line any point on the circle at all? That is the domain of the circle.
Show that $y^2 = x$ is not a function, and state its domain and range.
Your turn
State the domain and range of $y = -\sqrt{16 - x^2}$. Is it a function?
Show the working
We need $16 - x^2 \ge 0$, so $-4 \le x \le 4$. The root $\sqrt{16 - x^2}$ takes values from $0$ to $4$, and the minus sign flips these to $-4$ up to $0$. So the domain is $[-4, 4]$ and the range is $[-4, 0]$. It is the lower half of a circle of radius $4$, and each $x$ gives only one $y$, so it is a function.
Which of these is not a function?
The circle contains $(0, 2)$ and $(0, -2)$, two points with the same $x$-coordinate. The others pass the vertical line test.
The natural domain of $f(x) = \sqrt{x + 5}$ is $x \ge k$. Find $k$.
$x + 5 \ge 0$, so $x \ge -5$.
The natural domain of $y = \dfrac{1}{x - 4}$ is:
Only $x = 4$ makes the denominator zero. Every other real number is fine, including those below $4$.
The range of $y = x^2 - 3$ is $y \ge k$. Find $k$.
$x^2 \ge 0$ for every $x$, so $x^2 - 3 \ge -3$. The value $-3$ is reached at $x = 0$.
The range of $y = 2 - \sqrt x$ is:
$\sqrt x$ takes every value from $0$ upwards, so $2 - \sqrt x$ takes every value from $2$ downwards. At $x = 0$, $y = 2$, so $2$ is included.
The relation $\{(1, 4), (2, 5), (1, -3), (4, 4)\}$ is not a function. Which $x$-value shows this?
$x = 1$ is paired with both $4$ and $-3$. The repeated output $4$ (from $x = 1$ and $x = 4$) is fine.
The natural domain of $f(x) = \dfrac{3}{\sqrt{6 - 2x}}$ is $x \lt k$. Find $k$.
The root is in the denominator, so $6 - 2x \gt 0$. Then $2x \lt 6$ and $x \lt 3$.
The vertical line $x = 3$ meets the circle $x^2 + y^2 = 25$ at two points. Enter the positive $y$-value.
$9 + y^2 = 25$, so $y^2 = 16$ and $y = \pm 4$. The two points $(3, 4)$ and $(3, -4)$ prove the circle is not a function.
Exam style: the domain and range of $y = \sqrt{9 - x^2}$ are:
$9 - x^2 \ge 0$ gives $-3 \le x \le 3$. The positive root runs from $0$ (at $x = \pm 3$) up to $3$ (at $x = 0$). It is the upper semicircle of radius $3$.
Exam style: a $24$ cm wire is bent into a rectangle with one side $x$ cm, so its area is $A(x) = x(12 - x)$ for $0 \lt x \lt 12$. What is the largest value in the range of $A$, in cm²?
The graph is an upside-down parabola with zeroes $0$ and $12$. Its highest point is on the axis halfway between, at $x = 6$, where $A = 6 \times 6 = 36$. So the range is $0 \lt A \le 36$.
Coaching Centre