In short
Vertical scaling: y = k\,f(x) stretches the graph away from the x-axis by a factor of k (if k > 1) or compresses it toward the x-axis (if 0 < k < 1). Horizontal scaling: y = f(kx) compresses the graph toward the y-axis by a factor of k (if k > 1) or stretches it away (if 0 < k < 1). As with translations, operations on the input act in the opposite direction.
A sitar string vibrates and produces a sound wave. On an oscilloscope, that wave is a smooth curve — say, y = \sin x. Now tighten the string: the pitch rises, the peaks get closer together, but the height of the wave stays the same. The curve has been squeezed horizontally. Turn up the amplifier instead: the peaks get taller, but the spacing stays the same. The curve has been stretched vertically.
Both of these are scaling transformations. A translation slides a graph to a new location without changing its shape. Scaling changes the shape itself — it stretches or compresses the curve, either in the horizontal direction, the vertical direction, or both.
Vertical scaling: y = k\,f(x)
Take the parabola f(x) = x^2. What does y = 2x^2 look like?
Build a quick table:
| x | f(x) = x^2 | 2f(x) = 2x^2 |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 2 |
| 2 | 4 | 8 |
| -1 | 1 | 2 |
Every y-value has doubled. The point (1, 1) on the original becomes (1, 2); the point (2, 4) becomes (2, 8). The x-coordinates are untouched — the curve has been pulled away from the x-axis in both directions.
Now look at y = \tfrac{1}{2}x^2:
| x | f(x) = x^2 | \tfrac{1}{2}f(x) |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 0.5 |
| 2 | 4 | 2 |
Every y-value has halved. The parabola has been pushed toward the x-axis — it looks wider and flatter.
The pattern:
Vertical scaling
The graph of y = k\,f(x), where k > 0, is the graph of y = f(x) scaled vertically by a factor of k.
- If k > 1: the graph is stretched away from the x-axis.
- If 0 < k < 1: the graph is compressed toward the x-axis.
Every y-coordinate is multiplied by k. Every x-coordinate stays the same. Points on the x-axis (where f(x) = 0) do not move — they are the "anchor" of the scaling.
Notice the anchor: the x-axis is the line of fixed points. If a point on the original graph sits on the x-axis, then y = 0 and k \cdot 0 = 0 — it stays put. Every other point moves away from or toward the x-axis.
Effect on domain and range
Vertical scaling does not change the domain (the x-values are untouched). The range is multiplied by k: if the original range is [a, b], the new range is [ka, kb].
Horizontal scaling: y = f(kx)
This is the one that — just like horizontal translation — acts in the opposite direction.
Take f(x) = x^2 again. What does y = (2x)^2 look like? Build a table:
| x | f(x) = x^2 | f(2x) = (2x)^2 = 4x^2 |
|---|---|---|
| 0 | 0 | 0 |
| 1 | 1 | 4 |
| 0.5 | 0.25 | 1 |
| -1 | 1 | 4 |
The value f(1) = 1 from the original now appears at x = 0.5 (since f(2 \times 0.5) = f(1) = 1). Every feature has been compressed toward the y-axis by a factor of 2.
And y = (x/2)^2 = f(x/2)? The value f(1) = 1 now appears at x = 2 (since f(2/2) = f(1) = 1). The curve has been stretched away from the y-axis by a factor of 2.
Horizontal scaling
The graph of y = f(kx), where k > 0, is the graph of y = f(x) scaled horizontally by a factor of \tfrac{1}{k}.
- If k > 1: the graph is compressed toward the y-axis (squeezed by factor k).
- If 0 < k < 1: the graph is stretched away from the y-axis (expanded by factor \tfrac{1}{k}).
Every x-coordinate is divided by k. Every y-coordinate stays the same. Points on the y-axis (where x = 0) do not move.
Why the horizontal scale acts backwards
The logic is the same as with horizontal translations: operations on the input behave opposite to what you expect.
When you write y = f(2x), the function at x = 3 evaluates f(2 \times 3) = f(6) — it is looking up the value that the original function produced at x = 6. The output that lived at x = 6 now appears at x = 3. Everything has moved closer to the y-axis by a factor of 2. Multiplying the input by 2 divides every x-position by 2.
Think of it as fast-forwarding a video. If you play a video at 2\times speed, every scene that appeared at minute 6 now appears at minute 3. The timeline is compressed by a factor of 2, even though you multiplied the playback rate by 2.
Effect on domain and range
Horizontal scaling divides the domain endpoints by k. If the original domain is [a, b], the new domain is [a/k,\; b/k]. The range is unchanged (the y-values stay the same).
This is the mirror image of vertical scaling, where the domain is unchanged but the range is multiplied.
Combined scaling: y = A\,f(Bx)
When both scalings act together, each operates independently on its own axis.
Take y = 3\sin(2x). Compared to y = \sin x:
- The factor A = 3 outside the function stretches the graph vertically by 3. The amplitude (peak height) goes from 1 to 3.
- The factor B = 2 inside the function compresses the graph horizontally by 2. The period goes from 2\pi to \pi.
The general rule for combined scaling:
- Vertical stretch by |A| (if |A| > 1) or compression (if |A| < 1).
- Horizontal compression by |B| (if |B| > 1) or stretch (if |B| < 1).
- The new period of a periodic function with period T becomes T / |B|.
- If A or B is negative, reflections are also involved — that is covered in the reflections article.
Scaling vs. translation: when both appear
A function like y = 2(x - 3)^2 + 1 combines translation and vertical scaling. The order matters here.
Start with f(x) = x^2. There are two correct ways to read the transformed function:
Reading 1 (inside-out): First translate, then scale vertically.
- Replace x with x - 3: shift right by 3. Now you have (x - 3)^2.
- Multiply by 2: stretch vertically by 2. Now you have 2(x - 3)^2.
- Add 1: shift up by 1. Now you have 2(x - 3)^2 + 1.
Reading 2 (vertex form): The vertex of the parabola is at (3, 1), and the "steepness" factor is 2. The vertex form y = a(x - h)^2 + k directly tells you the vertex (h, k) and the vertical scale a.
Both give the same graph: a parabola with vertex at (3, 1), opening upward with twice the steepness of x^2.
Two worked examples
Example 1: Scaling a known curve
The function f(x) = \sqrt{x} has the familiar half-parabola shape starting at the origin. Sketch y = 3\sqrt{x} and y = \sqrt{3x}, and explain how each differs from f.
Step 1. Analyse y = 3\sqrt{x} — this is 3\,f(x). The factor 3 is outside the function, so this is a vertical stretch by 3.
Why: multiplying the entire output by 3 pulls every point three times as far from the x-axis.
Step 2. Build key points for y = 3\sqrt{x}. At x = 1: y = 3\sqrt{1} = 3. At x = 4: y = 3\sqrt{4} = 6. At x = 9: y = 3\sqrt{9} = 9. Compare with f: (1, 1) \to (1, 3), (4, 2) \to (4, 6), (9, 3) \to (9, 9). The x-coordinates are unchanged; the y-coordinates are tripled.
Why: verifying with actual coordinates confirms the scaling factor and shows the domain has not changed.
Step 3. Analyse y = \sqrt{3x} — this is f(3x). The factor 3 is inside the function, so this is a horizontal compression by 3. Every feature arrives three times sooner along the x-axis.
Why: at x = 1, the function evaluates f(3) = \sqrt{3}, which is the value f originally had at x = 3. The point has moved from x = 3 to x = 1.
Step 4. Build key points for y = \sqrt{3x}. At x = 1/3: y = \sqrt{1} = 1. At x = 4/3: y = \sqrt{4} = 2. At x = 3: y = \sqrt{9} = 3. Compare with f: (1, 1) \to (1/3, 1), (4, 2) \to (4/3, 2), (9, 3) \to (3, 3). The y-coordinates are unchanged; every x-coordinate is divided by 3.
Why: the original domain [0, \infty) is compressed, but since it was [0, \infty) to begin with, it remains [0, \infty). For a finite domain, the endpoints would be divided by 3.
Result: y = 3\sqrt{x} is a vertical stretch by 3 (taller curve, same width). y = \sqrt{3x} is a horizontal compression by 3 (same height reached sooner, narrower curve). Both share the starting point (0, 0).
At x = 1, the vertically scaled curve is already at y = 3, while the original is at y = 1. The horizontally scaled curve reaches y = 1 at x = 1/3 instead of x = 1. Both transformations make the curve rise faster, but they do so in perpendicular directions.
Example 2: Finding amplitude and period
A sound wave is modelled by y = 5\sin(4x). Find the amplitude, the period, and describe the scaling compared to y = \sin x.
Step 1. Identify the vertical scaling factor. The coefficient outside the sine is 5, so A = 5. The graph is stretched vertically by 5. The original sine wave oscillates between -1 and 1; this one oscillates between -5 and 5.
Why: the amplitude of A\sin(\cdot) is |A|. Multiplying by 5 scales every output by 5.
Step 2. Identify the horizontal scaling factor. Inside the argument, x is multiplied by 4, so B = 4. The graph is compressed horizontally by 4.
Why: the factor inside the sine makes the wave cycle through its values four times as fast.
Step 3. Compute the period. The standard sine has period 2\pi. With B = 4, the new period is:
Why: the wave completes one full cycle when 4x goes from 0 to 2\pi, that is, when x goes from 0 to \pi/2.
Step 4. State the results. Amplitude: 5. Period: \pi/2. The wave is 5 times taller and completes a full cycle in one-quarter the distance.
Result: Amplitude = 5, period = \pi/2. Compared to \sin x, the graph is stretched vertically by 5 and compressed horizontally by 4.
Notice how four complete red cycles fit inside one blue cycle. The horizontal compression by 4 is visible: the wave repeats four times as often. The vertical stretch by 5 is visible: the peaks are five times taller.
Common confusions
-
"y = f(2x) stretches the graph horizontally by 2." No — it compresses the graph horizontally by 2. The factor is inside the function, so it acts opposite. To stretch horizontally by 2, you write y = f(x/2).
-
"Vertical and horizontal scaling look the same for x^2." They produce different-looking curves in general, but for x^2 specifically, y = c \cdot x^2 and y = (kx)^2 = k^2 x^2 are both just a vertical scaling. This is a special property of power functions, not a general rule. Try it with \sin x: stretching vertically and compressing horizontally produce visibly different curves.
-
"Scaling changes the x-intercepts." Vertical scaling does not move x-intercepts (because k \cdot 0 = 0). But horizontal scaling does: if f(a) = 0, then f(kx) = 0 at x = a/k. The roots are divided by k.
-
"The period formula T/k works only for sine and cosine." It works for any periodic function. If f has period T, then f(kx) has period T/k, regardless of the shape of f.
-
"A scale factor of k always means the graph gets bigger." Only for vertical scaling when k > 1. For horizontal scaling, k > 1 makes the graph narrower. Always ask: is the factor operating on the input or the output?
Going deeper
If you can identify vertical and horizontal scaling, find the new amplitude and period, and combine scaling with translations, you have the tools for the vast majority of graph-transformation questions. The rest of this section covers some finer points.
The general transformation template
Any transformation of y = f(x) can be written in the form:
Reading this from inside out:
- x - h: translate right by h
- B(x - h): scale horizontally by 1/|B| (compress if |B| > 1, stretch if |B| < 1)
- f(\ldots): evaluate the original function
- A\,f(\ldots): scale vertically by |A| (stretch if |A| > 1, compress if |A| < 1)
- +k: translate up by k
If A < 0, a reflection in the x-axis is also applied. If B < 0, a reflection in the y-axis is applied. These are covered in the reflections article.
Effect on key features
| Feature | Vertical scale by k | Horizontal scale by 1/k |
|---|---|---|
| x-intercepts | Unchanged | Divided by k |
| y-intercept | Multiplied by k | Unchanged |
| Domain [a, b] | Unchanged | [a/k, b/k] |
| Range [p, q] | [kp, kq] | Unchanged |
| Period T | Unchanged | T/k |
| Amplitude A | kA | Unchanged |
| Maximum value M | kM | Unchanged |
Interactive: scaling a sine wave
Drag the sliders below to adjust the vertical scale A and horizontal scale B for y = A\sin(Bx). Watch how the amplitude and period change.
Where this leads next
You now know how to scale any graph vertically, horizontally, or both. Combined with translations, you can position and resize almost any curve. The remaining transformations add one more ingredient: flipping.
- Graph Transformations — Reflections — flipping a graph across the x-axis or y-axis using y = -f(x) and y = f(-x). The "inside vs. outside" rule makes its final appearance.
- Graph Transformations — Translations — sliding a graph left/right or up/down. The foundation on which scaling builds.
- Graphs of Basic Functions — the parent functions that serve as the starting point for all transformations.
- Periodic Functions — scaling is especially important for periodic functions, where it changes the amplitude and period.
- Domain and Range — scaling transforms the domain and range in predictable ways.