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.

Vertical scaling of y equals x squaredThree parabolas on the same axes. The original y equals x squared is dashed. The curve y equals 2 x squared is narrower and taller. The curve y equals one-half x squared is wider and flatter. All share the vertex at the origin. x y 1 2 3 −1 −2 −3 1 2 3 4 2x² x² (dashed) ½x²
Vertical scaling of $y = x^2$. Multiplying by 2 pulls the curve away from the $x$-axis (narrower parabola). Multiplying by $\tfrac{1}{2}$ pushes it toward the $x$-axis (wider parabola). The vertex stays fixed at the origin.

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 of y equals x squaredThree parabolas on the same axes. The original y equals x squared is dashed. The curve y equals (2x) squared is narrower, compressed toward the y-axis. The curve y equals (x over 2) squared is wider, stretched away from the y-axis. x y 1 2 3 −1 −2 −3 1 2 3 4 (2x)² x² (dashed) (x/2)²
Horizontal scaling of $y = x^2$. Replacing $x$ with $2x$ compresses the curve toward the $y$-axis (narrower). Replacing $x$ with $x/2$ stretches it away from the $y$-axis (wider). The vertex stays fixed.

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.

Summary of direction rules for scalingTwo boxes. Left box: y = k times f(x), k greater than 1 stretches vertically, k between 0 and 1 compresses vertically. Right box: y = f(kx), k greater than 1 compresses horizontally, k between 0 and 1 stretches horizontally. A note says operations on x act opposite. y = k f(x) k > 1 → stretch UP 0 < k < 1 → compress acts on y: same direction y = f(kx) k > 1 → compress 0 < k < 1 → stretch acts on x: opposite direction
Vertical scaling (left) acts in the intuitive direction. Horizontal scaling (right) acts opposite: multiplying the input by $k$ divides the width by $k$.

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:

Combined scaling of y equals sin xTwo sine curves. The original y equals sin x is dashed with amplitude 1 and period 2 pi. The curve y equals 3 sin 2x has amplitude 3 and period pi, shown in red. x y 3 2 1 −1 −2 −3 π/2 π sin x 3 sin 2x
Combined scaling. The dashed curve $y = \sin x$ has amplitude 1 and period $2\pi$. The red curve $y = 3\sin 2x$ has amplitude 3 (vertically stretched $\times 3$) and period $\pi$ (horizontally compressed $\times 2$).

The general rule for combined scaling:

y = A\,f(Bx)

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.

  1. Replace x with x - 3: shift right by 3. Now you have (x - 3)^2.
  2. Multiply by 2: stretch vertically by 2. Now you have 2(x - 3)^2.
  3. 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.

Graph of y equals 2 times (x minus 3) squared plus 1Two parabolas. The original y equals x squared is dashed. The transformed parabola y equals 2 times (x minus 3) squared plus 1 is in red, with vertex at (3, 1), narrower than the original. x y 1 2 3 4 5 1 2 3 4 5 (3, 1) 2(x−3)² + 1
The dashed curve $y = x^2$ has its vertex at the origin. The red curve $y = 2(x-3)^2 + 1$ is vertically stretched by 2 (narrower) and translated to have its vertex at $(3, 1)$.

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).

Graphs of 3 root x and root 3x compared to root xThree curves starting at the origin. The dashed original y equals root x rises slowly. The red curve y equals 3 root x rises three times faster vertically. The dark curve y equals root 3x reaches the same heights as root x but at one-third the x-values. x y 1 3 4 7 9 1 2 3 5 (1, 3) (1, 1) √x (dashed) 3√x √(3x)
The dashed curve is $y = \sqrt{x}$. The red curve $y = 3\sqrt{x}$ is stretched vertically — same $x$-positions, triple the height. The dark curve $y = \sqrt{3x}$ is compressed horizontally — same heights, one-third the $x$-positions.

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:

T = \frac{2\pi}{|B|} = \frac{2\pi}{4} = \frac{\pi}{2}

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.

Graph of y equals 5 sin 4x compared to sin xTwo sine curves. The dashed y equals sin x has amplitude 1 and period 2 pi. The red y equals 5 sin 4x has amplitude 5 and period pi over 2, oscillating much faster and taller. x y 5 1 −1 −5 π/4 π/2 π 3π/2 sin x 5 sin 4x
The dashed curve $y = \sin x$ has amplitude 1 and period $2\pi$. The red curve $y = 5\sin 4x$ oscillates between $-5$ and $5$ (amplitude 5) and completes a full cycle every $\pi/2$ (period quartered). Four red cycles fit inside one dashed cycle.

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

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:

y = A\,f(B(x - h)) + k

Reading this from inside out:

  1. x - h: translate right by h
  2. B(x - h): scale horizontally by 1/|B| (compress if |B| > 1, stretch if |B| < 1)
  3. f(\ldots): evaluate the original function
  4. A\,f(\ldots): scale vertically by |A| (stretch if |A| > 1, compress if |A| < 1)
  5. +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.

Interactive scaling of a sine waveA sine wave y equals A sin Bx where A and B can be adjusted by dragging. The amplitude and period update in real time. x y 1 2 3 4 5 6 drag the peak
Drag the peak of the red wave to see how the amplitude changes. The dashed curve is the standard $y = \sin x$ for reference.

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.