Table of Contents
In the broader chapter on function analysis, you already met the idea of a function as a rule pairing each input with exactly one output. In this chapter we focus on two central descriptors of a function:
- The domain: what inputs are allowed.
- The range: what outputs actually occur.
These ideas turn up constantly throughout precalculus and calculus, so it is worth learning how to think about them carefully and how to determine them from different kinds of information (formulas, graphs, and context).
Domain: What Inputs Are Allowed
The domain of a function is the set of all input values $x$ for which the function’s rule actually makes sense (in the mathematical or real-world context).
A function may be presented:
- By a formula, like $f(x) = \dfrac{1}{x-3}$.
- By a graph.
- By a table.
- By a verbal description, such as “$C(t)$ is the cost of renting a car for $t$ hours.”
The idea of domain is the same in all cases: which $x$ are allowed?
Domain from a formula: common restrictions
When a function is given by a formula, you often start by thinking “all real numbers” and then exclude any values that cause problems.
Typical reasons an $x$ is not allowed in real-valued functions:
- Division by zero
Expressions like $\dfrac{1}{x-3}$ are undefined when the denominator is zero.
- Example: $f(x) = \dfrac{1}{x-3}$
The denominator $x - 3 = 0$ when $x=3$.
Domain: all real $x$ except $.
Using interval notation:
$$
(-\infty, 3) \cup (3, \infty).
$$
- Even roots of negative numbers
In real-valued functions, $\sqrt{\text{(negative number)}}$ is not allowed.
- Example: $f(x) = \sqrt{4 - x}$
We require the expression under the square root (the radicand) to be nonnegative:
$$
4 - x \ge 0 \quad \Rightarrow \quad x \le 4.
$$
Domain: $(-\infty, 4]$. - Example: $g(x) = \sqrt{x^2 - 9}$
Need $x^2 - 9 \ge 0$.
Solve $x^2 - 9 \ge 0$:
$$
x^2 \ge 9 \quad \Rightarrow \quad x \le -3 \text{ or } x \ge 3.
$$
Domain: $(-\infty, -3] \cup [3, \infty)$.
(Odd roots, like $\sqrt[3]{x}$, do not have this restriction in the reals.)
- Logarithms
For real logarithms (like $\ln x$ or $\log_{10} x$), the argument must be strictly positive.
- Example: $f(x) = \ln(x - 2)$
Need $x - 2 > 0$, so $x > 2$.
Domain: $(2, \infty)$. - Example: $g(x) = \log(5 - x)$ (base $10$, say)
Need - x > 0 \Rightarrow x < 5$.
Domain: $(-\infty, 5)$.
- Piecewise definitions
Some functions specify their own domain piece by piece.
- Example:
$$
f(x) =
\begin{cases}
x^2, & x \le 1, \
3x - 1, & x > 1.
\end{cases}
$$
The first formula applies only when $x \le 1$, the second only when $x > 1$.
Domain: all real numbers (every real $x$ fits into one of the two pieces).
- Application-based restrictions
In many real-world settings, the domain is restricted by the meaning of the variables, even if the formula itself would work for all real $x$.
- Example: $h(t) = 5t + 10$ is the cost in dollars for parking $t$ hours.
The formula works for all real $t$, but time $t$ cannot be negative.
Natural domain: $t \ge 0$. - Example: $P(n) = 100(0.9)^n$ is the population after $n$ years.
Here $n$ might only make sense for $n \ge 0$ and often only integer values.
When reading a problem, pay close attention to whether the domain is:
- Stated explicitly.
- Determined by algebraic restrictions.
- Determined by the real-world context.
Domain from a graph
For a function shown by a graph in the $xy$-plane, the domain is the set of all $x$-coordinates where the graph has a point.
To find it:
- Look horizontally across the graph.
- Project everything down to the $x$-axis.
- Include or exclude endpoints according to dots or open circles.
Typical visual cues:
- A solid dot at $(a, f(a))$ means $x = a$ is included.
- An open circle at $(b, f(b))$ means $x = b$ is not included (often a hole).
- An arrow on a curve suggests it continues indefinitely in that direction.
Examples (described verbally):
- A segment from $x = -2$ to $x = 3$ including both endpoints:
Domain: $[-2, 3]$. - A curve starting with an open circle at $x = -1$ and extending to the right forever:
Domain: $(-1, \infty)$. - Two separate pieces: one from $x \le -2$ and another from $x > 1$:
Domain: $(-\infty, -2] \cup (1, \infty)$.
Stated domains and implicit domains
Sometimes a function is defined with an explicit domain, even if algebra would allow more values.
- Example: “Let $f(x) = x^2$ for $0 \le x \le 5$.”
Even though $x^2$ makes sense for all real $x$, this definition restricts the domain to $[0,5]$.
Whenever the domain is explicitly given, that is the domain you must use, even if the formula itself would work on a bigger set.
Range: What Outputs Actually Occur
The range of a function is the set of all values $f(x)$ produced when $x$ runs over the domain.
The range depends on the domain. Changing the domain usually changes the range.
Range from a simple formula
Sometimes you can reason about the outputs by understanding how the formula behaves.
- Linear functions $f(x) = mx + b$, $m \ne 0$
For domain $(-\infty, \infty)$, a nonconstant linear function can produce all real numbers as outputs.
- Example: $f(x) = 2x + 3$
As $x$ gets very large, x + 3 \to \infty$; as $x$ gets very negative, x + 3 \to -\infty$.
Range: $(-\infty, \infty)$.
But if you restrict the domain, the range may no longer be all real numbers.
- Example: same $f(x) = 2x + 3$, but domain $[0,4]$.
Compute endpoints:
$$
f(0) = 3, \quad f(4) = 11.
$$
Because it’s linear, it takes every value between $ and $ on this interval.
Range: $[3,11]$.
- Squares and even powers
- Example: $f(x) = x^2$ with domain all real numbers.
Any square is $\ge 0$, and for any $y \ge 0$ we can find $x = \pm \sqrt{y}$ so that $x^2 = y$.
Range: $[0,\infty)$. - Example: $g(x) = x^2$ with domain $[0,\infty)$.
Negative outputs are still impossible. Every nonnegative $y$ still has at least one $x \ge 0$ with $x^2 = y$.
Range: $[0,\infty)$ again. - Example: $h(x) = x^2$ with domain $[-1,2]$.
Compute $h(-1) = 1$, $h(0) = 0$, $h(2) = 4$.
The lowest output is $ (at $x=0$), the highest is $ (at $x=2$). - Square root functions
- Example: $f(x) = \sqrt{x}$ with domain $[0,\infty)$.
The square root is never negative, and can be arbitrarily large as $x$ grows.
Range: $[0,\infty)$. - Example: $g(x) = \sqrt{4 - x}$ with domain $(-\infty, 4]$.
The largest value of -x$ occurs when $x$ is as small as possible. As $x \to -\infty$, -x \to \infty$, so $g(x)$ can be arbitrarily large.
Also, when $x=4$, $g(4)=0$.
Range: $[0,\infty)$. - Rational functions
Range: $[0,4]$.
Finding the range of rational functions like $\dfrac{1}{x}$ or $\dfrac{x+1}{x-2}$ often involves more subtle reasoning.
- Example: $f(x) = \dfrac{1}{x}$, domain $x \ne 0$.
We never get output $, because $\dfrac{1}{x} = 0$ has no real solution. But we can get any other real number as an output (for instance, $\dfrac{1}{1/5} = 5$, $\dfrac{1}{-2} = -\tfrac{1}{2}$, etc.). - Example: $g(x) = \dfrac{1}{x-3}$, domain $x \ne 3$.
Same reasoning: $\dfrac{1}{x-3} = 0$ has no solution. But any nonzero number can be achieved.
Range: $\mathbb{R} \setminus \{0\}$.
Range: all real numbers except $.
Algebraic method for finding range
Sometimes you can find the range by solving $y = f(x)$ for $x$ in terms of $y$, and then seeing which $y$ produce valid $x$ in the domain.
Example: $f(x) = x^2 + 4$, domain all real.
- Start with $y = x^2 + 4$.
- Solve for $x$:
$$
x^2 = y - 4.
$$ - For real $x$, we need $y - 4 \ge 0 \Rightarrow y \ge 4$.
So the range is $[4, \infty)$.
This technique is especially useful when dealing with quadratic or rational functions whose graphs you understand only partially.
Range from a graph
To find the range of a graphed function:
- Look vertically.
- Project every point down (or up) to the $y$-axis.
- Collect all $y$-values that appear.
As with domain:
- Solid dots include that $y$-value at that $x$.
- Open circles indicate that particular point is missing, but nearby points may still provide that $y$-value.
- Arrows show that the graph extends, often yielding values arbitrarily large or small.
Examples (described verbally):
- A continuous curve from $(0,1)$ to $(4,5)$, including endpoints:
Domain: $[0,4]$.
Range: $[1,5]$. - A horizontal line at $y = -2$ for all $x$:
Domain: $(-\infty,\infty)$.
Range: $\{-2\}$ (a single value). - A graph consisting of only three solid points: $(1,2)$, $(2,4)$, $(3,1)$.
Domain: $\{1, 2, 3\}$.
Range: $\{2, 4, 1\}$.
The role of the domain in determining the range
The same formula can give very different ranges depending on the domain.
- Example: $f(x) = x^3$.
- Domain all real numbers: Range is all real numbers.
- Domain $[0,2]$: $f(0)=0$, $f(2)=8$, and it is increasing on this interval, so the range is $[0,8]$.
- Domain $[-2,-1]$: $f(-2)=-8$, $f(-1)=-1$, still increasing, so range is $[-8,-1]$.
Any time you are asked for the range, check the domain first.
Interval Notation and Set Notation
In precalculus, domains and ranges are usually written as subsets of the real numbers using interval notation or set-builder descriptions.
Interval notation
- $(a,b)$: all real numbers strictly between $a$ and $b$.
- $[a,b]$: all real numbers between $a$ and $b$, including endpoints.
- $(a,b]$: greater than $a$ and less than or equal to $b$.
- $[a,b)$: greater than or equal to $a$ and less than $b$.
- $(-\infty, a)$ or $(a,\infty)$: go indefinitely to $-\infty$ or $\infty$; infinity is never included, so always use parentheses, not brackets.
- Unions: if a set has separate pieces, use $\cup$:
$$
(-\infty, -1) \cup (2, \infty).
$$
Set-builder notation
Sometimes you want to emphasize the condition on the variable:
- $\{x \mid x \ne 3\}$: all real $x$ such that $x \ne 3$.
- $\{x \mid x \ge 0\}$: all real $x$ with $x \ge 0$.
- $\{y \mid y > 1\}$: all real $y$ greater than $1$.
Both interval notation and set-builder notation describe the same sets in different styles.
Typical Patterns for Common Function Types
Certain standard forms have “typical” domains and ranges (for real-valued functions):
- Polynomials (e.g., $x^2 + 3x - 5$):
- Domain: all real numbers.
- Range: depends on degree and coefficients; often found by graphing or algebraic reasoning.
- Rational functions (e.g., $\dfrac{p(x)}{q(x)}$):
- Domain: all real numbers where $q(x) \ne 0$.
- Range: often all real numbers except a finite number of exceptions; may require more advanced techniques to find fully.
- Square root functions (e.g., $\sqrt{g(x)}$):
- Domain: $g(x) \ge 0$.
- Range: outputs $\ge 0$, sometimes with further bounds from the domain.
- Logarithmic functions (e.g., $\ln(g(x))$):
- Domain: $g(x) > 0$.
- Range: often all real numbers, assuming the argument covers all positive values.
Recognizing these patterns can speed up your reasoning about domain and range, especially in more complex problems later in the course.
Summary
- Domain: the set of all allowed input values (typically real $x$) for which the function is defined, taking into account:
- Algebraic restrictions (no division by zero, no even roots of negatives, log arguments $> 0$).
- Explicit definitions (piecewise functions, stated intervals).
- Real-world context (time, length, counts, etc.).
- Range: the set of all output values $f(x)$ produced when $x$ runs over the domain, found by:
- Analyzing the behavior of the formula.
- Solving $y = f(x)$ for $x$ and checking which $y$ lead to valid $x$.
- Inspecting the graph vertically.
Getting comfortable with domain and range prepares you for deeper questions about functions, such as invertibility and function composition, which are treated in other chapters.