A function's graph is a direct visual record of its domain and range. The domain is the shadow of the graph on the -axis, and the range is the shadow on the -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 | Domain = -values where vertical lines hit the graph |
| Range | Horizontal lines sweeping all | Range = -values where horizontal lines hit the graph |
Finding Domain and Range from a Graph

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

Solution
A vertical line intersects the graph of for every except (there is a hole at ). So is not in the domain.
Horizontal lines intersect the graph only at and .
Therefore:
The function is graphed below. Determine the domain and range of .

Solution
A vertical line through any always hits either the left piece or the right piece of the graph. Therefore, every real number is in the domain:
Horizontal lines through all intersect the right piece, and the horizontal line intersects the left piece. No horizontal line through and hits the graph. Therefore:
Find the range of where .
Solution
We sketch the graph by building a table of values, making sure to include the endpoints and :
![Graph of y = x² - 3 on the interval [-1, 2].](https://adaptivebooks.org/book-images/precalculus/Ch1-Range-Example3.png)
The function reaches its minimum value of at and its maximum value of at . From the graph:
Exercises
The graph of a function is shown. Find and .
Answer
and .
Solution
The domain — sweep vertical lines. Take a vertical line and slide it from far left to far right.
- For it misses the curve completely, so those are not in the domain.
- At it meets the curve at the solid endpoint , so is in the domain.
- For every between and it cuts the curve once.
- At it meets the solid endpoint , so is in the domain.
- For it misses the curve.
Hence the shadow of the graph on the -axis is the segment from to , endpoints included:
The range — sweep horizontal lines. Now slide a horizontal line from bottom to top.
- Below the line misses the curve.
- At it touches the lowest point of the curve, so is in the range.
- Between and every horizontal line cuts the curve (in fact twice, once on each side of the dip, but once is enough).
- At it passes through both endpoints and .
- Above it misses the curve.
Hence
The two shadows, drawn.
A caution. A horizontal line meeting the curve twice does no harm here — that only means two inputs share an output. It is vertical lines meeting a curve twice that would stop it from being a graph of a function.
The graph of a function is shown; the hollow dot marks a point that is missing from the graph. Find and .
Answer
and .
Solution
The domain. Sweeping a vertical line from left to right:
- for it misses the graph;
- at it meets the solid endpoint , so is in the domain;
- for it meets the graph once;
- at it passes exactly through the hollow dot. A hollow dot marks a point that has been removed, so the line meets nothing. Therefore is not in the domain;
- for it meets the graph once;
- at it meets the solid endpoint , so is in the domain;
- for it misses the graph.
Hence
The range. Sweeping a horizontal line from bottom to top:
- below : no intersection;
- at : it meets the solid endpoint , so is in the range;
- between and : one intersection each time;
- at : the only point of the line at that height would be the removed point , so there is no intersection and is not in the range;
- between and : one intersection each time;
- at : it meets the solid endpoint , so is in the range;
- above : no intersection.
Hence
Why the hole affects both answers here. The missing point removes one input and the one output that only that input produced. Compare the first exercise, where every output was produced by two different inputs; there, deleting a single point would have left the range unchanged.
Notation check. Square brackets mark endpoints that belong to the set, round brackets those that do not. So contains but not — exactly matching the solid dot at and the hollow dot at .
The graph of a function is shown; the arrow means the curve continues indefinitely in that direction. Find and .
Answer
and .
Solution
The domain. A vertical line placed to the left of misses the curve, so those numbers are excluded. At the line meets the solid endpoint , so is included. For every to the right of the line meets the curve, and the arrow tells us this continues without end. Hence the shadow on the -axis is a ray:
The range. No part of the curve lies below the -axis, so horizontal lines with miss it entirely. The line meets the endpoint , so is in the range. For each height above , the rising curve eventually reaches that height, because the arrow says it keeps climbing without stopping. Hence
On reading arrows. An arrow means "and so on forever in this direction". Without it, the picture would only guarantee what is drawn, and the honest answers would be and . Always check whether a graph ends at a dot or at an arrow; the two say very different things.
A concrete function of this shape. The rule produces exactly this picture: its domain requires , that is , and its outputs are all the nonnegative numbers. The graph and the algebra agree.
The graph of a function consists of the two separate arcs shown. Find and .
Answer
and .
Solution
The domain. Sweep a vertical line across the picture and record where it hits something.
- : misses.
- : hits the left arc (once).
- : passes through the gap between the arcs and hits nothing.
- : hits the right arc.
- : misses.
All four endpoints are solid dots, so all four are included. The shadow on the -axis is therefore two segments:
The range. Sweep a horizontal line from bottom to top.
- : misses.
- : hits the lower arc, whose lowest point is and whose highest points are the endpoints at height .
- : misses both arcs — the lower arc lies entirely at heights from to , and the upper arc entirely at heights from to .
- : hits the upper arc, whose top is .
- : misses.
Hence
Two independent gaps. The gap in the domain, from to , and the gap in the range, also from to , happen to occupy the same numbers here, but that is a coincidence of this picture. The domain gap comes from a stretch of the -axis with nothing above it; the range gap from a stretch of the -axis with nothing beside it. Always read each one off its own axis.
The graph of a function is the segment shown, with a solid dot at the left end and a hollow dot at the right end. Find and .
Answer
and .
Solution
The domain. Vertical lines hit the segment for every from up to but not including .
- At the line meets the solid dot, so is in the domain.
- At the only candidate point is the hollow dot, which is not part of the graph, so is not in the domain.
The range. Now look at heights. As runs from toward , the segment falls from height down toward height .
- The height is attained, at the solid dot , so is in the range.
- The height would be attained only at the hollow dot, which is missing, so is not in the range.
- Every height strictly between and occurs somewhere along the segment.
The point of this exercise. The domain is closed at its left end and open at its right; the range is open at its bottom and closed at its top. The brackets did not simply carry across. This happens because the segment falls as we move right, so the left endpoint of the domain corresponds to the top of the range.
A check with numbers. The segment lies on the line through and , whose slope is
so its equation is . Then ✔, and would need , which is excluded ✔. The height occurs at , which is in the domain ✔.
Let be given by . Sketch the graph and use it to find the range.
Answer
Solution
Step 1: a table of values, including both endpoints.
Step 2: plot. The four points lie on one straight line, and the domain is the closed interval , so the graph is the segment joining to , both endpoints included.
Step 3: project onto the -axis. The lowest point of the segment is and the highest is ; the segment climbs steadily from one to the other with no breaks, so every height in between occurs. The thick mark on the -axis above shows the shadow. Hence
Check by algebra. Start from the domain condition and build up the formula:
Multiply throughout by (a positive number, so the inequalities keep their direction):
Add throughout:
that is . The graph and the algebra agree.
Let be given by . Sketch the graph and use it to find the range.
Answer
Solution
Step 1: a table, taking care to include both endpoints and the point .
Step 2: plot and join smoothly.
Step 3: project onto the -axis. Reading the picture, the highest point of the graph is and the lowest is the right-hand endpoint . The curve moves from one height to the other without any break, so every height between and is attained. Hence
A warning about endpoints. It is tempting to compute only and and to declare the range . That is wrong: the largest value occurs inside the interval, at , not at an endpoint. Always plot enough points to see the turning of the curve.
Check. Is really the largest possible output? For any we have , so and hence , with equality exactly when — which does lie in the domain . ✔ And is attained at . ✔
The graph of a function is shown.
(a) State the domain and the range.
(b) Find all with .
(c) For which is ?
Answer
(a) , (b) and (c) or
Solution
(a) Domain. Vertical lines meet the curve exactly for from to , and both ends are solid dots, so
Range. The lowest point of the curve is and the highest points are the two endpoints at height . Horizontal lines meet the curve for every height from to and for no other height, so
(b) The outputs equal to correspond to points on the -axis. The curve crosses the axis at and , so
(c) The outputs greater than correspond to points above the -axis. Reading the picture from left to right:
- from up to (but not including) , the curve is above the axis;
- from to , the curve is on or below the axis;
- from just after to , the curve is above the axis again.
So exactly when
The values and are excluded because there the output is , which is not greater than .
A summary of what is read where. The domain is read along the -axis; the range along the -axis; solutions of are the crossings of the -axis; and the sign of is decided by whether the curve is above or below that axis.
A student looks at the graph below and reports " and ". Find the error and give the correct answers.
Answer
The student read the wrong intervals off the axes. The correct answers are and .
Solution
Reading the picture correctly. The graph is the segment joining the two solid dots and .
Domain. Vertical lines meet the segment exactly when runs from to , both included. So
Range. The heights on the segment run from (at the left dot) to (at the right dot), and every height in between occurs. So
The student's error. The answer corresponds to nothing on this graph; it looks as though the student read tick marks or axis labels rather than the extent of the curve. The correct procedure is not to look at the axes on their own, but to project the graph onto them: find where the graph starts and stops horizontally, then where it starts and stops vertically.
How to avoid the error. Locate the leftmost and rightmost points of the graph and read their first coordinates — those bound the domain. Locate the lowest and highest points and read their second coordinates — those bound the range. Here the leftmost point is and the rightmost is , which settles both questions at once.
A remark. That the domain and range came out equal is a peculiarity of this segment, whose ends happen to be at the same numbers on both axes. In the previous exercises the two sets were different, which is the usual situation.
Sketch the graph of one function whose domain is and whose range is . Then sketch a second, differently shaped, graph with the same domain and range.
Solution
What is being asked. We must produce a curve that
- passes the vertical line test (so it is a graph of a function),
- has horizontal extent exactly from to , both ends included,
- has vertical extent exactly from to , both values attained.
A first answer: a rising segment. Join the point to the point by a straight segment, with both endpoints solid.
Verification. Vertical lines meet it exactly for , so the domain is . ✔ The heights climb from to with no gaps, so the range is . ✔ No vertical line meets it twice, so it is a genuine graph of a function. ✔
A second answer: an arch. Draw a curve starting at , rising to a highest point , and coming back down to .
Verification. The horizontal extent is again ✔; the lowest height is (at both ends) and the highest is (at the top), with every height in between occurring ✔; and no vertical line meets the arch twice, since the curve never doubles back to the left ✔.
What this shows. Knowing the domain and range of a function tells us the extent of its graph but almost nothing about its shape. Infinitely many different functions share the domain and the range .
Decide whether each statement is always, sometimes, or never true, and justify your answer.
(a) If every point of the graph of lies above the -axis, then every number in is positive.
(b) If the domain of is a closed interval , then the range of is also a closed interval.
Answer
(a) Always true. (b) Sometimes true.
Solution
(a) Always true. A number belongs to exactly when some point lies on the graph. Lying above the -axis means precisely having a positive second coordinate. So if every point of the graph is above the axis, every second coordinate is positive — and those second coordinates are exactly the members of the range. Hence every element of the range is positive.
For instance, the graph of lies entirely above the axis, and indeed its range contains only positive numbers.
(b) Sometimes true.
A case where it holds. The function on , sketched earlier, has range , a closed interval.
A case where it fails. Consider a function whose graph on is the segment from to with the single point removed, as in the hole exercise above. Its domain is not all of — so to keep the domain a full closed interval, take instead a graph on consisting of the segment from to together with the segment from to , where the point is drawn solid and the point hollow. A vertical line meets this picture once for every in , so the domain is exactly ; but the heights obtained are from the first piece and from the second, so the range is
which is not an interval at all.
Since the conclusion holds in some cases and fails in others, the statement is sometimes true.
What makes the difference. When the graph can be drawn over without lifting the pencil, the range does come out as a closed interval. A jump or a break in the graph is what allows the range to split apart.
The graph of is shown. Use it to state the domain and the range, and explain how each is read off the picture.
Answer
and .
Solution
The domain, read from vertical lines. Place a vertical line at any . If it meets the right branch; if it meets the left branch. In both cases there is exactly one intersection.
The single exception is : the -axis itself. The two branches climb and fall alongside it but neither ever touches it, so the vertical line meets nothing. Hence
This matches the algebra: is undefined.
The range, read from horizontal lines. Place a horizontal line at any height . If it crosses the right branch, which rises from just above the axis all the way up without bound; if it crosses the left branch, which falls without bound. So every nonzero height is attained.
The exception is : the -axis. Both branches flatten toward it as we move outward, but neither ever reaches it. Hence
This too matches the algebra: solving would require , which is impossible, so is never an output.
How the two exclusions differ. The value is missing from the domain because the formula breaks down there — division by zero. The value is missing from the range because no input, however large, ever produces it. The graph shows both facts at once: it avoids the vertical axis and it avoids the horizontal axis.
Check with numbers. , small but not zero; ; . The outputs get as close to as we like and as large as we like, but itself never appears.
Frequently Asked Questions
How do I find the domain when the graph has a hole?
A hole means the function is not defined at that -value. Exclude it from the domain. For example, a hole at means , and the domain is .
Can the range be a union of intervals?
Yes. For example, if the graph consists of two separate pieces, the range is the union of the -values covered by each piece. This is common for piecewise functions.
What if the graph extends infinitely?
Project the infinite portion onto the axis. For example, if the graph extends upward without bound, the range includes for some value . If it extends to the right without bound, the domain includes for some .
Is the range always an interval?
Not necessarily. The range can be a finite set (for a piecewise constant function), a union of intervals, or a single point. However, for continuous functions defined on an interval, the range is always an interval (by the Intermediate Value Theorem from calculus).