Gauth

Function transformations

Graphing Transformations at a Glance

One principle generates the entire table. Learn it and the shifts, stretches, reflections and composition order all become obvious rather than memorised.

By the Gauth editorial teamHow this content is produced and checkedUpdated 10 September 2026

The one principle

A function is a machine. An input goes in, an output comes out. There are exactly two places you can interfere with that: before the machine sees the input, or after it has produced the output. Every transformation you will ever be asked about is one of those two, and they behave differently for a reason that is not arbitrary.

Changes on the outside are arithmetic performed on the answer. If you add 3 to every output, every point rises by 3. If you double every output, the graph gets twice as tall. What you write is what you see. Outside transformations run forwards.

Changes on the inside are arithmetic performed on the input, before the function has done anything at all. That means the graph at position is not showing you what does at ; it is showing you what does at some other number. To work out where a feature ends up, you have to ask which produces the input that generated it — and that is an inverse question, which is why inside transformations run backwards.

Why y = f(x − 3) shifts right and not left

Take any point on the graph of , so . Now track that point onto . To make do what did at , the expression inside the brackets has to equal , so you need to solve for .

The point has become . Every point does the same thing, so the whole graph slides three units right. The minus sign never lied to you; it applied to the input, and the input and the picture move opposite ways.

A second way to feel it, if the algebra is not convincing: the new graph is running late. Whatever did at zero, cannot do until reaches 3, because only then is the number reaching the machine equal to zero. Being late means appearing further along the axis, which means further right.

A third way, which is the same fact in familiar clothing: the circle is centred at , not . Nobody finds that surprising. It is the identical mechanism, and the vertex form of a parabola, , is the same thing again — the reason completing the square tells you the vertex immediately is precisely that it converts the equation into a statement about transformations.

The whole table, derived

Six rules, each with the one-line reason it is true. If you can reconstruct the derivation column you never need the note column.

Transformations and where they come from

Tap any formula with a derivation to see where it comes from.

Outside the function — acts on y, runs forwards

Inside the function — acts on x, runs backwards

Two invariants in that table are worth keeping as sanity checks. A vertical stretch leaves the x-intercepts exactly where they were, because multiplying zero by anything gives zero. A horizontal stretch leaves the y-intercept exactly where it was, for the mirror-image reason. If your sketch has moved a root during a vertical stretch, something has gone wrong before you drew it.

Horizontal transformations also change the domain while leaving the range alone, and vertical transformations do the reverse. That gives you a second free check on any sketch, and if you want the reasoning spelled out on specific functions, the domain and range calculator lists the restriction that produces each one.

Watch it happen

The sine curve is the cleanest demonstration, because it puts an outside transformation and an inside transformation on the same picture. Amplitude and vertical shift are outside: they act on the output, and the graph does exactly what the number says. Frequency is inside: raising it does not stretch the curve, it squashes it, because a larger multiplier means the input reaches any given value sooner.

Amplitude and shift act outside; frequency acts inside

y = 2·sin(1x) + 0

Push the frequency slider from 1 to 2 and count the arches. There are twice as many, because the curve now completes a full cycle in half the horizontal distance — the number went up and the graph got squashed, which is the backwards behaviour in one move. Then drag the amplitude slider with the vertical shift left at zero: the arches change height, and every point where the curve crosses the axis stays exactly where it was. Outside changed the heights; inside changed the positions.

Composing transformations, and the order everyone gets wrong

One transformation at a time is easy. The marks are lost when several are stacked, and the reason is always the same: people apply them in the order they read them rather than the order the arithmetic happens.

Start with the outside, where it is easier to see. means multiply the output by 3, then add 2. Do it in that order and you get a stretch followed by a shift up 2. Do it the other way — shift up 2 first, then stretch — and you have computed , which is a shift of 6, not 2. The stretch scaled the shift you had already applied.

Inside the function the same trap exists, and it is better hidden. Consider . Factor the argument first, always.

Now there are two orders that work and one that does not. Compress horizontally by 2 to get , then shift right 3 by replacing with , giving . Correct. Or shift right 6 first, using the unfactored constant, to get , then compress by 2 by replacing with , giving . Also correct.

What does not work is taking the 3 from the factored form and shifting first: compressed by 2 is , and that is a different graph. The shift distance depends on whether you have already compressed. Pick one route and stay on it.

The two channels do not interact, though, and that is a genuine simplification rather than a rule to memorise. Horizontal transformations rearrange the input and vertical ones rearrange the output, so neither can disturb the other. You can do all the horizontal work first, or all the vertical work first, and land in the same place either way.

Where does this description go wrong?

One of these lines is wrong. Click it.

The point-mapping shortcut

Transforming a whole curve in your head is where errors creep in. Transforming three points is reliable, and it is the same operation written down properly. Take the general form and ask where an arbitrary point on ends up.

The new x-coordinate divides by and then adds , which is the inside channel running backwards in the right order. The new y-coordinate multiplies by and then adds , which is the outside channel running forwards. Both halves of the principle are visible in one line, and the order question answers itself: the operations happen in the order written in the formula.

Three worked examples

Worked example

  1. 1

    Read the inside first. The argument is x + 1, which is x minus negative one, so the shift is left by 1.

  2. 2

    Read the outside in arithmetic order: multiply by negative 2, then add 5. So reflect in the x-axis, stretch vertically by 2, and finally lift by 5.

  3. 3

    Track the vertex. On y = x squared it sits at the origin, and the two shifts move it left 1 and up 5.

  4. 4

    Check with a second point. At x = 0 the bracket is 1, so the height is negative 2 plus 5.

Answer

The second example looks harmless and catches almost everybody, because the argument is written backwards.

Worked example

  1. 1

    The argument is not in the standard form, so rewrite it. Factor out the negative sign so the coefficient of x is visible.

  2. 2

    Now the inside reads b(x minus h) with b equal to negative 1 and h equal to 4. Scale first: b = -1 is a reflection in the y-axis.

  3. 3

    Then shift right 4 by replacing x with x minus 4. Doing the shift first instead would have given the square root of negative x minus 4, which lives on the wrong side of the axis entirely.

  4. 4

    Confirm the domain and two points. The radicand is non-negative when x is at most 4.

Answer

The third is the one that decides whether trigonometric graphing goes smoothly, because the phase shift is read wrongly more often than it is read correctly.

Worked example

  1. 1

    Factor the argument before reading anything off it. This single step is what prevents the classic error.

  2. 2

    Outside gives amplitude and midline: the output is multiplied by 3 and then raised by 1.

  3. 3

    Inside gives period and phase shift. The 2 compresses horizontally, halving the period, and the shift is a quarter of pi, not a half.

  4. 4

    Check the maximum. It occurs when the sine argument equals pi over 2, and the height there should be amplitude plus midline.

Answer

Reading as the phase shift is the error, and it happens because the number is sitting right there in the original expression. It is not the shift until the 2 has been factored out of it. If trigonometric graphs are where your marks are going, the trigonometry solver will lay out the amplitude, period and phase for any expression you give it, which is a fast way to check a batch of sketches.

Two cases that look like exceptions and are not

Absolute value bars are where students decide the principle has broken down. It has not. There are two different placements and they behave exactly as the rule predicts, which is why they make such a good test of whether you have understood it.

puts the bars around the output, so it is an outside transformation. Every negative height becomes positive and every positive height is untouched. Visually, the parts of the curve below the x-axis flip up and nothing else moves. For , the section between and folds upward into a hump peaking at , while the two arms outside those roots stay exactly where they were.

puts the bars around the input, so it is an inside transformation and it does something completely different. For nothing changes at all, because . For the function receives , so the new graph on the left is a mirror image of the old graph on the right. The original left half is discarded entirely. Applied to , which normally exists only for , you get : the same curve on the right, plus its mirror on the left, so now sits opposite .

The payoff for learning the principle rather than the table is that the table has six rows and stops there, while the principle keeps answering questions the table never covered.

Going the other way: graph to equation

Exams ask this at least as often, and it is easier than it looks because the transformations are recoverable one channel at a time.

Find an anchor first — a feature you can identify unambiguously on the parent graph. For a parabola it is the vertex. For a square root it is the endpoint. For a sine curve it is the point where the graph crosses its midline on the way up. Read off how far that anchor has moved horizontally and vertically, and you have and immediately.

Then take one more point and solve for the remaining stretch. If you have found a vertex at and the curve also passes through , write , substitute, and solve , so and . One anchor plus one point determines everything.

Be aware that the answer is not always unique in form. Because for , a horizontal compression by 2 and a vertical stretch by 4 produce the identical curve, so two students can hand in different-looking descriptions that are both right. Markers accept either, but you cannot claim both at once.

Solve a graphing problem now

First solution free

Once transformations are secure, they stop being a topic and start being a tool you use somewhere else. They are the reason a substitution shifts the limits of an integral, and the reason a phase shift shows up in every wave equation you will meet later. Our companion piece on the algebra calculus assumes covers where this one gets called on, alongside the six other skills that quietly decide how a first calculus course goes.

Frequently asked questions

Why does f(x − 3) move the graph right when the sign is a minus?
Because the minus sign is applied to x before the function ever sees it. Take any point (p, q) on the original graph, so f(p) = q. On the new graph you reach that same height when x − 3 = p, which means x = p + 3. Every point therefore appears three units further right. The subtraction happens to the input; the shift happens to the picture, and they run opposite ways.
Do I apply the horizontal shift before or after the horizontal stretch?
Factor the inside into the form b(x − h) first, and then the scaling goes before the shift. For f(2x − 6) = f(2(x − 3)) that means compress by 2, then shift right 3. There is a second valid route — shift right 6 using the unfactored constant, then compress by 2 — and both land in the same place. What fails is mixing them: shifting right 3 and then compressing gives f(2x − 3), a different graph.
Does the order of the vertical and horizontal transformations matter?
No. Horizontal transformations act on the input and vertical ones act on the output, so they never interfere with each other and can be done in either order. Order only matters within a channel: stretch before shift on the outside, and scale before shift on the inside once the argument is factored.
Is a horizontal compression the same as a vertical stretch?
For most functions no, but for some it is exactly the same graph, which is worth knowing because it explains a lot of apparently contradictory answers. For y = x squared, replacing x with 2x gives 4x squared, so compressing horizontally by 2 is identical to stretching vertically by 4. For y = 2 to the power x, shifting left by 1 is identical to stretching vertically by 2. Both descriptions are correct; they are the same curve reached from different directions.
How do I go the other way and find the equation from a graph?
Locate an anchor point that you can identify on the parent graph — a vertex, an endpoint, the point where a sine curve crosses its midline going up. Read off how far it has moved horizontally and vertically to get h and k. Then take a second point and solve for the remaining stretch factor. Two points is usually enough because everything else is determined once the anchor is fixed.

Sources

Keep going

Gauth AIAsk me for any help!