FreeMathCamp
Course Articles

Free Math Camp

A free course in the maths you need before calculus. Short lessons, interactive visuals, practice that adapts to you, and a record of progress on your account.

freemathcamp.app

Made by Adam Richard Turner

hello@adamrichardturner.dev

Course

  • Foundations
  • Articles
  • Start free
  • Sign in

Legal

  • Privacy
  • Terms
  • Do not sell or share

Copyright © Adam Richard Turner. All rights reserved.

  1. Articles
  2. /
  3. Graphs & Functions
Graphs & Functions

Transformations of Graphs: Shifts, Stretches and Reflections

How one parent graph gives a whole family of graphs, why f(x−3)f(x - 3)f(x−3) moves right rather than left, and how to combine shifts, stretches and reflections, with an explorer to try them live.

3 min read Supports 4 lessons
In short

A transformation moves or reshapes a graph. In y=a f(x−h)+ky = a\,f(x - h) + ky=af(x−h)+k, hhh shifts it right, kkk shifts it up, ∣a∣|a|∣a∣ stretches it vertically, and a negative aaa reflects it in the xxx-axis.

Learn the shape of a handful of basic graphs, called parent graphs, and you can sketch thousands more. Every graph in the family y=a f(x−h)+ky = a\,f(x - h) + ky=af(x−h)+k is the parent y=f(x)y = f(x)y=f(x) moved and reshaped.

Try each slider on its own first, then combine them. You can switch the parent graph too.

Transformations
y=a f(x−h)+ky = a\,f(x - h) + ky=af(x−h)+k

hhh shifts right, kkk shifts up, ∣a∣|a|∣a∣ stretches vertically, and a<0a < 0a<0 reflects in the xxx-axis.

Shifting up and down

Adding kkk to every output raises every point of the graph by kkk. So y=x2+3y = x^2 + 3y=x2+3 is the parabola y=x2y = x^2y=x2 lifted 333 units.

Shifting left and right

y=f(x−3)y = f(x - 3)y=f(x−3) moves the graph 333 units to the right, which feels backwards. Here is why: the new graph reaches the parent's old height 333 steps later. To get the output the parent had at x=0x = 0x=0, you now need x=3x = 3x=3, since 3−3=03 - 3 = 03−3=0.

(x−3)2(x - 3)^2(x−3)2 is the parabola moved right by 3.

Watch out

Inside the bracket the direction is reversed: f(x−3)f(x - 3)f(x−3) moves right, f(x+3)f(x + 3)f(x+3) moves left.

Stretches and reflections

Multiplying the output by aaa stretches the graph away from the xxx-axis when ∣a∣>1|a| > 1∣a∣>1 and squashes it when ∣a∣<1|a| < 1∣a∣<1. If aaa is negative, the graph also flips upside down.

Putting it together

  1. y=x2y = x^2y=x2

    Start from the parent.

1/5
Tip

Do stretches and reflections before the vertical shift. Shifting first and then stretching would stretch the shift as well.

Key idea

This is why vertex form y=a(x−h)2+ky = a(x - h)^2 + ky=a(x−h)2+k shows a parabola's turning point at (h,k)(h, k)(h,k), and why y=Asin⁡(B(x−h))+ky = A\sin(B(x - h)) + ky=Asin(B(x−h))+k describes every sine wave.

Common questions

Why does f(x − 3) move the graph to the right?

The new function reaches each of the parent's values 333 units later. For example, the parent's value at 000 now happens at x=3x = 3x=3.

What is a parent function?

It is the simplest member of a family of graphs, like y=x2y = x^2y=x2 for parabolas or y=∣x∣y = |x|y=∣x∣ for V shapes. Every other member is a transformation of it.

Practise graph transformations

The Transforming Graphs lesson has worked examples and unlimited practice that adapts to you.

Open the lesson

On this page

  1. Shifting up and down
  2. Shifting left and right
  3. Stretches and reflections
  4. Putting it together
  5. Common questions
Lessons on this
  • Transforming GraphsFunctions
  • Completing the Square & Vertex FormPolynomials, Quadratics & Rational Functions
  • Graphs of Sine & CosineTrigonometry
  • Exponential Growth & DecayExponentials & Logarithms
Related reading3
Ideas this article builds on or leads to.
  • Graphs & Functions
    What Is a Function? Inputs, Outputs, f(x) and the Vertical Line Test

    A function is a rule that gives exactly one output for each input. Writing f(x)f(x)f(x) means "the output of the function fff when the input is xxx".

  • Polynomials & Quadratics
    Completing the Square and Vertex Form of a Quadratic

    Completing the square rewrites x2+bx+cx^2 + bx + cx2+bx+c as (x+b2)2+k(x + \frac{b}{2})^2 + k(x+2b​)2+k. The result, vertex form a(x−h)2+ka(x - h)^2 + ka(x−h)2+k, shows the parabola's turning point (h,k)(h, k)(h,k) directly.

  • Trigonometry
    Graphs of Sine and Cosine: Amplitude, Period and Shifts

    The graphs of y=sin⁡xy = \sin xy=sinx and y=cos⁡xy = \cos xy=cosx are waves that repeat every 2π2\pi2π. In y=Asin⁡(B(x−h))+ky = A\sin(B(x - h)) + ky=Asin(B(x−h))+k, ∣A∣|A|∣A∣ is the amplitude, 2π∣B∣\frac{2\pi}{|B|}∣B∣2π​ is the period, and hhh and kkk shift the wave.