CoursesAIMathCodePhysicsAbout and FAQ

TwiddleLab / Math / Functions You Can See

Stretch, Flip, Shift

Lesson 7 of 10 · 7 min · Free, no account needed

What you will learn

  • y = a(x - h)² + k puts the vertex at (h, k).
  • h moves the curve right (minus inside the bracket means right). k moves it up.
  • a stretches the curve, and a negative a flips it upside down.

Start the lesson

How the lesson goes

  1. The dashed twin is y = x² moved 3 to the right. What is its formula?

    Bet first. You'll find out by moving the curve yourself.

  2. Grab the curve and drag it onto its twin.

    Drag the vertex. Watch the formula rewrite itself: orange is left and right, green is up and down.

  3. Where does y = (x - 1)² + 2 sit?

    Drag the pin to its vertex before the curve appears.

  4. One formula moves every parabola.

    Vertex form: y = a(x - h)² + k. The vertex sits at (h, k).

    h shifts it left and right. Minus inside the bracket moves it right.

    k shifts it up and down.

    a stretches it: bigger a is narrower, a between 0 and 1 is wider, negative a flips it.

  5. Build the dashed curve from tiles.

    Its vertex is at (2, -1). Fill the signs and the numbers.

  6. Game: hoops.

    The dashed arc is your hero's jump. Drag its top so the jump passes through every hoop, then Jump.

  7. This sprite should fly along the dashed path. It doesn't.

    The path is y = (x - 3)². Find the wrong sign in the code and tap it to change it. Then Check.

  8. Move the curve to y = (x + 1)² + 4.

    No formula help this time. Drag the vertex, then Check.

  9. Your jump, as one line of code.

    Your last hoops jump is in the code below. Run it and watch the sprite.

Previous lesson: Curves: When Growth Changes · Next lesson: Fitting a Line to Data · Part of the course: Functions You Can See

Lessons are interactive and need JavaScript. Turn it on to play them.

Loading TwiddleLab