Allday Education

Graphing Functions

A graph is just a picture of a function's input-output pairs. Every input xx produces an output f(x)f(x), and together they make a point (x,f(x))(x, f(x)) on the coordinate plane. Plot enough of those points and the shape of the function appears.

The method is the same no matter what the function looks like: build a table of values, plot each row as a point, then connect the points. Lines need only two or three points; curves need a few more so you can see the bend.

The three-step method

Step 1: make a table. Pick a handful of xx-values — small numbers around zero like 2,1,0,1,2-2, -1, 0, 1, 2 work well — and compute the output for each one by substituting into the rule.

Step 2: plot the points. Each row of the table is a point (x,f(x))(x, f(x)): the input is the horizontal coordinate and the output is the vertical coordinate.

Step 3: connect the points. If the function is defined for every xx in between, draw a smooth line or curve through the points and add arrows on the ends to show it keeps going.

-5-4-3-2-112345-4-3-2-1123456xy

The shape tells you the family

A rule like f(x)=2x+1f(x) = 2x + 1, where xx is only multiplied and shifted, always graphs as a straight line. A rule with x2x^{2} in it, like f(x)=x2f(x) = x^{2}, graphs as a U-shaped curve called a parabola. If your plotted points refuse to line up straight, that is not a mistake — the function is telling you it curves.

This is why curves need more points than lines. Two points pin down a line completely, but a parabola needs points on both sides of its turning point before the U-shape shows up.

Worked examples

Example 1: graph a line

Graph f(x)=2x+1f(x) = 2x + 1.

Pick inputs and compute outputsf(1)=1,f(0)=1,f(1)=3f(-1) = -1,\quad f(0) = 1,\quad f(1) = 3
Write the rows as points(1,1), (0,1), (1,3)(-1, -1),\ (0, 1),\ (1, 3)
Plot the three points — they line up straight
Draw the line through them with arrows on both ends

Answer: A straight line through (0,1)(0, 1) rising 22 for every 11 step right

Example 2: check whether a point is on the graph

Is (3,7)(3, 7) on the graph of f(x)=3x2f(x) = 3x - 2?

Substitute the xx-coordinatef(3)=3(3)2f(3) = 3(3) - 2
Simplifyf(3)=7f(3) = 7
The output matches the yy-coordinate, so the point is on the graph

Answer: Yes — f(3)=7f(3) = 7, so (3,7)(3, 7) is on the graph

Example 3: graph a curve

Graph f(x)=x2f(x) = x^{2}.

Pick inputs on both sides of zerof(2)=4,f(1)=1,f(0)=0,f(1)=1,f(2)=4f(-2) = 4,\quad f(-1) = 1,\quad f(0) = 0,\quad f(1) = 1,\quad f(2) = 4
Write the points(2,4), (1,1), (0,0), (1,1), (2,4)(-2, 4),\ (-1, 1),\ (0, 0),\ (1, 1),\ (2, 4)
Plot them — they do not line up straight
Connect with a smooth U-shaped curve (a parabola)

Answer: A parabola with its lowest point at (0,0)(0, 0)

Try one yourself

Common questions

How many points do I need to plot?

For a line, two points are enough and a third is a good check. For a curve like f(x)=x2f(x) = x^{2}, plot at least five points, including inputs on both sides of zero, so the shape of the bend is visible.

Which x-values should I pick for the table?

Small numbers centered on zero, like 2,1,0,1,2-2, -1, 0, 1, 2. They are quick to compute and they usually fit on the grid. If the outputs get too big for your graph, swap in smaller inputs.

Do I always connect the points?

Connect them when the function accepts every input in between, which is the usual case for rules like f(x)=2x+1f(x) = 2x + 1. If the function only makes sense for separate inputs — like the number of tickets bought — leave the points unconnected.

Want the video version?

Allday Everyday Math has video lessons, practice, and an AI tutor for every topic, Pre-Algebra through Algebra 2.

Try it for $1