How to Graph a Function: A Step-by-Step Method
To graph a function y = f(x): identify its type and domain, find the intercepts, find special features such as a vertex or asymptotes, make a table of x-values around those features, plot the points on a coordinate plane and join them with a smooth curve that respects any breaks in the domain. Check the result with a graphing calculator.
Check it yourself: every example here can be loaded into the Graphing Calculator.
Open the Graphing CalculatorThe six-step method
- Recognise the type. Line, parabola, cubic, square root, exponential, rational…? The type tells you the overall shape to expect.
- Find the domain. Which x-values are allowed? Watch for square roots of negatives, division by zero and logs of non-positive numbers. See domain and range.
- Find the intercepts. y-intercept: f(0). x-intercepts: solve f(x) = 0.
- Find special features. Vertex, turning points, asymptotes, endpoints.
- Make a table of x-values chosen around those features. See table of values.
- Plot and connect with a smooth curve, leaving gaps where the function is undefined.
Worked example 1: f(x) = x³ − 3x
- Type: cubic — expect an S-like shape.
- Domain: all real numbers.
- Intercepts: f(0) = 0. Solve x³ − 3x = 0: x(x² − 3) = 0, so x = 0 and x = ±√3 ≈ ±1.73.
- Features: a cubic with positive leading coefficient rises to the right. It has a local maximum and minimum (at x = ±1).
- Table:
| x | −2 | −1 | 0 | 1 | 2 |
|---|---|---|---|---|---|
| f(x) | −2 | 2 | 0 | −2 | 2 |
- Plot and connect. The points climb to (−1, 2), fall through the origin to (1, −2), then rise again.
- Check f(x) = x³ − 3x — opens the Graphing Calculator
Worked example 2: a square-root function
Text description of this figure
Graph of f(x) = √(x + 4) − 1 starting at (−4, −1), passing through (−3, 0), (0, 1) and (5, 2), with the domain x ≥ −4 marked by a dashed line.
- Domain: x + 4 ≥ 0, so x ≥ −4.
- Intercepts: f(0) = 1; f(x) = 0 at x = −3.
- Choose x-values that make the root exact: −4, 0, 5.
- Plot and join; the curve starts at (−4, −1) and rises slowly.
For f(x) = √(x + 4) − 1:
- Domain: x + 4 ≥ 0, so x ≥ −4. The graph starts at x = −4.
- Starting point: f(−4) = 0 − 1 = −1, so (−4, −1).
- Intercepts: f(0) = 2 − 1 = 1. For the x-intercept, √(x + 4) = 1, so x = −3.
- Nice points: choose x so that x + 4 is a perfect square: x = 0 → 1, x = 5 → 2, x = 12 → 3.
The graph rises from (−4, −1) and bends to the right, getting flatter. It is the parent graph √x moved 4 left and 1 down — see function transformations.
- Check f(x) = √(x + 4) − 1 — opens the Graphing Calculator
Choosing good x-values
- Centre the table on the interesting part, not automatically on 0.
- Use values that make the arithmetic easy — perfect squares for roots, powers of the base for logs.
- Add extra points near asymptotes so you can see the curve shoot up or down.
- Use symmetry when you can: for even functions f(−x) = f(x), so each point gives you its mirror.
Checking with a graphing calculator
Type the function into the graphing calculator. Compare:
- Do the intercepts match your calculations?
- Is the shape the same?
- Are breaks in the same places?
If they disagree, check the input first (how to enter equations) and then your algebra.
Common mistakes
- Joining points with straight segments for a curved function.
- Drawing across a gap at an asymptote or excluded value.
- Plotting outside the domain, for example negative x for √x.
- Too few points near a turning point, giving the wrong peak.
Questions
How many points should I plot?
Enough to show every change of direction. Five to seven well-chosen points usually work, more near turning points or asymptotes.
Should I connect the points with straight lines?
Only for linear functions. Other functions curve between the points, so draw a smooth curve that follows the pattern.
What if the function has a break?
Do not draw across it. Check the domain for excluded values and draw each piece separately; see asymptotes and domain restrictions.
Graph your own example with the Graphing Calculator — free, in your browser.
Try it nowSources and further reading
- OpenStax, College Algebra 2e — 3.1 Functions and Function Notation
- OpenStax, College Algebra 2e — 3.5 Transformation of Functions
Worked examples and figures were produced and checked with the Graphing Calculator Lab engine. See the editorial policy.