Graphs of functions and transformations

Mathematics · Senior school maths · about 10 min

A graph is a picture of a function: every point (x,y)(x, y) on it satisfies y=f(x)y = f(x). Being able to sketch one quickly, and to see how changing the equation moves the curve, makes algebra, calculus and physics problems far easier to picture.

The key idea

Starting from y=f(x)y = f(x), each change to the equation moves the graph in a predictable way:

y=a f(b(x−h))+ky = a\,f\big(b(x - h)\big) + k
  • hh shifts it right by hh, and kk shifts it up by kk;
  • aa stretches it vertically (and flips it if a<0a < 0);
  • bb squashes it horizontally by a factor of bb.

Try it yourself

Type a function and drag the sliders to see shifts and stretches live.
Shift, stretch and reflect a parent graph one parameter at a time.

What to find before you sketch

  1. yy-intercept: put x=0x = 0.
  2. xx-intercepts (roots): solve f(x)=0f(x) = 0.
  3. Turning points: for a parabola y=ax2+bx+cy = ax^2 + bx + c the vertex is at x=−b2ax = -\dfrac{b}{2a}; in general, where f′(x)=0f'(x) = 0.
  4. Behaviour at the ends: what happens as xx gets very large or very negative.
  5. Asymptotes for functions like 1x\dfrac{1}{x} or exe^x.

Why the horizontal shift looks backwards

y=(x−3)2y = (x - 3)^2 is y=x2y = x^2 moved right by 33, even though there's a minus sign. The vertex is where the bracket is zero, at x=3x = 3. A good check: ask which xx value now produces what x=0x = 0 used to.

An x-y graph with evenly numbered axes. Two identical upward parabolas: a grey one with its vertex at the origin, and a dark blue one with its vertex at (3, 0). A dark red arrow runs horizontally from the first vertex to the second.
Subtracting 3 inside the bracket moves the graph right by 3.

Worked example: sketching a parabola

Sketch y=x2−4x+3y = x^2 - 4x + 3: find its intercepts and its vertex.

Show the solution

yy-intercept: at x=0x = 0, y=3y = 3.

Roots: x2−4x+3=(x−1)(x−3)=0x^2 - 4x + 3 = (x - 1)(x - 3) = 0, so x=1x = 1 and x=3x = 3.

Vertex: x=−−42×1=2x = -\dfrac{-4}{2 \times 1} = 2, and y=4−8+3=−1y = 4 - 8 + 3 = -1, so the vertex is (2,−1)(2, -1).

Completing the square gives the same thing: y=(x−2)2−1y = (x - 2)^2 - 1, which is y=x2y = x^2 shifted right 22 and down 11. It opens upwards because the x2x^2 coefficient is positive.

An x-y graph with the upward parabola y = x² - 4x + 3 in dark blue. Mark dots at (0, 3), (1, 0), (3, 0) and the vertex (2, -1). A thin dashed vertical line at x = 2 shows the axis of symmetry.
The finished sketch, with its intercepts and vertex.

Common mistakes

Shifting y=(x+2)2y = (x + 2)^2 to the right

(x+2)(x + 2) means h=−2h = -2: the graph moves left by 22.

Forgetting the vertex is halfway between the roots

For a parabola the axis of symmetry sits midway between the roots, here at x=1+32=2x = \frac{1 + 3}{2} = 2.

Plotting points without checking the shape first

Find the intercepts and turning point first; then a couple of extra points are enough to sketch it accurately.

Check your understanding

1. What is the vertex of y=(x−5)2+2y = (x - 5)^2 + 2?

2. How does y=−x2y = -x^2 compare with y=x2y = x^2?

3. Where does y=2x−6y = 2x - 6 cross the xx-axis?

Still not sure? Talk it through.

Waypoint Mentor's tutor explains this out loud, works through your own problems on a whiteboard, and checks you've got it. Free to start.

Explain this to me

Related topics