Function transformations in this visualization
A transformation of the graph of a function shifts it, stretches or compresses it, or reflects it. With four parameters the transformed function is , where . By default this page uses a polyline with no symmetry, so every transformation shows; seven common parent functions are there too: , , , , , and .
The dashed curve is the parent graph , the solid curve is . A point P = on the parent and its image P′ on are joined by red arrows, one for each step. Every point of the graph moves by the same rule:
Now
P
Why the inside acts the opposite way: a point lies on the graph of when is an input of and . Solving for the new x-coordinate gives : the shift is added, but the old coordinate is divided by . So moves the graph right although the formula shows , and halves its width. The outside parameters act on the output directly.
Also written : for the graph moves to the left, which is here. The sinusoid is a special case of this page too: , , .
The order of the steps
The red button builds from step by step: inside the bracket (horizontal) first, then outside (vertical). Inside there are two ways, chosen with the lever beside the button. Scale first: divide the x-coordinates by (a horizontal stretch or compression relative to the y-axis, with a reflection across it when ), then add . Shift first: add to the x-coordinates, then divide them by — which divides the shift too, leaving exactly . Outside: multiply the y-coordinates by (a vertical stretch or compression relative to the x-axis, with a reflection across it when ), then add . Steps whose parameter changes nothing are skipped.
Both ways end on the same . After each run the graphs on the way stay, faint, until a parameter changes; throw the lever and press again, and the two ways lie side by side.
In each direction the stretch comes before the shift when the shift is written as or : shifting by first and then dividing the x-coordinates by divides the shift as well, and the graph ends up shifted by . (Shifting first works if the shift is — the lever’s Shift side.) Horizontal and vertical steps do not affect each other, so either direction may go first.
Easy to misread
- : the graph of is squeezed to half its width, then shifted 3 to the right — not 6. Factor out first to read the shift.
- compresses the graph to half its width; stretches it to twice its width. For it is the other way round: doubles the heights.
- cannot be 0 on this page: the point map divides by (and is not even defined for ). is allowed and flattens the graph onto over the domain of : a ray for , the line without the point for (which then has no vertical asymptote).
- For an even function (, ), changes nothing, because . For an odd function (, , ), and give the same graph, because . On , : a horizontal squeeze and a vertical stretch draw the same curve, and only the point P tells them apart (highlight 7). The polyline has none of these coincidences.
- Asymptotes and domains move with the graph: for the asymptotes of move to and , and the domain of is where .
- The point P can be dragged along the parent graph (or P′ along ); grab anywhere else to slide the whole graph, and the faders for and follow.