Every function has two collections of numbers attached to it. The domain is the set of inputs the function accepts. The range is the set of outputs it actually produces.
Why it works
The domain can be limited by the rule or by the situation. A rule cannot divide by zero, so $\frac{1}{x - 3}$ cannot accept $x = 3$; and a real square root needs a number that is not negative, so $\sqrt{x + 2}$ needs $x \ge -2$. A situation can limit it too: a rental lasting $h$ hours needs $h \ge 0$. On a graph, inputs are $x$-values, so the domain is the graph's shadow on the $x$-axis; outputs are $y$-values, so the range is its shadow on the $y$-axis.
| Set | Inequality | Interval notation |
|---|---|---|
| $x$ between $-2$ and $3$, both included | $-2 \le x \le 3$ | $[-2, 3]$ |
| $x$ at least $-2$ | $x \ge -2$ | $[-2, \infty)$ |
| all real numbers except $3$ | $x \ne 3$ | $(-\infty, 3) \cup (3, \infty)$ |
Key idea
Domain: all allowed inputs ($x$-values). Range: all outputs that occur ($y$-values). Read the domain left to right along the $x$-axis and the range bottom to top along the $y$-axis.
Worked examples
Worked example: From a rule
Find the domain and range of $f(x) = \sqrt{x - 1} + 2$.
- The square root needs $x - 1 \ge 0$, so $x \ge 1$. Domain: $[1, \infty)$.
- $\sqrt{x - 1}$ is $0$ or more, so $f(x)$ is $2$ or more, and every value from $2$ up occurs. Range: $[2, \infty)$.
Answer: Domain $[1, \infty)$, range $[2, \infty)$.
Worked example: From a situation
A bike rents for $C(h) = 5 + 3h$ dollars, for $0$ to $8$ hours. Find the range.
- The situation sets the domain: $0 \le h \le 8$.
- $C$ grows with $h$, so outputs run from $C(0) = 5$ to $C(8) = 29$.
Answer: Range $[5, 29]$.
Common mistake
Reading the range along the $x$-axis, or forgetting that a real situation limits the domain. Range is about outputs, the heights of the graph. And a formula like $C(h) = 5 + 3h$ accepts any $h$, but negative hours make no sense, so the situation trims the domain.