Aaron Olsen

Blog

Photos

Writing

Things

About

Manipulating Functions

· math

Remember the formula for transformations of parabolas?

Stretch vertically by
Compress horizontally by (or stretch by )
Move vertically by
Move negatively horizontally by (or positively by )

This is probably what you learned in high school. You have to memorize these variables and what they do, along with their confusing behaviours (stretching? compressing? was I supposed to move left or right?).

I found this hard to remember because of all the special cases and backwards-backwards double-negatives. Sometimes it would translate in the positive direction, or sometimes it would translate left by a negative amount. Stretching and compressing were reciprocals depending on which axis it was.

It was hard to visualize what was really happening. Tools like the graph down below can help with this, a little. Try sliding the values to see how changing the variables affects the graph.

Still, it seems like the sliders don’t really behave intuitively at first. When I was in school, I especially disliked hearing compressed by a factor of .” What was the difference between that and stretching by ? It didn’t seem intuitive to me that one variable compressed while the other stretched.

In fact, let’s fix that right now. Instead of

The equation could be:

Basically the same, except now you stretch horizontally by just like stretching vertically by .

We can write that a little more cleanly:

Hmmm. That’s interesting. Seems like transformations are being applied to . Increase and our function appears to translate left. Increase and it appears to stretch horizontally.

Let’s continue to rearrange this equation to see what’s happening to .

While we’re reassigning variables in the pursuit of clarity, let’s flip the sign of and so we don’t have to worry about the mental gymnastics of subtracting by negative numbers.

There’s a pattern here. We’re taking the variable , adding to translate, then dividing to compress. Same with ⁠—adding to translate, then dividing to compress.

Okay. That’s all great except for one problem⁠—now it’s all backwards.

Increasing should move us positively in the axis. That’s what used to do for the axis before I went and messed it up. Similarly, dividing by would make more intuitive sense if it compressed1. Multiplying should mean stretching.

The Eureka moment was realizing that when you change those variables, you’re not applying transformations to the values of the function. You’re applying those transformations onto the graph itself! It just happens that if you normalize the graph to the same scale, then it looks as if the function is changing instead.

Try thinking about it this way:

Compress the -axis by
Compress the -axis by
Move the -axis vertically by
Move the -axis horizontally by

Play around with the graph below and try to develop an intuitive sense of how applying transformations to the and values of the graph transforms the axes of the graph, noticing that the function always looks the same2. You can even choose different functions to see how this new formula isn’t specific to parabolas or even polynomials.

Now that we can see what , , , and are actually doing, visualizing these transformations should be intuitive. You don’t need to memorize a different formula for every type of function⁠—apply transformations to and .

We took a rote formula and rearranged it to understand what was really happening underneath. Instead of memorizing every case, we derived a general pattern that extends beyond the simple parabola.

Hopefully by now you can see how you can take any function with an and a and transform it to your heart’s content.

When what you’ve been taught seems to have too many rules and inconsistincies, it’s probably a sign that we’re looking at a problem from the wrong perspective. Sometimes, a different frame of reference is all it takes to find logic in a mess.


  1. Why couldn’t it be and stretching? Wouldn’t that be more logical? That works too! If that makes more sense to you, then go for it. There’s more than one way to represent a function. I only chose compression because a division line looked nicer than brackets everywhere.
  2. Except for when you divide by zero, of course.

© Aaron Olsen 2023