Start with f(x)=x2 and the points (1,1), (2,4), (3,9). The function 3f(x)=3x2 keeps each input and triples each output: (1,3), (2,12), (3,27). Every point moves straight away from the x-axis by a factor of 3, and points on the axis, such as (0,0), stay put. That is a vertical stretch.
A multiplier inside acts on the input, so it works backward. For g(x)=f(2x)=(2x)2, the output 4 that f reached at x=2 now arrives at x=1, because 2⋅1=2. Every feature arrives at half the input, so the graph is squeezed toward the y-axis by a factor of 21, and f(2x) would stretch it to twice the width. For waves, the width of one cycle is the period: sin2x completes a cycle in π instead of 2π.
Adding is not scaling. x2+3 lifts every point by the same 3 units, so the vertex moves from (0,0) to (0,3); 3x2 multiplies, so the vertex stays at (0,0) and points farther from the axis move farther. A negative multiplier scales and flips at once: −2f(x) doubles every distance from the x-axis and reflects the graph across it.
Think of it like this. Vertical scaling is turning up the volume on a sound wave: every crest and trough grows in proportion, and silence stays silent. Horizontal scaling is playing the recording faster: f(2x) plays at double speed, so each cycle takes half as long. With real audio the pitch rises too, which on the graph simply means a shorter period.
Core idea. Scaling multiplies a function's output (vertical) or input (horizontal) by a constant, changing its size or period but not its essential shape.