★ GUIDES · MATH · HOW TO GRAPH

How to Graph a Function: Step-by-Step Guide for Beginners

To graph a function, pick x-values, work out y for each one, and plot the (x, y) points: for y = x² the points (0, 0), (1, 1) and (2, 4) are on the curve. This guide works the method step by step — what a function graph is, how to pick x-values, how to plot and join the points, how to read intercepts and slope, and how to check your work — and the graphing-calculator page does the same calculation for your own numbers, with the graph drawn and the values tabulated. The scientific-calculator page is the SCIENTIFIC tool — trig, logs and powers for single values — not a graph; the fraction-calculator page is the FRACTION tool — adding and multiplying fractions — not functions; and the square-root-calculator page is the SQUARE ROOT tool — roots of single numbers — not curves.

How to graph a function, step by step

To graph a function, pick x-values, work out y for each one, and plot the (x, y) points. That is the whole method, and everything below is just that sentence done carefully. A function is a rule that turns each input into one output: for y = x² the rule is "square the input", so an input of 2 gives an output of 4, and the point (2, 4) sits on the graph. The x-coordinate of a point is the input, the y-coordinate is the output, and the graph is the picture of every input-output pair the rule can make.

The worked example: y = x²

The worked example. Step 1 — pick x-values: -2, -1, 0, 1, 2 — five values, spread across zero so you see both sides of the curve. Step 2 — work out y for each one: (-2)² is 4, (-1)² is 1, 0² is 0, 1² is 1, 2² is 4. Step 3 — write the pairs: (-2, 4), (-1, 1), (0, 0), (1, 1), (2, 4). Step 4 — plot them on the grid, one dot each. Step 5 — join them with a smooth curve: a U-shape, the parabola, with its lowest point at (0, 0). The two sides mirror each other, because squaring -2 and squaring 2 give the same answer — and that symmetry is the check that the points are right.

Picking x-values that actually help

Five values are enough for most graphs, but they have to be the right five. Always include zero: it gives the y-intercept, the point where the graph crosses the y-axis, and for y = x² that point is (0, 0). Always include a negative and a positive value: without both, you cannot see whether the graph is symmetric, and a parabola drawn from positive x-values alone looks like half a curve. And spread them out: -2, -1, 0, 1, 2 shows the shape of y = x² far better than 0, 1, 2, 3, 4, which only shows the rising arm. If the function has a feature — a peak, a gap, a flattening — put an x-value on each side of it.

Reading intercepts and slope

Once the points are plotted, the graph starts answering questions. The y-intercept is where the graph crosses the y-axis — the point with x = 0. For y = x² it is (0, 0); for y = 2x + 1 it is (0, 1), because 2 × 0 + 1 is 1. The x-intercepts are where the graph crosses the x-axis — the points with y = 0. And the slope is how steep the graph is: for a straight line like y = 2x + 1 the slope is 2, the number in front of x, so the line rises 2 units for every 1 unit it runs. For a curve the steepness changes along the graph — the parabola is flat at (0, 0) and steeper at (2, 4) than at (1, 1) — which is why you plot several points instead of two.

A second example: y = 2x + 1

Straight lines need only two points, but three prove you did not slip. Take x = 0, 1, 2. Step 1 — work out y: 2 × 0 + 1 is 1, 2 × 1 + 1 is 3, 2 × 2 + 1 is 5. Step 2 — write the pairs: (0, 1), (1, 3), (2, 5). Step 3 — plot them: they sit on a straight line, rising 2 for every 1 across — the slope is 2 and the y-intercept is 1. Step 4 — draw the line through them with a ruler. If the three points do not sit on one straight line, one of the calculations is wrong: go back and redo the arithmetic before you draw anything.

Checking your graph

Whatever method you used, check it with a point you did not plot. For y = x², pick x = 5 — a value outside your table — and work it out: 5² is 25, so the point (5, 25) should sit on the curve where your smooth line passes. If the curve you drew misses (5, 25), the curve is wrong, not the point. For y = 2x + 1, pick x = 3 the same way: 2 × 3 + 1 is 7, so (3, 7) should sit on the line. A second check is the shape itself: a parabola is symmetric, a straight line is straight, and a function that is undefined somewhere — 1/x at x = 0, or a square root at a negative x — has a gap, not a point. Run your numbers through the graphing-calculator and compare them with the worked examples above.

Common mistakes

The first is plotting only positive x-values: half the graph goes missing, and a parabola looks like a rising curve instead of a U. The second is joining the points with straight segments instead of a smooth curve — the points (-2, 4), (-1, 1), (0, 0), (1, 1), (2, 4) joined by straight lines make a pointed V, not a parabola. The third is reading the slope off a curve as if it were a line: the slope of y = x² at (1, 1) is not the same as at (2, 4), because the curve gets steeper. And the fourth is forgetting the domain: some functions have no value at some x — 1/x has none at x = 0, and a square root has none for negative x — so the graph has a gap there, and drawing a point across the gap is wrong.

A quick check you can do in your head

You can sanity-check any graph without a calculator. First, test the easy inputs: x = 0 gives the y-intercept, and for y = x² that is (0, 0). Second, test a negative and a positive input and ask whether the outputs should match: for y = x² they do, because squaring forgets the sign, so the graph must be symmetric. Third, test one more input outside your table — x = 5 gives (5, 25) for y = x² and x = 3 gives (3, 7) for y = 2x + 1 — and if the point does not sit on the curve you drew, redraw the curve. If a calculator says the graph of y = x² passes anywhere but through (2, 4), the numbers are wrong.

Frequently asked questions

How do you graph a function step by step?

Pick x-values, work out y for each one, and plot the (x, y) points — for y = x² the points (0, 0), (1, 1) and (2, 4) are on the curve. Join them with the smooth shape the function implies; the worked example above runs it in full.

How many points do you need to graph a function?

Five well-chosen points are enough for most graphs — -2, -1, 0, 1, 2 for y = x². Always include zero for the y-intercept and a negative and a positive value so you can see both sides; a straight line needs only two, but three prove you did not slip.

How do you find the y-intercept of a graph?

Put x = 0 into the function — for y = 2x + 1 the y-intercept is (0, 1), because 2 × 0 + 1 is 1. It is the point where the graph crosses the y-axis.

How do you read the slope from a graph?

For a straight line, the slope is the rise over the run — for y = 2x + 1 it is 2, so the line rises 2 units for every 1 it runs. For a curve the steepness changes along the graph, so read it at the point you care about.

How do you check a graph you drew?

Test a point you did not plot — for y = x², x = 5 gives (5, 25), and for y = 2x + 1, x = 3 gives (3, 7). If the point does not sit on the curve you drew, redraw the curve.

Why does my parabola look like a V?

Because the points were joined with straight segments instead of a smooth curve. The points (-2, 4), (-1, 1), (0, 0), (1, 1), (2, 4) joined straight make a pointed V; the parabola curves smoothly through them.