Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Transformations of Functions

How to use
  1. Pick a base function in the Parent function menu at the top. The slider values stay as they are. Learn more about picking a base function
  2. The graph shows the parent f(x)f(x) as a dashed gray curve and the transformed g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k as a solid blue curve. Learn more about reading the two curves
  3. Choose what to change with the tabs under the explanation: V. scale (aa), V. shift (kk), H. scale (bb), H. shift (hh), or Custom for all four. Values carry over between tabs. Learn more about the tabs
  4. Drag a slider, or press its ▶ to let it run by itself; Speed sets how fast. Learn more about playing a slider
  5. The labels along the bottom of the graph show aa, kk, bb, hh; a value away from its start turns blue. Learn more about the labels
  6. The text on the right gives the general rule and what the current value does to the chosen function. Learn more about the explanation
  7. Reset puts back the sliders of the current tab. The buttons at the top zoom, return to the starting view, save a picture and open full screen.


Function transformations
f(x)=x2f\left(x\right)={x}^{2}
g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f\big(b(x - h)\big) + k
a=1a = 1k=0k = 0b=1b = 1h=0h = 0
Vertical scale · Quadratic
g(x)=a⋅f(x)\displaystyle g(x) = a \cdot f(x)
General

Multiplies every output by aa.

  • ∣a∣>1|a| > 1 — stretches vertically
  • 0<∣a∣<10 < |a| < 1 — compresses vertically
  • a<0a < 0 — reflects across the x-axis
  • a=0a = 0 — collapses to y=0y = 0
Applied to quadratic

Currently at the default value — move the slider to see how it affects Quadratic.

a=1a = 1
Speed







Getting Started with the Visualizer

The tool has three parts. Across the top runs a bar with the Parent function menu and the buttons for zooming, the starting view, saving a picture and full screen. On the left is the graph. On the right is the explanation, with the controls under it.

The graph shows two curves: the parent function f(x)f(x) as a dashed gray curve and the transformed function g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k as a solid blue curve. The legend in the top corner names both. Along the bottom of the graph, four small labels show the current values of aa, kk, bb and hh; a label turns blue as soon as its value moves away from the start.

The tool opens with the quadratic f(x)=x2f(x) = x^2 and every value at its start, a=1a = 1, k=0k = 0, b=1b = 1, h=0h = 0, so the blue curve lies exactly on the gray one. Move any slider and the two separate.

Picking a Base Function

DemoSame move, different bases
Step 0 of 3
The Parent function menu lists ten base functions: linear, quadratic, cubic, reciprocal, exponential, logarithmic, sine and cosine (grouped under Trigonometric), absolute value and square root.

The parent function sets only the starting shape. The four transformations work the same way for every family: aa scales vertically, kk shifts vertically, bb scales horizontally, hh shifts horizontally. What differs is what they do to the family's own features — the vertex of a parabola, the asymptote of the reciprocal, the midline of a sine wave, or the start of the domain of the square root.

Changing the parent function keeps the slider values, so the same transformation can be compared across families: set a=−1a = -1 once and step through the menu to see each graph turned upside down.

The Four Tabs and the Custom Tab

DemoTabs and Custom
Step 0 of 4
Five tabs under the explanation choose what to change:

• V. scale — the slider for aa only
• V. shift — the slider for kk only
• H. scale — the slider for bb only
• H. shift — the slider for hh only
• Custom — all four sliders at once

A small amber dot on a tab means its value has moved from the start. Switching tabs never resets anything: a shift set in one tab stays when you open another, so a combined transformation can be built one move at a time.

Reset puts back only the sliders shown in the current tab; in Custom it puts back all four.

Playing a Slider

DemoPlaying a slider
Step 0 of 4
Every slider has a ▶ button on its left. Press it and the value runs back and forth across its whole range on its own, while the graph, the labels and the explanation follow; press ❚❚ to stop it where it is. Dragging the slider stops it too.

The Speed buttons (0.5×, 1×, 2×, 4×) set how fast a playing slider moves. In Custom, several sliders can play at once, which shows how the moves combine: a shift running together with a stretch, for instance.

Playing is the quickest way to get a feel for one transformation. Play aa and the parabola stretches, flattens, folds onto the xx-axis at a=0a = 0 and comes back upside down.

Reading the Two Curves

The graph always shows two curves:

• Dashed gray curve — the parent function f(x)f(x). It never moves, so it is always there to compare with
• Solid blue curve — the transformed function g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k. It moves, stretches and flips as the sliders change

When every value is at its start the two curves lie on top of each other. The switch Original function f under the controls hides or shows the gray curve; Key points and lines hides or shows the marks the tool adds, such as the vertex of a parabola at (h,k)(h, k) or the asymptote of the reciprocal.

The Value Labels on the Graph

Along the bottom of the graph sit four labels, one each for aa, kk, bb and hh, with the current value.

A label stays white while its value is at the start (a=1a = 1, b=1b = 1, h=0h = 0, k=0k = 0), which means no transformation in that direction. It turns blue as soon as the value moves. In Custom, where several moves add up, one look at the labels tells which transformations are in use and by how much.

The Explanation Beside the Graph

DemoThe explanation
Step 0 of 3
The text on the right follows the current tab, the parent function and the slider values. It has two parts:

• General — what this transformation does to any function: the formula, what positive and negative values do, when it stretches and when it compresses, and when it reflects
• Applied to the chosen function — what the current value does to this family: the vertex of the parabola moves to (h,k)(h, k), the amplitude of the sine becomes ∣a∣|a|, the asymptote of the reciprocal moves to x=hx = h, and so on

While a value is still at its start, the second part says so and invites you to move the slider. In Custom it lists every move in use, each with its effect on the chosen function.

The Four Transformations Mathematically

The transformed function is

g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k


Each parameter controls one type of transformation:

• aa — vertical scale and reflection. Multiplies outputs by aa. ∣a∣>1|a| > 1 stretches vertically; ∣a∣<1|a| < 1 compresses; a<0a < 0 reflects across the xx-axis.
• kk — vertical shift. Adds kk to every output. Positive kk moves the curve up, negative moves it down. Shape is unchanged.
• bb — horizontal scale and reflection. Multiplies inputs by bb. ∣b∣>1|b| > 1 compresses horizontally (counterintuitive); ∣b∣<1|b| < 1 stretches; b<0b < 0 reflects across the yy-axis.
• hh — horizontal shift. Subtracts hh from the input. Positive hh moves the curve right (the minus sign in f(x−h)f(x - h) is the source of the inversion).

The four transformations commute in pairs (vertical with horizontal) but not across axes. The order in g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k is the canonical convention.

Why Horizontal Transformations Are "Backwards"

The most common stumbling block in function transformations is that horizontal operations behave opposite to what intuition suggests:

• Replacing xx with x−hx - h moves the graph right by hh, not left
• Replacing xx with bxbx where b>1b > 1 compresses the graph horizontally, not stretches it

The reason is that the substitution acts on the input axis, not the output. If you want gg to take value f(0)f(0) at x=hx = h (i.e. move that feature right to hh), you need g(h)=f(0)g(h) = f(0), which means the input to ff must equal 00 when x=hx = h — hence f(x−h)f(x - h). Similarly, if bb doubles, you reach the same input value of ff in half the distance, so the curve compresses.

The visualizer makes this concrete: drag hh to +3+3 and watch the curve slide right by three units, in spite of the minus sign in the formula. Setting bb to auto and watching it sweep through the same effect is the quickest cure for the confusion.

The Vertical Scale

The parameter aa multiplies every output: g(x)=a⋅f(x)g(x) = a \cdot f(x), stretching the curve away from the x-axis or squashing it toward it.
-10-5510-55g(x) = 2 · f(x)
a = 2, frozen

Every height doubled: same vertex, same roots, twice the climb. The gray original shows what the blue curve left behind.

The frozen a=2a = 2 doubles every height of the parabola: same vertex, same axis crossings, twice the climb. Values between 00 and 11 flatten instead; negative values add a flip across the x-axis on top of the scaling.

Two things never move under aa: the roots (heights of zero stay zero) and the x-positions of every feature. Vertical scaling is a pure output operation — the curve's horizontal anatomy is untouchable.

The animation mode makes the special values legible: watch the curve pass through the flatline at a=0a = 0 and emerge inverted on the other side.

The Vertical Shift

The parameter kk adds a constant to every output: g(x)=f(x)+kg(x) = f(x) + k, sliding the whole curve up or down as a rigid body.
-10-5510-55g(x) = f(x) + 3
k = 3, frozen

The whole parabola lifted rigidly by 3 — shape untouched, vertex now at (0, 3), roots gone above the axis.

The frozen k=3k = 3 lifts the parabola's vertex from the origin to (0,3)(0, 3) — and every other point by exactly the same amount. Nothing about the shape changes: distances, slopes, and widths all survive.

What does change is the curve's relationship to the x-axis: roots appear, merge, and vanish as the curve rises past it. Sliding kk on the parabola is watching the discriminant change sign in real time.

Together with the horizontal shift, this pair forms the rigid motions; the two scales are the shape-changers.

The Horizontal Scale

The parameter bb multiplies the input before the function sees it: g(x)=f(bx)g(x) = f(bx) — and the effect runs opposite to intuition.
-10-5510-55g(x) = f(2x)
b = 2, frozen

Input doubled means the curve narrows: each height reached at half the distance — the famous backwards behavior.

The frozen b=2b = 2 makes the parabola narrower, not wider: with the input doubled, the curve reaches each height at half the distance. Compression by bb, not expansion — the "backwards" behavior examined in Why Horizontal Transformations Are "Backwards".

Fractional bb stretches; negative bb adds a y-axis flip. Heights are untouched — this is the exact mirror of the vertical scale, acting on the other axis.

On the parabola, f(2x)=4x2f(2x) = 4x^2 happens to equal a vertical scaling by 44 — a coincidence of the quadratic worth testing against sine, where no such disguise exists.

The Horizontal Shift

The parameter hh shifts inputs: g(x)=f(x−h)g(x) = f(x - h), sliding the curve along the x-axis — with the sign convention that trips everyone once.
-10-5510-55g(x) = f(x − 3)
h = 3, frozen

Subtracting 3 inside the parentheses slides the curve right: the vertex now lives at x = 3.

The frozen h=3h = 3 moves the vertex to x=3x = 3: subtracting 33 inside the parentheses moves the curve to the right. The rule reads backwards until you see it from the input's side — the point that used to happen at 00 now happens at 33, because 3−3=03 - 3 = 0.

Like the vertical shift, this is a rigid motion: shape perfectly preserved, position changed. Every feature — vertex, roots, extrema — translates by exactly hh.

The tool keeps the sign honest: the label on the graph shows h=3h = 3 while the blue curve sits 3 units to the right of the gray one, the graph of f(x−3)f(x - 3), so the notation and the geometry can be checked against each other.

Combining All Four Transformations

The Custom tab opens all four sliders at once, assembling the full form g(x)=a⋅f(b(x−h))+kg(x) = a \cdot f(b(x - h)) + k — the template every transformed function in this course fits.
-10-5510-55g(x) = 0.5 · f(1.5(x − 2)) + 1
All four at once, frozen

Widened by a = 0.5, narrowed by b = 1.5, carried to (2, 1) by the shifts — the full template in one picture.

The frozen combination 0.5⋅f(1.5(x−2))+10.5 \cdot f(1.5(x - 2)) + 1 shows all four at work: widened by the vertical scale, narrowed by the horizontal one, and carried to a new vertex at (2,1)(2, 1) by the two shifts.

Order matters inside the formula but not on the sliders: the expression applies hh, then bb, then aa, then kk — input operations inside-out, output operations outside-in. The tool computes the composition correctly whatever order you drag in.

Reading a transformed formula backwards into its four moves is the skill this tab drills — and it is precisely the skill needed for tangent lines under transformation, for graph sketching, and for every "describe the transformation" exam question ever set.