A function's graph is a direct visual record of its domain and range. The domain is the shadow of the graph on the $x$-axis, and the range is the shadow on the $y$-axis. This section develops that idea through precise procedures and worked examples.
Quick Reference
| To find | Draw a line | Interpret |
|---|---|---|
| Domain | Vertical lines sweeping all $x$ | Domain = $x$-values where vertical lines hit the graph |
| Range | Horizontal lines sweeping all $y$ | Range = $y$-values where horizontal lines hit the graph |
Finding Domain and Range from a Graph

- To find the domain: for each $x$-value, draw a vertical line. If it intersects the graph, that $x$ is in the domain. The domain is the set of all $x$-values that produce an intersection.
- To find the range: for each $y$-value, draw a horizontal line. If it intersects the graph, that $y$ is in the range. The range is the set of all $y$-values that produce an intersection.
The function $g$ is graphed below. Find its domain and range.

Solution
A vertical line intersects the graph of $g(x)$ for every $x$ except $x = 1$ (there is a hole at $x = 1$). So $x = 1$ is not in the domain. Horizontal lines intersect the graph only at $y = 1$ and $y = 2$. Therefore: $\operatorname{Dom}(g) = \{x \mid x \neq 1\} = \mathbb{R} - \{1\} = (-\infty, 1) \cup (1, \infty),$ $\operatorname{Rng}(g) = \{1, 2\}.$The function $\phi$ is graphed below. Determine the domain and range of $\phi$.

Solution
A vertical line through any $x$ always hits either the left piece or the right piece of the graph. Therefore, every real number is in the domain: $\operatorname{Dom}(\phi) = \mathbb{R}.$ Horizontal lines through $y \geq 0$ all intersect the right piece, and the horizontal line $y = -1$ intersects the left piece. No horizontal line through $y < 0$ and $y \neq -1$ hits the graph. Therefore: $\operatorname{Rng}(\phi) = [0, \infty) \cup \{-1\}.$Find the range of $f : [-1, 2] \to \mathbb{R}$ where $f(x) = x^2 - 3$.
Solution
We sketch the graph by building a table of values, making sure to include the endpoints $x = -1$ and $x = 2$:| $x$ | $-1$ | $-0.5$ | $0$ | $0.5$ | $1$ | $1.5$ | $2$ |
|---|---|---|---|---|---|---|---|
| $f(x)$ | $-2$ | $-2.75$ | $-3$ | $-2.75$ | $-2$ | $-0.75$ | $1$ |
![Graph of y = x² - 3 on the interval [-1, 2].](https://adaptivebooks.org/book-images/precalculus/Ch1-Range-Example3.png)