1. Why transformations are worth learning
Every quadratic is a transformation of $y = x^2$. Every sinusoid is a transformation of $y = \sin x$. Every exponential decay curve is a transformation of $y = e^{-x}$. Precalculus is, in large part, an inventory of parent functions together with the rules for deforming them.
Once you have the rules, you no longer need a table of values to sketch $y = 2\sin\!\bigl(3(x - \pi/6)\bigr) + 1$. You see the parent ($\sin$), the amplitude ($2$), the period ($2\pi/3$), the phase shift ($\pi/6$ right), and the vertical offset ($+1$), and you draw it. Calculus then leans on the same idea: shifts don't change derivatives, stretches scale them, reflections flip their sign.
A transformation is a function on functions — a rule that takes one graph in and gives a related graph out.
2. The five basic transformations
Throughout this section, $f$ is some parent function whose graph you already know. The transformed function — always called $g$ — is built from $f$ by a single algebraic move.
Adds $k$ to every output. The graph moves up by $k$ when $k > 0$, down when $k < 0$. Intuitive: you change every $y$, so the picture slides vertically.
The graph moves right by $h$ when $h > 0$, left when $h < 0$. The sign is counter-intuitive: the "$-h$" inside produces a rightward shift. We unpack why below.
Multiplies every output by $a$. For $|a| > 1$, the graph is taller (stretched). For $0 < |a| < 1$, it's flatter (compressed). If $a < 0$, there's an additional reflection across the $x$-axis. Intercepts with the $x$-axis don't move; everything else scales vertically.
Replaces $x$ with $bx$ inside the function. For $|b| > 1$ the graph compresses horizontally (counter-intuitive!); for $0 < |b| < 1$ it stretches by $1/|b|$. If $b < 0$, there's an additional reflection across the $y$-axis. Intercepts with the $y$-axis don't move; everything else scales horizontally.
$-f(x)$ flips the graph across the $x$-axis (negates every $y$). $f(-x)$ flips it across the $y$-axis (negates every $x$). These are the $a = -1$ and $b = -1$ special cases of the stretches above.
Outside the function ($+k$, $a\cdot$, $-$) acts on outputs and does what you'd expect. Inside the function ($-h$, $b\cdot$, $-x$) acts on inputs and does the opposite of what naive algebra suggests — it shifts the graph the wrong way, scales it the wrong way, and reflects across the other axis. This single rule absorbs most of the confusion in this topic.
Why "inside" inverts
Take horizontal shift. To plot $g(x) = f(x - 2)$ at the input $x = 5$, you compute $f(5 - 2) = f(3)$. The graph of $g$ at $x = 5$ takes the value $f$ had at $x = 3$. Every point on $f$ shows up on $g$ shifted to the right by $2$, because we had to feed in an $x$ that was $2$ larger to reach the same output. The "$-2$" inside is doing a corrective right-shift to the input.
The same logic explains horizontal compression: $g(x) = f(2x)$ at $x = 1$ equals $f(2)$. The graph reaches $f$'s value-at-$2$ already at $x = 1$ — it's racing through $f$'s landscape twice as fast, which compresses the picture horizontally.
3. Gallery: $f(x) = x^2$ and its transforms
One plot, six curves. The dashed grey curve is the parent $f(x) = x^2$. Each colored curve shows a single transformation applied to it. Compare each to the parent and to itself at $x = 0$ and $x = 1$ to see exactly how the rule moved which feature.
The parent and the vertical-shift curve are congruent — same width, same opening. The horizontal-shift curve is also congruent — same shape, different location. The stretches change shape: stretched curves climb faster, compressed ones climb slower. The reflection flips the whole thing upside down. Shifts move; stretches deform; reflections flip.
4. The general form $a\,f\!\bigl(b(x - h)\bigr) + k$
Putting all five moves into one equation:
$$ y = a \cdot f\!\bigl(b(x - h)\bigr) + k $$Read it like this:
| Parameter | Where it sits | What it does |
|---|---|---|
| $a$ | outside, multiplying | Vertical stretch by $|a|$; reflect across $x$-axis if $a < 0$. |
| $k$ | outside, adding | Vertical shift by $k$ (up if positive). |
| $b$ | inside, multiplying $x$ | Horizontal scale by $1/|b|$ (compress if $|b| > 1$); reflect across $y$-axis if $b < 0$. |
| $h$ | inside, subtracted from $x$ | Horizontal shift by $h$ (right if positive). |
The form deliberately writes the inside as $b(x - h)$, not $bx - h$. Why? Because $b(x - h)$ factors the horizontal operations cleanly into "scale by $b$, then shift by $h$." Written as $bx - bh$ the shift gets entangled with the scale and is much harder to read off. We'll see this distinction bite in the next section.
$y = -3\bigl(2(x + 1)\bigr)^2 - 4$ has $a = -3$, $b = 2$, $h = -1$, $k = -4$. So starting from $y = x^2$: horizontal compression by $2$, shift left $1$, vertical stretch by $3$ with a flip, shift down $4$.
5. Order matters
Function composition is non-commutative, and transformations are functions on functions, so order matters. The classic demonstration: starting from $y = x$, apply (i) vertical stretch by $2$ and (ii) vertical shift up by $3$, in both orders.
Two orderings, two answers
| Order | Step 1 | Step 2 | Final equation | $y$ at $x = 0$ |
|---|---|---|---|---|
| Stretch, then shift | $y = x \;\longrightarrow\; y = 2x$ | $y = 2x \;\longrightarrow\; y = 2x + 3$ | $y = 2x + 3$ | $3$ |
| Shift, then stretch | $y = x \;\longrightarrow\; y = x + 3$ | $y = x + 3 \;\longrightarrow\; y = 2(x + 3) = 2x + 6$ | $y = 2x + 6$ | $6$ |
The two graphs are not the same line. They have the same slope ($2$), but different intercepts ($3$ vs. $6$). When you stretch first, the later shift is "pure" — added on top. When you shift first, the stretch amplifies the shift along with everything else, doubling it.
The convention that prevents the trap
To get a well-defined answer, fix an order. The standard one, which exactly matches the general form $a\,f(b(x - h)) + k$, is:
- Horizontal operations first (inside the function): horizontal scale by $b$, then horizontal shift by $h$.
- Vertical operations second (outside the function): vertical scale by $a$, then vertical shift by $k$.
Each "scale then shift" subgroup goes in that order — scale first — because the alternative ends up doubling the shift, as we just saw.
The expression $f(2x - 4)$ does not read directly as "stretch then shift right $4$." Factor first: $f\bigl(2(x - 2)\bigr)$. Now the shift is unambiguous — right by $2$, not $4$. Always factor the horizontal coefficient out before reading off $h$.