Sine Waves and the Music of Math
Sound, light, ocean tides, even the seasons — they all follow the same hidden pattern. That pattern is the sine wave, and once you see it, you will find it everywhere.
Meet the Sine Wave
Here is the simplest sine function: y = sin(x)
Notice the shape: it rises to 1, falls to -1, and repeats forever. One full cycle — from 0 up to 1, back down through 0 to -1, and back to 0 again — is called a period. For the basic sine function, the period is 2pi (about 6.28).
The wave is perfectly symmetric. The highest point (1) is the crest, the lowest point (-1) is the trough, and the distance from the center line to the crest is called the amplitude.
Notice that sin(0) = 0. The sine function starts at the origin and heads upward. This “starting behavior” will become important when we compare sine and cosine later.
Amplitude: How Tall Is the Wave?
The amplitude controls how tall or short the wave is. When we write y = A sin(x), the number A stretches the wave vertically.
- A > 1: The wave gets taller — it oscillates between -A and A.
- A < 1: The wave gets shorter — it shrinks toward the x-axis.
- A = 1: The original sine wave.
The gray curve in the background is the original sin(x) for comparison. The amplitude is always the distance from the center line to the peak, so the wave spans a total height of 2A.
In sound, amplitude corresponds to volume. A louder sound has a taller wave. A whisper has a small amplitude; a shout has a large one.
Frequency and Period: How Fast Does It Repeat?
Now let’s control how quickly the wave repeats. In y = sin(Bx), the number B compresses or stretches the wave horizontally.
- B > 1: The wave compresses — more cycles fit in the same space. The period gets shorter.
- B < 1: The wave stretches out — fewer cycles, longer period.
- Period = 2pi / B: This is the key formula. If B = 2, the period is pi (half as long), so the wave repeats twice as fast.
In sound, the frequency determines pitch. A high B value means more oscillations per second — a higher-pitched note. Double the frequency, and you go up exactly one octave.
Phase Shift: Sliding the Wave Left and Right
Sometimes the wave doesn’t start at the origin. In y = sin(x - C), the number C shifts the entire wave horizontally.
- C > 0: The wave shifts right.
- C < 0: The wave shifts left.
This is counterintuitive at first — a positive C moves the wave to the right, even though there is a minus sign in the formula. Think of it this way: sin(x - 2) = 0 when x = 2, so the “starting point” has moved from 0 to 2.
Try setting C to about 1.57 (which is pi/2). Compare the shifted wave to the original. Does the shape remind you of anything? Hint: look at the cosine section below!
Vertical Shift: Moving the Center Line
Finally, y = sin(x) + D moves the entire wave up or down. The number D shifts the center line (also called the midline) away from y = 0.
- D > 0: The wave floats above the x-axis.
- D < 0: The wave sinks below.
The wave oscillates between D - 1 and D + 1 (or more generally, between D - A and D + A when amplitude is involved).
The Full Equation: All Together Now
Here is the general sinusoidal function with all four transformations at once:
y = A sin(B(x - C)) + D
The gray reference curve is the plain sin(x) so you can always see how far you have transformed it.
Try building these specific waves:
- A tall, slow wave: A = 2.5, B = 0.5, C = 0, D = 0
- A fast, small wave shifted up: A = 0.5, B = 3, C = 0, D = 2
- A wave that starts at its peak: A = 1, B = 1, C = -1.57, D = 0 (why does this work?)
Sine vs. Cosine: Twins Separated at Birth
You may have noticed something in the phase shift section. Cosine is just sine shifted to the left by pi/2:
cos(x) = sin(x + pi/2)
Let’s see them side by side:
They are the exact same shape. The only difference is where they start:
- sin(0) = 0 — sine starts at the center line, heading up.
- cos(0) = 1 — cosine starts at its peak.
Cosine leads sine by a quarter cycle (pi/2 radians, or 90 degrees). In every other respect — amplitude, period, shape — they are identical.
This is why mathematicians sometimes say there is really only one trigonometric wave. Sine and cosine are just two names for the same curve, viewed from different starting points. Any cosine equation can be rewritten as a sine equation with a phase shift, and vice versa.
Why Does This Matter? The Real World Runs on Waves
Sine waves are not just a math class exercise. They show up everywhere:
Sound. Every musical note is a sine wave at a specific frequency. A guitar string vibrating at 440 Hz produces the note A above middle C — that is a sine wave completing 440 full cycles every second. Chords and complex sounds are just multiple sine waves added together (this idea is called Fourier analysis).
Light. Visible light is an electromagnetic wave. Different frequencies of the wave correspond to different colors — red light has a longer period, violet light has a shorter one.
Seasons. The temperature over the course of a year follows a roughly sinusoidal pattern. The amplitude is the difference between summer highs and winter lows, the period is 12 months, and the vertical shift is the average annual temperature.
Electricity. The AC power in your wall outlet alternates as a sine wave at 60 Hz (in the US). That is why it is called alternating current.
Orbits and Rotation. If you track the height of a point on a spinning wheel over time, you get a perfect sine wave. This is actually where the sine function comes from — it is the y-coordinate of a point moving around a circle.
Final challenge: The average daily temperature in a city follows roughly T(m) = A sin(B(m - C)) + D, where m is the month number (1 through 12). If the hottest month is July (m = 7) at 85 degrees F and the coldest is January (m = 1) at 35 degrees F, can you figure out A, B, C, and D? Use the combined sliders above to check your answer visually!
Hints: The period should be 12 months, so B = 2pi/12. The amplitude is half the difference between max and min. The vertical shift is the average of max and min.