📘 CodingMarble Learn

Transformations of Functions

A transformation changes the graph of a parent function y = f(x) without changing its basic shape. Adding outside the function moves it vertically: f(x) + k moves up k. Changes inside the brackets act horizontally and the opposite way: f(x − h) moves right h. Multiplying outside, a·f(x), stretches vertically by a (and flips in the x-axis if a < 0). Multiplying inside, f(bx), squeezes horizontally by factor 1/b (and flips in the y-axis if b < 0). All together: y = a·f(b(x − h)) + k, and the point (0, 0) of the parent moves to (h, k).

🎬 Step-by-step story

  1. The grey curve is the parent function y = x². The red dot is its vertex at (0, 0). Every change in this lesson moves or reshapes this curve.
  2. Add 3 to the output: y = x² + 3. Every point goes up 3. The blue curve slides up and the vertex moves to (0, 3).
  3. Put (x − 2) in place of x: y = (x − 2)². The curve moves RIGHT 2, not left. You need x = 2 to get what x = 0 gave before.
  4. Multiply the output by −2: y = −2x². Every y-value doubles and changes sign. The curve gets narrower and flips upside down in the x-axis.
  5. Multiply the input by −1: y = √(−x). Every point jumps across the y-axis. A number b inside (f(bx)) squeezes the graph sideways by 1/b.
  6. Free play: choose a parent function and move the sliders a, b, h and k. The readout lists every change in words.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why does a minus sign inside move the graph right?

The new graph needs x to be h bigger to reach the same input as before. So everything happens h units later, to the right.

Does adding k change the shape of the graph?

No. Every point moves by the same amount, so the shape and width stay exactly the same. Only the position changes.

What is the difference between −f(x) and f(−x)?

−f(x) changes the sign of the output: the graph flips upside down in the x-axis. f(−x) changes the sign of the input: the graph flips left–right in the y-axis.

Why does f(2x) make the graph narrower and not wider?

The input doubles, so the graph reaches each value at half the x. Things happen twice as fast, so the graph is squeezed to half its width.

In what order should I apply several transformations?

A safe order is: stretches and flips first, then translations. Try both orders in free play to see why order matters.

What is a parent function?

The simplest member of a family, like y = x² for all parabolas. Every other member is this one moved, stretched or flipped.

Parent functions

A parent function is the simplest form of a family of graphs. Learn their shapes by heart:

Every graph in this lesson is one of these, moved, stretched or flipped.

Translations: moving the graph

Vertical: y = f(x) + k moves the graph up k units (down if k is negative). Each output just gets k added.

Horizontal: y = f(x − h) moves the graph right h units (left if h is negative). This feels backwards. Think of it like this: the new graph must reach the same height at x = h that the old graph reached at x = 0. So it is pushed right.

Example: y = (x + 4)² − 1 is y = x² moved left 4 and down 1. Its vertex is at (−4, −1).

Some books write a translation as a vector: moving by (h, k) means right h and up k.

Stretches and reflections

Vertical stretch: y = a·f(x) multiplies every y-value by a. If a = 3, the graph is 3 times as tall. If 0 < a < 1, it is squashed towards the x-axis. Points on the x-axis do not move.

Horizontal stretch: y = f(bx) multiplies every x-value by 1/b. If b = 2, the graph is squeezed to half its width. If b = ½, it is twice as wide. Points on the y-axis do not move.

Reflections: y = −f(x) flips the graph in the x-axis (upside down). y = f(−x) flips it in the y-axis (left ↔ right).

Even functions (like x² and |x|) look the same after f(−x). Odd functions (like x³) give the same graph for −f(x) and f(−x).

Combining transformations

The general form is y = a·f(b(x − h)) + k. A safe order for drawing it:

  1. Horizontal stretch by 1/b (and flip in the y-axis if b < 0).
  2. Vertical stretch by a (and flip in the x-axis if a < 0).
  3. Translate right h and up k.

To find where a point goes, use: (x, y) → (x/b + h, a·y + k). For example, on y = 2(x − 1)² + 3, the parent point (1, 1) goes to (1 + 1, 2·1 + 3) = (2, 5).

Watch out: y = f(2x − 6) is not a shift of 6. Factor first: f(2(x − 3)) means squeeze by ½, then move right 3.

Try it: predict, then check

Before you touch the sliders, write down where the vertex of y = −(x + 1)² + 2 will be and whether it opens up or down. Then set a = −1, h = −1, k = 2 in the free-play step. Were you right? Now try y = |2x| and y = 2|x|. Are they the same graph? (They are! Can you explain why?)

Key formulas and definitions

Worked examples

1. Describe how y = (x − 5)² + 2 is made from y = x².

x − 5 inside → move right 5. +2 outside → move up 2. Vertex goes from (0, 0) to (5, 2).

2. Describe y = −3|x| from y = |x|.

Multiply outside by −3: vertical stretch by 3, then flip in the x-axis. The V becomes a narrower upside-down V, vertex still at (0, 0).

3. Write the equation when y = √x is moved left 4 and down 1.

Left 4 → replace x with x + 4. Down 1 → subtract 1. y = √(x + 4) − 1. It now starts at (−4, −1).

4. The point (2, 8) is on y = f(x). Where is it on y = f(2x)?

Inside ×2 squeezes x by ½: (2, 8) → (1, 8). Check: at x = 1, f(2·1) = f(2) = 8. ✓

5. Find the vertex of y = 2(x + 3)² − 4 and say if it opens up or down.

Compare with a(x − h)² + k: a = 2, h = −3, k = −4. Vertex (−3, −4). a > 0, so it opens up, and it is narrower than y = x².

6. Describe y = f(3x − 6) + 1 as a list of transformations.

Factor inside: 3x − 6 = 3(x − 2). So y = f(3(x − 2)) + 1: horizontal stretch by 1/3, then right 2, then up 1. A point (x, y) goes to (x/3 + 2, y + 1).

Common mistakes

Practice quiz

1. y = x² + 4 is y = x² moved:
2. y = (x + 2)² is y = x² moved:
3. Which equation flips y = f(x) in the x-axis?
4. The vertex of y = (x − 3)² − 5 is:
5. y = f(4x) compared with y = f(x) is:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What are the four types of function transformations?

Translations (shifts), vertical/horizontal stretches, reflections in the x- or y-axis, and combinations of these.

How do I find the vertex after a transformation?

Write the function as a(x − h)² + k. The vertex is (h, k). For other parents, the special point (0, 0) moves to (h, k).

Is y = f(x − h) + k the same as moving by the vector (h, k)?

Yes. The graph moves h units right and k units up, which is a translation by the vector (h, k).

Where this is taught

NetherlandsHAVO 4 (bovenbouw, 2e fase)Functions, graphs and equations (part 1)
NetherlandsVWO 4 (bovenbouw, 2e fase)Functions, graphs and equations (part 1)
NetherlandsVWO 5Relationships (part 2)
PolandLiceum ogólnokształcące, klasa IIFunctions
USA (Common Core, NGSS, AP)Grade 9Linear and exponential relationships
USA (Common Core, NGSS, AP)Grade 9Linear and exponential relationships
USA (Common Core, NGSS, AP)Grade 10Quadratic functions and modeling
USA (Common Core, NGSS, AP)Grade 11Modeling with functions
USA (Common Core, NGSS, AP)Grade 11Mathematical modeling
USA (Common Core, NGSS, AP)Grade 12Polynomial and Rational Functions

Learn first

Learn next

Related lessons

All Maths lessons