This site is a work in progress. New lessons are added regularly. Contact us

Graphs of Functions

Learning goals

  • Read the graph as every pair (x,f(x))(x, f(x))
  • Build a graph from a table of inputs and outputs
  • Find f(a)f(a) by going up to the curve and across
  • Locate the intercepts, where the graph crosses each axis
  • Take the domain as horizontal spread and the range as vertical
  • Say where a function increases, decreases, and turns

The graph of a function is a picture of every input and output

The graph of a function ff is the set of all points (x,f(x))(x, f(x)) as xx runs over the domain of ff. Read that pairing carefully: the first coordinate of each point is an input, and the second coordinate is the output the function assigns to it. Setting y=f(x)y = f(x) says the same thing in the language of the last chapters, because then each allowed input xx gives exactly one point (x,y)(x, y) with y=f(x)y = f(x). So graphing a function is nothing new. It is graphing the equation y=f(x)y = f(x), and every technique you built for lines and parabolas carries straight over. What is new is everything the finished picture now lets you read.

The single most useful fact is this. The second coordinate of every point on the graph is an output. So the height of the graph above an input aa, measured against the vertical axis, is exactly f(a)f(a). The function pairs aa with one output, so there is exactly one point of the graph directly above (or below) each input in the domain. That single point is why “the height at x=ax = a” names one definite number. That is the vertical line test from the What Is a Function? lesson, seen from the reading side. Each vertical line meets the graph at most once, and where it does, the height it reaches is the output.

A point lies on the graph exactly when y=f(x)y = f(x)#

Start from the definition: the graph of ff is the collection of points (x,f(x))(x, f(x)), one for each input xx in the domain. Take any point (a,b)(a, b) and ask whether it belongs to that collection.

Suppose first that (a,b)(a, b) is on the graph. Then it is one of the listed points, so its first coordinate aa is an input. The point’s second coordinate must then be the output paired with aa, namely f(a)f(a). Therefore b=f(a)b = f(a).

Now suppose instead that b=f(a)b = f(a). Then the point (a,b)(a, b) is literally (a,f(a))(a, f(a)), which is the graph’s point at the input aa, so (a,b)(a, b) is on the graph. The two directions together give the equivalence

(a,b) is on the graphb=f(a).(a, b) \text{ is on the graph} \quad \Longleftrightarrow \quad b = f(a).

This one equivalence is the engine of every reading in this lesson. Set bb to the height of the graph above aa, and it says that height is f(a)f(a). Fix a height bb instead, and it says the inputs whose output is bb are exactly the xx where the horizontal line y=by = b crosses the graph.

A point (a, f(a)) on the graph of a functionA rising curve with one marked point whose horizontal position is the input a and whose height is the output f(a), shown by dashed guide lines to the two axes.xy(a, f(a))af(a)
Every point on the graph of f has the form (a, f(a)): its horizontal position is the input a, and its height above the axis is the output f(a). Drop straight down to the horizontal axis to read the input, and straight across to the vertical axis to read the output.

Building a graph from a table

To draw a function’s graph, use the routine you already trust for lines and parabolas. Choose several inputs, evaluate ff at each to get the matching output, then plot the points (x,f(x))(x, f(x)). Join them with a ruler for a linear rule, or with a smooth curve for a bending one. A small spread of inputs, including a negative, zero, and a few positives, keeps the shape honest and reveals any turning.

Worked example 1 Graph f(x)=x22x3f(x) = x^2 - 2x - 3 from a table

The rule squares the input, subtracts twice the input, then subtracts 33. Because the highest power of xx is a square, you already know the graph will be a parabola. Pick a spread of inputs and evaluate, keeping the parentheses so the signs are safe.

f(1)=(1)22(1)3=1+23=0.f(-1) = (-1)^2 - 2(-1) - 3 = 1 + 2 - 3 = 0.f(0)=003=3,f(1)=123=4,f(2)=443=3.\begin{aligned} f(0) &= 0 - 0 - 3 = -3, \\ f(1) &= 1 - 2 - 3 = -4, \\ f(2) &= 4 - 4 - 3 = -3. \end{aligned}f(3)=963=0.f(3) = 9 - 6 - 3 = 0.

Collect the input-output pairs in a table so each point is easy to plot:

xx1-100112233
f(x)f(x)003-34-43-300

Plot the five points (1,0)(-1, 0), (0,3)(0, -3), (1,4)(1, -4), (2,3)(2, -3), and (3,0)(3, 0). They do not lie on a line; they bend into a smooth U. Joining them gives the parabola that is the graph of ff, dipping to its lowest point at (1,4)(1, -4) and rising on both sides.

The graph of f(x) = x^2 - 2x - 3A parabola through the five plotted table points, with lowest point at (1, -4) and x-intercepts at -1 and 3.xy-2-11231-1-3-4(-1, 0)(3, 0)(0, -3)(1, -4)y = f(x)
The graph of f(x) = x squared minus 2x minus 3, built from the five table points. It is a parabola with its lowest point at (1, -4). Every point on the curve has the form (x, f(x)), and the two x-intercepts and the y-intercept are marked.

Reading a value off the graph

Two questions come up again and again, and the graph answers both by tracing a straight path to an axis.

Finding f(a)f(a) from the picture. Locate the input aa on the horizontal axis, move straight up or down until you meet the curve, then read the height there against the vertical axis. That height is f(a)f(a), because the point you land on is (a,f(a))(a, f(a)).

Solving f(x)=bf(x) = b from the picture. This asks the reverse question: which inputs produce the output bb. Locate the value bb on the vertical axis, move straight across to the curve, and read the input below each meeting point. Every such input xx satisfies f(x)=bf(x) = b. A horizontal line can cross a curve more than once, so an equation f(x)=bf(x) = b can have several solutions, one solution, or none. The picture shows exactly which case you are in.

Solving f(x) = -3 by reading across the graphA dashed horizontal line at y = -3 crosses the parabola at the points above x = 0 and x = 2, the two solutions of f(x) = -3.xy2-3y = -3x = 0x = 2
Reading the graph of f(x) = x squared minus 2x minus 3 at the height y = -3. The horizontal line y = -3 meets the curve at two points, above x = 0 and x = 2, so f(x) = -3 has the two solutions x = 0 and x = 2. Read the other way, going up from x = 2 to the curve gives the height f(2) = -3.

Worked example 2 Reading f(2)f(2) and solving f(x)=3f(x) = -3 from the graph

Use the graph of f(x)=x22x3f(x) = x^2 - 2x - 3 above, without any algebra.

To find f(2)f(2), start at x=2x = 2 on the horizontal axis and move straight down to the curve. You land on the point (2,3)(2, -3), whose height is 3-3, so

f(2)=3.f(2) = -3.

To solve f(x)=3f(x) = -3, do the reverse. Find 3-3 on the vertical axis and slide across the horizontal line y=3y = -3. It meets the parabola at two points, the ones sitting above x=0x = 0 and above x=2x = 2. Reading the input beneath each gives the two solutions

f(x)=3x=0  or  x=2.f(x) = -3 \quad \Longrightarrow \quad x = 0 \ \text{ or } \ x = 2.

The same value 3-3 is an output of the function at two different inputs, which is why the horizontal line crosses twice. A quick check confirms both: f(0)=3f(0) = -3 and f(2)=443=3f(2) = 4 - 4 - 3 = -3.

Check your understanding

The graph of a function gg passes through the points (2,5)(-2, 5), (1,0)(-1, 0), (0,3)(0, -3), (1,4)(1, -4), and (2,3)(2, -3). What is g(2)g(-2)?

Answer choices

Intercepts and where the graph crosses the axes

Two special readings come up so often that they have their own names.

The y-intercept is the point where the graph crosses the vertical axis. Every point on that axis has x=0x = 0, so the y-intercept is the single point (0,f(0))(0, f(0)), and you find it by evaluating f(0)f(0). A function has at most one y-intercept, because 00 is one input with one output.

The x-intercepts are the points where the graph crosses the horizontal axis. Every point on that axis has y=0y = 0, so an x-intercept is a point (a,0)(a, 0) with f(a)=0f(a) = 0. Finding the x-intercepts therefore means solving the equation f(x)=0f(x) = 0, which is the b=0b = 0 case of the reading above. These inputs are also called the zeros or roots of the function, and there may be several, one, or none.

Worked example 3 Find the intercepts of f(x)=x22x3f(x) = x^2 - 2x - 3

For the y-intercept, evaluate the rule at x=0x = 0:

f(0)=003=3,f(0) = 0 - 0 - 3 = -3,

so the y-intercept is the point (0,3)(0, -3).

For the x-intercepts, set the output to 00 and solve f(x)=0f(x) = 0. The rule factors, which is the fastest route to its zeros:

x22x3=0(x3)(x+1)=0.x^2 - 2x - 3 = 0 \quad \Longrightarrow \quad (x - 3)(x + 1) = 0.

A product is zero exactly when one of its factors is zero, so x=3x = 3 or x=1x = -1. The x-intercepts are (3,0)(3, 0) and (1,0)(-1, 0). All three points match the graph: it crosses the vertical axis once, at 3-3, and the horizontal axis twice, at 1-1 and 33.

Domain and range from a graph

The domain is the set of allowed inputs and the range is the set of outputs the function actually produces, and a graph puts both on display. Sweep your eye left to right across the graph: the xx-values it covers are the domain. Sweep bottom to top: the yy-values it covers are the range. A graph that runs on forever to the left and right, like a full parabola, has domain “all numbers.” By contrast, a graph drawn only between two endpoints has a domain that stops at those endpoints.

Domain and range of a curve with endpointsA bounded parabola arc from (-1, 0) to (3, 0) with lowest point (1, -4); its domain runs from -1 to 3 and its range from -4 to 0.xy-13-4(-1, 0)(3, 0)(1, -4)
Reading domain and range from a graph. This curve is the same rule but defined only for inputs from -1 to 3, so its domain is -1 is less than or equal to x is less than or equal to 3. The heights it reaches run from the low point -4 up to 0, so its range is -4 is less than or equal to y is less than or equal to 0.

Worked example 4 Read the domain and range from the graph

The curve above is drawn only between its two endpoints, (1,0)(-1, 0) on the left and (3,0)(3, 0) on the right, so those endpoints fence in the inputs.

Sweeping left to right, the graph occupies every horizontal position from x=1x = -1 to x=3x = 3, and nothing outside. That horizontal spread is the domain:

domain ⁣:1x3.\text{domain} \colon \quad -1 \le x \le 3.

Sweeping bottom to top, the lowest the curve reaches is the valley at height 4-4, and the highest is 00, shared by the two endpoints. That vertical spread is the range:

range ⁣:4y0.\text{range} \colon \quad -4 \le y \le 0.

Notice the domain is read along the horizontal axis and the range along the vertical axis. If instead the parabola were drawn with arrows running off both sides, the inputs would never stop and the domain would be all numbers. With those arrows, the range would be y4y \ge -4, every height from the low point upward.

Check your understanding

A graph is drawn only between the endpoints (3,1)(-3, 1) and (4,1)(4, 1), and over that stretch its lowest height is 2-2 and its highest height is 55. What is the range?

Answer choices

Increasing and decreasing

The last thing a picture shows at a glance is the function’s direction. Read the graph the way you read a sentence, left to right, in the direction of increasing xx. Where the curve rises as you move right, the outputs are getting larger, and the function is increasing there. Where the curve falls as you move right, the outputs are getting smaller, and the function is decreasing.

Made precise, a function is increasing on an interval if larger inputs give larger outputs across it (if a<ba < b then f(a)<f(b)f(a) < f(b)). A function is decreasing on an interval if larger inputs give smaller outputs across it (if a<ba < b then f(a)>f(b)f(a) > f(b)). A point where the graph stops falling and starts rising, or the reverse, is a turning point. At the bottom of a valley the output is smaller than at any nearby input, a minimum. At the top of a hill the output is larger than at any nearby input, a maximum.

Where f(x) = x^2 - 2x - 3 is increasing and decreasingThe parabola falls to its minimum at (1, -4), where it turns, and rises afterward; the left branch is labeled decreasing and the right branch increasing.xy1decreasingincreasingminimum (1, -4)
The graph of f(x) = x squared minus 2x minus 3 falls as x moves from the left up to the turning point at (1, -4), then rises after it. So f is decreasing for x less than 1 and increasing for x greater than 1, and the turning point (1, -4) is its minimum.

Worked example 5 Where is f(x)=x22x3f(x) = x^2 - 2x - 3 increasing?

Trace the graph from left to right. Starting far to the left, the curve comes down steadily, so the outputs are shrinking and ff is decreasing. It keeps falling until it reaches the lowest point at (1,4)(1, -4), then it turns and climbs. From that turning point onward the outputs grow, so ff is increasing.

Reading the two stretches off the horizontal axis, the turning happens at x=1x = 1, so

f is decreasing for x<1and increasing for x>1.f \text{ is decreasing for } x < 1 \quad \text{and increasing for } x > 1.

The turning point (1,4)(1, -4) is the minimum, the single lowest output the function ever produces. This is the same value you would get by hunting for the vertex algebraically, but here you simply saw it on the picture.

Check your understanding

The graph of a function falls as xx goes from 4-4 up to 22, then rises as xx goes from 22 onward. On which interval is the function increasing?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Free Response Questions (FRQ)

Longer questions in parts, to be worked out on paper. Progressive hints, the answer on its own so you can check yourself and try again, then the full worked solution, plus a rubric to mark your own work against.

Free response Work it out on paper 5 questions Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (Optional)

A steam engine of the 1790s was a loud iron box, and nobody could see inside it. Engineers badly wanted to know what happened during a single stroke of the piston. Every measurement they had was a single number, taken afterward. One number cannot describe a whole stroke.

James Watt, a Scottish engineer, got around this in about 1796. He made the engine draw its own picture. A pencil was attached to a small piston that rose and fell with the pressure of the steam. The paper under the pencil slid back and forth with the engine’s main piston. One stroke of the machine traced one closed loop.

That loop was called an indicator diagram. Watt’s company guarded it as a trade secret for roughly twenty-five years. A trained eye could study the shape and say where the steam had entered too late. It showed which valve was leaking, and how much work the stroke had delivered. The engine itself was still a sealed box. Its whole performance now lay on a sheet of paper, moment by moment, in a form that could be read instead of calculated.

That is exactly what you did here. You went up to the curve above an input and called the height f(a)f(a). You found where the curve crossed each axis. You measured its spread sideways and upward, and marked the stretches where it climbed and fell. A graph does Watt’s job for a rule instead of an engine. It holds every input beside the output it produces, so a function can be read at a glance.