The graph of a function is the visual representation of every input-output pair. It turns abstract formulas into pictures that reveal domain, range, behavior, and much more at a glance. This section explains how to construct and read graphs of functions.
Quick Reference
| Concept | Description |
|---|---|
| Graph of | Set of all points in the coordinate plane |
| Table of values | Selected pairs used to sketch the graph |
| Domain (from graph) | Projection of the graph onto the -axis |
| Range (from graph) | Projection of the graph onto the -axis |
| Smooth curve | Connect plotted points with a smooth, free-hand line |
What Is a Graph?
If we represent the independent variable by and the corresponding output by , each pair determines a point in the coordinate plane. Plotting all such points produces the graph of the function.
The graph of a function is the set of all ordered pairs
The graph gives a complete picture of the function's behavior: where it is positive or negative, where it rises or falls, what happens at the boundary of the domain, and more.
The graph of a function is shown below.
.png)
From this graph we can read off the following facts:
- : the graph crosses the -axis at .
- For : is positive and increasing.
- For : is negative and decreases without bound as approaches from the right.
- The domain of is .
How to Plot a Function by Hand
To plot the graph of over an interval, follow these steps:
- Construct a table of values by choosing several values of in the interval and computing for each.
- Plot the corresponding points in the coordinate plane.
- Draw a smooth free-hand curve through the points.
Plot the graph of for .
Solution
Step 1. Build a table using a few values:
Step 2. Plot these points and connect with straight lines for a rough sketch:

Step 3. For a finer representation, increase the number of points:

This is exactly how computer programs such as MATLAB and Python's Matplotlib plot functions: they compute many pairs and connect them with line segments. With enough points, the result looks like a smooth curve.
Reading Domain and Range from a Graph
- The domain of is the projection of the graph onto the -axis: the set of all -values for which the graph has a point.
- The range of is the projection of the graph onto the -axis: the set of all -values that appear on the graph.
To test whether a specific -value is in the domain, draw a vertical line through that . If it hits the graph, that is in the domain. To test whether a specific -value is in the range, draw a horizontal line through that . If it hits the graph, that is in the range.
Exercises
Make a table of values for using , then sketch the graph. Where does the graph meet the two axes?
Answer
The table is , , , , . The graph meets the -axis at and the -axis at .
Solution
Step 1: the table. Substitute each chosen into the rule.
Step 2: plot the five points and join them.
Step 3: read off the meetings with the axes.
The graph meets the -axis where . From the table that happens at , so the point is .
The graph meets the -axis where . From the table , so the point is .
Check by algebra. Setting gives , so and — matching the picture. Setting gives — also matching.
Notice that the five plotted points lie on one straight line, which is why joining them with a ruler is legitimate here. Do not assume that this happens for every function; the next exercise shows a case where it does not.
Make a table of values for using the integer values , and sketch the graph.
(a) Where does the graph meet the -axis?
(b) Use the graph to find the values of for which .
Answer
Table: , , , , , , . (a) at and (b) and
Solution
Step 1: the table. Square first, then subtract . Remember that squaring a negative number gives a positive result.
Step 2: plot and join with a smooth curve.
Here the points clearly do not lie on a line, so they are joined by a smooth free-hand curve as the section describes.
(a) The graph meets the -axis where . From the table this happens at and at , so the points are and .
Confirmation by algebra: gives , so or .
(b) To find where , draw the horizontal line (dashed above) and see where it cuts the curve. It cuts at the two points and , so
Confirmation by algebra: gives , so or . Both answers must be given; keeping only would miss half the picture, and the graph makes that obvious.
Sketch the graph of using the values .
Answer
A "V" shape with its lowest point at , passing through and .
Solution
Step 1: the table. The absolute value of a number is its size without regard to sign, so , , and so on.
Step 2: plot and join.
Reading the picture. The plotted points fall exactly on two straight pieces that meet at , producing a sharp corner rather than a smooth turn. This is not a mistake in the plotting: for we have , so the outputs are , and for we have , so the outputs are . Each side is a straight line, and the two lines meet at the origin's neighbour .
Check. , which is halfway up the left branch between the plotted points and , as the straight edge suggests. ✔
A warning: when a graph has a corner, joining the points with a rounded curve would misrepresent the function. Compute a few extra values near the suspicious spot before deciding how to join.
Sketch the graph of for , using the values together with .
Answer
The points are , , , , , joined by a curve that rises steeply at first and then flattens.
Solution
Step 1: the table. Choosing perfect squares makes the arithmetic exact.
Step 2: plot and join with a smooth curve.
Two features worth noticing.
Nothing to the left of . The natural domain of is , so the graph simply stops at the origin. There is no part of the picture with negative — not because we ran out of paper, but because has no output there.
Only nonnegative heights. The symbol means the nonnegative square root, so every plotted point sits on or above the -axis. The point is not on this graph, even though .
Check. The value halfway along, , since . That point lies neatly on the curve drawn. ✔
Sketch the graph of using the values . What happens at ?
Answer
Two separate branches, one in the region where and , one where and . There is no point at , because is undefined.
Solution
Step 1: the table. Recall that and that the reciprocal of a negative number is negative.
Step 2: plot the points.
What happens at . The number does not exist, so is not in the natural domain and the graph has no point at all on the -axis. The picture consists of two separate branches, one on each side of the -axis.
Why the two branches must not be joined. A curve drawn from the left branch to the right branch would have to cross the -axis, and any point it placed there would be a point of the graph with — which cannot exist. Joining the pieces would therefore draw something that is not the graph of .
Check. As the inputs get closer to from the right (, then , then ) the outputs , , grow without bound, matching the steep rise of the right branch. As the inputs grow () the outputs shrink toward without ever reaching it, matching the flattening tail.
The graph of a function is shown.
(a) Find , and .
(b) Find all for which .
(c) Find all for which .
Answer
(a) , , (b) and (c) and
Solution
How to read a value from a graph. To find , start at on the horizontal axis, move straight up or down until you meet the curve, and read the height of that meeting point on the vertical axis. The definition of the graph guarantees this works, since the graph consists precisely of the points .
(a)
- At : moving down from we meet the curve at its lowest point, whose height is . So .
- At : moving up from we meet the curve exactly on the horizontal axis, at height . So .
- At : moving up from we meet the curve at height . So .
(b) Now the question runs the other way: we are given the output and must find the inputs. Outputs of are heights of , that is, points on the horizontal axis. The curve meets that axis at and , so
(c) Draw (or imagine) the horizontal line at height and see where it meets the curve. It meets it at and , so
A point worth stressing. In part (a) each question had exactly one answer, whereas in parts (b) and (c) there were two. Going up from a point of the horizontal axis can meet the curve only once, since assigns exactly one output to each input. Going across from a point of the vertical axis may meet the curve many times, because different inputs are allowed to share an output.
Which of the points , , and lie on the graph of ?
Answer
, and lie on the graph; does not.
Solution
A point lies on the graph of exactly when — that is, when the second coordinate is the output produced by the first. So compute at each first coordinate and compare.
:
The required second coordinate is , and . The point is on the graph.
:
The required second coordinate is , and . The point is on the graph.
:
But the point offers the second coordinate , and . So is not on the graph. (The point is.)
:
Since , the point is on the graph. Watch the two sign changes here: and .
Summary. Three of the four points lie on the graph. Note that testing a point requires only one substitution — there is no need to sketch anything.
The point lies on the graph of .
(a) Find .
(b) Find the point of the graph whose first coordinate is .
(c) Find the point or points of the graph lying on the -axis.
Answer
(a) (b) (c) and
Solution
(a) Saying that is on the graph means . Substitute into the rule:
Since , this is
Add to both sides:
Divide by :
So the function is .
Check. . ✔
(b) A point of the graph with first coordinate has second coordinate :
The point is . Note , not .
(c) A point lies on the -axis exactly when its second coordinate is , so solve :
Add to both sides:
Divide by :
Take square roots, remembering both signs:
Rationalising, . So the graph meets the -axis at and .
Check. . ✔
The graph of a function is shown. State the domain and the range of .
Answer
and .
Solution
The domain: project onto the -axis. The domain is the set of -values for which the graph has a point above or below them. The drawn curve starts at the point and ends at the point , with no gaps in between. Sliding a vertical line across the picture, it meets the curve for every from to and for no other . Hence
Both endpoints are included because the curve genuinely reaches the solid dots at and .
The range: project onto the -axis. The range is the set of heights that occur on the curve. The lowest point of the curve is , at height ; the highest is , at height . The curve climbs from one to the other without breaks, so every height between and occurs somewhere. Hence
Testing individual values, as the section suggests.
- Is in the domain? Draw the vertical line : it hits the curve (at about height ). Yes.
- Is in the domain? The vertical line misses the curve entirely. No.
- Is in the range? Draw the horizontal line : it hits the curve at . Yes.
- Is in the range? The horizontal line passes above everything drawn. No.
A caution. The domain is read across the picture and the range up it. Interchanging the two is the most common error, so it is worth naming the axis explicitly each time: domain — -axis; range — -axis.
Match each formula with one of the three graphs.
Formulas: (i) (ii) (iii)
Answer
(i) is Graph A; (ii) is Graph C; (iii) is Graph B.
Solution
The safest way to match is to compute two or three points from each formula and see which picture contains them.
(iii) . A short table: gives ; gives ; gives . So the graph must have points below the -axis on the left. Only Graph B dips below the axis, so (iii) is Graph B.
(i) and (ii) . Both are never negative, matching Graphs A and C, which both sit on or above the axis and both touch the origin. To separate them, use a value between and , where squaring and absolute value behave very differently.
Take :
So the graph of must pass below the point , sagging toward the axis near the origin, while the graph of must pass exactly through it.
Graph A sags near the origin and leaves it smoothly; Graph C rises in two straight edges meeting in a sharp corner. Straight edges are what produces, because for it equals and for it equals , and each of those is a line.
Hence (i) is Graph A and (ii) is Graph C.
Check with a second value. At : but . So beyond the squaring graph climbs much faster than the absolute-value graph, which agrees with the shapes drawn.
A student plots using only the points with , and , joins them with a smooth curve, and then extends the curve to the left "back to the origin", concluding that the graph passes through .
Find the error and explain what the graph really does near .
Solution
The error. The point can be on the graph only if . But
which is not a real number: division by zero is undefined. So is not even in the natural domain of , and the graph has no point whatsoever on the -axis. The student has drawn a curve through a place where the function does not exist.
Where the reasoning went wrong. Joining plotted points with a smooth curve is a guess about what happens between them, and it is only a reasonable guess where the function is defined and has no break. The student extended the curve into a region that was never sampled and where the function is undefined.
What really happens near . Compute outputs for inputs shrinking toward from the right:
Far from settling down toward , the outputs grow without bound. The right-hand branch of the graph shoots upward and never crosses the -axis.
On the left of the outputs are negative and behave in the mirror manner:
So the graph has two separate branches, and there is a gap at that must not be bridged.
The general lesson. Before joining plotted points, check the natural domain. Wherever a value is excluded from the domain, the graph must be interrupted there.
Explain why the graph of a function may cross the -axis at many points, but can cross the -axis at most once.
Solution
What the two axes mean for a graph. By definition, the graph of is the set of points for in the domain. So:
- a point of the graph lies on the -axis when its second coordinate is , that is, when ;
- a point of the graph lies on the -axis when its first coordinate is , that is, when the input is .
Why many crossings of the -axis are possible. Nothing in the definition of a function forbids two different inputs from producing the same output, so many inputs may produce the output . For example, has and , giving two crossings; and a function can be arranged to give the output at as many inputs as we please. Indeed the constant function produces a graph lying entirely along the -axis.
Why at most one crossing of the -axis. A point of the graph on the -axis must come from the input . If there were two such points, say and with , then the single input would have two different outputs and . That contradicts the defining property of a function, which allows each input exactly one output. So there cannot be two.
Why "at most" and not "exactly". There may be no crossing at all, namely when is not in the domain. The graph of is an example: it never touches the -axis, because does not exist. Similarly , whose domain is , has no point above or below .
Summary. Horizontal position is the input, and inputs may not be reused with different outputs; vertical position is the output, and outputs may be repeated freely. The asymmetry of the two axes in this question is exactly the asymmetry built into the definition of a function.
Sketch the graph of when the domain is declared to be the finite set . How does this graph differ from the graph of with its natural domain?
Answer
It consists of the five isolated points , , , , — not a line.
Solution
Step 1: compute the outputs.
Step 2: the graph is the set of pairs for in the domain, and the domain has only five members. So the graph consists of exactly five points:
Step 3: the comparison. With its natural domain, the formula accepts every real number, so the graph contains a point for every — for instance and — and those points fill out an unbroken straight line.
With the declared domain there is no point above , because is not an allowable input. The graph is five separated dots, and joining them would add points that do not belong to the function.
The moral. A graph is determined by the rule and the domain. Two functions given by the same formula but different domains have different graphs. This is why a domain restriction must always be stated, as the section on natural domains insisted.
Check. Every dot satisfies : for the dot , . ✔ And the five first coordinates are exactly the five members of the declared domain. ✔
Frequently Asked Questions
Why do we connect plotted points with a smooth curve?
Most functions encountered in calculus are continuous: they have no jumps or breaks. Between the points we plotted, the function exists and takes intermediate values. The smooth curve is our best guess at those intermediate values. If the function has discontinuities (jumps or holes), we do not connect those parts smoothly.
How many points do I need to get an accurate graph?
More points give a more accurate graph. For a simple function like , five or six points often suffice. For a more complex function with multiple turning points, you may need 10 to 20 or more. Computer software uses hundreds or thousands of points.
Can a graph represent two different functions?
No. A valid function graph passes the vertical line test: any vertical line intersects the graph at most once. If a curve fails this test, it does not represent a function.
Is the graph of the same as a parabola?
Yes. The graph of is the standard upward-opening parabola with vertex at the origin. More generally, (with ) is a parabola.