Drag Height up and down first, then Repeat time on its own, and watch which way each one stretches the wave.
Height and repeat time
Height stretches the wave up and down; repeat time stretches or squeezes it sideways.
Describe this picture
One plot of a cosine wave over 4 seconds. The “Height” slider runs from 0.2 to 2 and the “Repeat time” slider from 0.25 to 2 seconds.
Height and repeat time
Push a child on a swing and let go. It rocks forward, back, forward, back, always the same amount of time between one forward point and the next. That steady back-and-forth, over and over, at the same beat, is what I mean by a sinusoid: the smooth, endlessly repeating wave you met as a “pure tone” on the page on decomposing signals. Now it gets a name and a notation.
Two numbers describe the swing’s motion completely, once you know it’s swinging at all. How far it swings out from the middle is its amplitude : a tall, wide swing versus a gentle nudge. How long one full forward-and-back takes is its period , in seconds: a slow, lazy swing versus a quick one.
Where does the shape itself come from? Picture a point going round a circle of radius 1 at a steady speed, and watch only its sideways position, left and right of the centre, as time goes by. It starts at the far right, glides to the far left, and comes back, over and over, tracing exactly the smooth wave you’ve been seeing. Mathematicians call that sideways position the cosine of the angle the point has turned through (and its up-down position the sine, which we’ll come back to). So a signal with height and period , where the point completes one lap every seconds, is
Here is time in seconds, is the amplitude (how far above and below the centre line the wave reaches), and is the period (how many seconds one repeat takes). At the wave starts at its highest point, , because ; it dips to at the bottom of its swing, then climbs back, closing one full repeat every seconds.
In the picture at the top of the page, Height is the amplitude and Repeat time the period . Notice height stretches the wave up and down only, and repeat time stretches or squeezes it sideways only: the same amplitude scaling and time scaling from Chapter 2, now applied to this one shape.
Repeats per second
A guitar string plucked to sound a concert A doesn’t repeat “every so many seconds” in a way anyone thinks about directly; it’s more natural to ask how many times it vibrates back and forth every second. That count is the frequency , measured in hertz (Hz), where one hertz means one repeat per second. Frequency and period describe the same wave two different ways, and one gives you the other by flipping it over: . A concert-A tone at 440 Hz repeats 440 times every second, so its period is s, about 2.27 milliseconds.
There’s a second, closely related number worth having. Instead of counting repeats, you can count how much angle the point on the circle turns through. Engineers measure angle in radians: one radian is the turn that moves the point along the circle by a distance equal to the radius. A full lap takes of those, so one full lap is , or equivalently radians; a cosine wave’s argument sweeps out exactly one full lap, radians, every period. Multiplying the frequency by converts “repeats per second” into “radians swept per second,” called the angular frequency:
For the 440 Hz tone, rad/s.
Drag Repeats per second (Hz) up and watch the readouts for repeat time and angular frequency .
Repeats per second
Frequency and period say the same thing two ways; raising frequency compresses the wave sideways.
Describe this picture
One plot of a cosine wave of height 1 over 4 seconds. The “Repeats per second (Hz)” slider runs from 0.25 to 4 Hz, and two readouts show “Repeat time T (seconds)” and “Angular frequency ω (radians/second)”.
Notice raising the frequency visibly compresses the wave sideways, exactly as shrinking repeat time did in the last instrument: frequency and period are two ways of saying the same thing, and just restates frequency in radians instead of Hz.
Where the wave starts
Release two identical pendulums a fraction of a second apart. Both swing at the same rate, with the same reach, but one is always a little ahead of the other: at any given moment, the leading one has already passed the point the trailing one is just reaching. That offset in time, not in shape or size, is called phase.
Sliding a wave left or right in time is exactly the shift operation from Chapter 2, applied inside the cosine’s argument: adding a phase (in radians, or equivalently in degrees) gives
A positive slides the wave earlier (it reaches its peak sooner), and a negative slides it later, the same “backwards feels like forwards” flip you already met with time shifts.
One particular phase value is worth knowing by sight: shifting a cosine by a quarter turn, radians, or , produces the sine wave. That’s exactly what “sine” is: a cosine, delayed by a quarter of one repeat.
Drag Starting point toward and watch the moving cosine trace against the fixed sine curve drawn alongside it.
Where the wave starts
Sliding the starting point slides the cosine trace; a sine curve is drawn for comparison.
Describe this picture
One plot over 3 seconds of a 1 Hz cosine of height 1, labelled “cosine (moves)”, and a fixed sine curve, labelled “sine (fixed)”. The “Starting point” slider sets the phase from to in steps of 5°.
Notice the cosine trace lands exactly on top of the sine curve right at : sine is cosine, delayed by a quarter cycle, nothing more exotic than that.
Measuring a wave every so often
Back in Chapter 1 you saw a signal built from measurements taken so many times a day. Do the same thing to a sinusoid: instead of watching it continuously, take a measurement (a sample) every seconds, at instants . Label each measurement by which one it is rather than when it happened: sample number instead of time . The continuous wave’s angular frequency , in radians per second, becomes a new quantity once you switch to counting samples instead of seconds: radians per sample, called the digital frequency ,
where is the sample rate in Hz (measurements per second). depends on both the tone’s own frequency and how fast you’re measuring it: the same 440 Hz tone has a different sampled at 8000 measurements a second than at 16000.
Drag Measurements per second (Hz) up and down and watch the sample dots on the curve, along with the readout.
Measuring a wave every so often
The underlying tone never changes, but Ω shrinks as the sample rate grows.
Describe this picture
One plot over 2 seconds of a 2 Hz tone with sample dots on it. The “Measurements per second (Hz)” slider runs from 6 to 40, and the readout “Ω (radians/sample)” gives the digital frequency to three decimals.
Notice the underlying continuous wave never changes, but shrinks as the sample rate grows: the same tone looks “slower,” in radians per sample, on a faster sampler.
One extra turn looks like none
Once you’ve committed to measuring only at whole-number instants , something new happens that never happens to the continuous wave: two different-looking digital frequencies can produce the exact same string of measurements. Cosine repeats every radians, and adding a whole to before multiplying by a whole number adds a whole number of extra full turns, landing on the identical value every time:
since is always a whole multiple of a full turn. A dot pattern dialled in at rad/sample is therefore identical to one dialled in at rad/sample, and since cosine is even, mirror-symmetric about zero just like the even signals in 1.2 (), that’s the same pattern you’d get from as well. So no discrete sinusoid is meaningfully “faster” than rad/sample: every has a twin inside the range that looks and sounds identical, sample for sample.
This is the same effect behind the old “wagon-wheel” illusion: a wheel’s spokes, seen only at flashes of strobe light, can look like they’re spinning slowly, or even backward, once the true spin outpaces how often you’re catching a glimpse of it.
Drag Digital frequency (radians/sample) past toward and watch the dot pattern, along with the folded readout.
One extra turn looks like none
Pushing Ω past π retraces the dot pattern of a lower, mirrored frequency.
Describe this picture
One plot of the sample-dot pattern, 16 samples, for the chosen . The “Digital frequency (radians/sample)” slider runs from 0 to , and the readout “Equivalent Ω, folded into (-π, π]” gives its twin.
Notice pushing past doesn’t make the pattern look “faster”; it retraces the pattern of a lower, mirrored frequency, until at exactly every dot lands back exactly where put it.
Does the dot pattern repeat?
Not every discrete sinusoid settles into a repeating pattern of samples at all. comes back to exactly the same value every samples only if whole turns of add up to a whole multiple of , that is, only if works out to a ratio of whole numbers, . If can’t be written as a ratio of whole numbers at all, the sequence never exactly repeats no matter how far out you look, even though it keeps looking wavy.
You already saw one case where this works out cleanly: the 440 Hz tone sampled at 8000 Hz has rad/sample. Since is already in lowest terms, that sampled tone is exactly periodic, and its period is samples: it takes exactly 200 measurements before the pattern starts over.
Drag Try a period across its range and watch the Result readout flip between “Period found” and “Not yet.”
Does the dot pattern repeat?
A whole-number period exists only if Ω/2π is a ratio of whole numbers.
Describe this picture
One plot of a fixed pattern of 40 sample dots, “original pattern”, with a copy in a second colour shifted left by samples. The “Try a period” slider sets from 1 to 16. The copy lands exactly on the original when is a true period, and the “Result” readout then says “Period found”; otherwise it says “Not yet”.
Notice some settings of find a small matching almost immediately, while nearby settings may need a much larger , or never find one at all, before the pattern lines back up with itself.
The maths behind it · polar coordinates
A sinusoid’s amplitude and phase are a length and an angle: two numbers that pin down one point in a flat plane. Describing the same point by “how far across, how far up” instead is the kind of change of description linear algebra is built on, and 3.3 uses exactly this picture.
Worked example
Take the concert-A tone at Hz, sampled at Hz.
- Period and angular frequency. s, and rad/s.
- Digital frequency. rad/sample. Since is already in lowest terms, the sampled sequence is exactly periodic with period samples.
- A frequency-ambiguity check. A tone dialled in digitally at rad/sample produces the identical sample sequence as one at rad/sample, whose positive equivalent (cosine being even) is rad/sample: and sound and sample exactly the same.
Where you’ll meet this
Phase and frequency, written as a single spinning point instead of a plain wave, become the phasor in the next lesson, 3.4, the picture that makes adding sinusoids together a matter of adding arrows. Chapter 7’s Fourier series builds any repeating signal out of sinusoids exactly like these, at multiples of one base frequency. And the digital frequency’s ambiguity you just saw is the very same idea Chapter 10 states as a rate, in the sampling theorem.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Period, frequency | in seconds, in Hz (cycles/second) | |
| Angular frequency | radians/second | |
| Continuous sinusoid | : amplitude, : phase | |
| Sine from cosine | a quarter-cycle () shift | |
| Digital frequency | radians/sample | |
| Discrete sinusoid | : sample number | |
| Frequency ambiguity | and are identical | unique range |
| Periodicity condition | integer period exists iff | a ratio of whole numbers |