Transforming y = x²

Category: Functions   Level: 201

y = x2 → y = -2(x - 2)2 + 4

Build y = −2(x − 2)² + 4 from y = x² one move at a time: shift right, stretch, reflect, shift up. Follow two points to see what each move does.

Step through it

Watch it

Animated walkthrough

Step by step

Step 1: Start with the parent

The parent graph y = x² has its vertex V at the origin. Track V and the point P(1, 1) through every move.

y = x2

Step 1: Start with the parent

Step 2: Shift right 2

Replace x with x − 2. Every point moves 2 to the right. Yes, minus means right here. The x inside has to reach 2 to do what x = 0 used to do.

(x, y) → (x + 2, y)

Step 2: Shift right 2

Step 3: Stretch by 2

Multiply the outside by 2. Every height doubles, so P climbs from 1 to 2. The vertex sits at height 0, and twice nothing is still nothing.

(x, y) → (x, 2y)

Step 3: Stretch by 2

Step 4: Reflect over the x-axis

Put a minus sign in front. Every height changes sign, so the cup turns into a cap and P drops to −2.

(x, y) → (x, -y)

Step 4: Reflect over the x-axis

Step 5: Shift up 4

Add 4 at the end. Every point rises 4, so the vertex lands at (2, 4) and P at (3, 2). Four moves, one equation.

y = -2(x - 2)2 + 4

Step 5: Shift up 4

All steps at once

Storyboard

Generate it yourself

cd svg-generator
python3 -m svgmath render function-transformations --out /tmp/function-transformations

Source: svgmath/diagrams/function_operations.py