Transforming Trig Graphs

You already know the shape of the three trig graphs: the smooth waves of \sin(x) and \cos(x), and the repeating spikes of \tan(x). Now we learn to reshape them — make a wave taller, squash it up so more of it fits, slide it sideways, or lift the whole thing up — all by changing four numbers.

Every one of these moves lives in a single master formula. Take \sin as our example:

y = a\,\sin(bx + c) + d

Each letter controls one transformation, and only one:

The same four numbers work for y = a\,\cos(bx + c) + d and y = a\,\tan(bx + c) + d in exactly the same way. We work in degrees here; in radians the only change is that a plain period of 360^\circ becomes 2\pi, so the period is \dfrac{2\pi}{b}.

sun

Think of the hours of daylight where you live, plotted across a whole year. Deep winter is short and dark, midsummer is long and bright, and it swings smoothly between the two — a perfect sine wave. The amplitude a is how extreme your seasons are (huge near the poles, tiny at the equator), the period is one year, and the vertical shift d is your average day length, about 12 hours. Nature is transforming a trig graph for you every single day.

Three worked examples

Each example changes just one letter, so you can see its effect on its own.

Two traps catch almost everyone:

Stretch and shift it yourself

The faint dashed curve is the plain \sin(x) for comparison; the bold curve is y = a\,\sin(bx) + d. Drag the sliders below and watch it respond: a makes it taller, b squashes it so more waves fit, and d lifts the whole thing up or down. The angle x runs along the bottom in degrees.

singing bird

When a bird sings, it pushes the air into a trig wave. The amplitude a is how loud the note is — a big amplitude is a big sound. The frequency b is how high the pitch is — squash the wave so it repeats faster and the pitch rises; stretch it out and the pitch drops. Every note you have ever heard is a\,\sin(bx) with the knobs set to different values.

Ready to layer these moves on top of each other? See how they all connect back to the base shapes in Properties of sin(x).