Skip to content

Sinusoids

Name the smooth repeating wave from Chapter 2, read off its amplitude, frequency and phase, and meet its sampled, discrete-time twist.

Before thisImpulse, step and ramp (3.1)

Before this3.1
Chapter 3 · Lesson 2 of 4

First, the picture

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.

1.00
1.00
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 AA: a tall, wide swing versus a gentle nudge. How long one full forward-and-back takes is its period TT, 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 AA and period TT, where the point completes one lap every TT seconds, is

x(t)=Acos⁡ ⁣(2πtT)x(t) = A\cos\!\left(\frac{2\pi t}{T}\right)

Here tt is time in seconds, AA is the amplitude (how far above and below the centre line the wave reaches), and TT is the period (how many seconds one repeat takes). At t=0t=0 the wave starts at its highest point, AA, because cos⁡(0)=1\cos(0)=1; it dips to −A-A at the bottom of its swing, then climbs back, closing one full repeat every TT seconds.

In the picture at the top of the page, Height is the amplitude AA and Repeat time the period TT. 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 ff, 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: f=1/Tf = 1/T. A concert-A tone at 440 Hz repeats 440 times every second, so its period is T=1/440=0.0022727T = 1/440 = 0.0022727 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 2π≈6.282\pi \approx 6.28 of those, so one full lap is 360°360°, or equivalently 2π2\pi radians; a cosine wave’s argument sweeps out exactly one full lap, 2π2\pi radians, every period. Multiplying the frequency by 2π2\pi converts “repeats per second” into “radians swept per second,” called the angular frequency:

ω=2πf\omega = 2\pi f

For the 440 Hz tone, ω=2π(440)=2764.60\omega = 2\pi(440) = 2764.60 rad/s.

Drag Repeats per second (Hz) up and watch the readouts for repeat time TT and angular frequency ω\omega.

Repeats per second

Frequency and period say the same thing two ways; raising frequency compresses the wave sideways.

1.00
Repeat time T (seconds)
1.000
Angular frequency ω (radians/second)
6.28
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 ω\omega 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 ϕ\phi (in radians, or equivalently in degrees) gives

x(t)=Acos⁡(2πft+ϕ)x(t) = A\cos(2\pi f t + \phi)

A positive ϕ\phi slides the wave earlier (it reaches its peak sooner), and a negative ϕ\phi 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, ϕ=−π/2\phi = -\pi/2 radians, or −90°-90°, produces the sine wave. That’s exactly what “sine” is: a cosine, delayed by a quarter of one repeat.

sin⁡θ=cos⁡(θ−π/2)\sin\theta = \cos(\theta - \pi/2)

Drag Starting point toward −90°-90° 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.

0 °
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 −180°-180° to 180°180° in steps of 5°.

Notice the cosine trace lands exactly on top of the sine curve right at −90°-90°: 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 TsT_s seconds, at instants 0,Ts,2Ts,3Ts,…0, T_s, 2T_s, 3T_s, \ldots. Label each measurement by which one it is rather than when it happened: sample number n=0,1,2,3,…n = 0, 1, 2, 3, \ldots instead of time tt. The continuous wave’s angular frequency ω\omega, in radians per second, becomes a new quantity once you switch to counting samples instead of seconds: radians per sample, called the digital frequency Ω\Omega,

Ω=ωTs=2πffs\Omega = \omega T_s = \frac{2\pi f}{f_s}

where fs=1/Tsf_s = 1/T_s is the sample rate in Hz (measurements per second). Ω\Omega depends on both the tone’s own frequency and how fast you’re measuring it: the same 440 Hz tone has a different Ω\Omega 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 Ω\Omega readout.

Measuring a wave every so often

The underlying tone never changes, but Ω shrinks as the sample rate grows.

10
Ω (radians/sample)
1.257
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 Ω\Omega 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 nn, 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 2π2\pi radians, and adding a whole 2π2\pi to Ω\Omega before multiplying by a whole number nn adds a whole number of extra full turns, landing on the identical value every time:

cos⁡((Ω+2π)n)=cos⁡(Ωn+2πn)=cos⁡(Ωn)\cos\big((\Omega + 2\pi)n\big) = \cos(\Omega n + 2\pi n) = \cos(\Omega n)

since 2πn2\pi n is always a whole multiple of a full turn. A dot pattern dialled in at Ω=1.8π\Omega = 1.8\pi rad/sample is therefore identical to one dialled in at Ω=1.8π−2π=−0.2π\Omega = 1.8\pi - 2\pi = -0.2\pi rad/sample, and since cosine is even, mirror-symmetric about zero just like the even signals in 1.2 (cos⁡(−θ)=cos⁡(θ)\cos(-\theta)=\cos(\theta)), that’s the same pattern you’d get from Ω=0.2π\Omega = 0.2\pi as well. So no discrete sinusoid is meaningfully “faster” than π\pi rad/sample: every Ω\Omega has a twin inside the range (−π,π](-\pi, \pi] 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 π\pi toward 2π2\pi 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.

0.50π
Equivalent Ω, folded into (-π, π]
0.50π
Describe this picture

One plot of the sample-dot pattern, 16 samples, for the chosen Ω\Omega. The “Digital frequency (radians/sample)” slider runs from 0 to 2π2\pi, and the readout “Equivalent Ω, folded into (-π, π]” gives its twin.

Notice pushing Ω\Omega past π\pi doesn’t make the pattern look “faster”; it retraces the pattern of a lower, mirrored frequency, until at exactly 2π2\pi every dot lands back exactly where Ω=0\Omega = 0 put it.

Does the dot pattern repeat?

Not every discrete sinusoid settles into a repeating pattern of samples at all. x[n]=cos⁡(Ωn)x[n]=\cos(\Omega n) comes back to exactly the same value every NN samples only if NN whole turns of Ω\Omega add up to a whole multiple of 2π2\pi, that is, only if Ω/2π\Omega/2\pi works out to a ratio of whole numbers, k/Nk/N. If Ω/2π\Omega/2\pi 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 Ω=2π(440/8000)=2π(11/200)=0.34558\Omega = 2\pi(440/8000) = 2\pi(11/200) = 0.34558 rad/sample. Since 11/20011/200 is already in lowest terms, that sampled tone is exactly periodic, and its period is N=200N=200 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.

original patterncopy shifted by N=1
N = 1
Result
Not yet
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 NN samples. The “Try a period” slider sets NN from 1 to 16. The copy lands exactly on the original when NN is a true period, and the “Result” readout then says “Period found”; otherwise it says “Not yet”.

Notice some settings of Ω\Omega find a small matching NN almost immediately, while nearby settings may need a much larger NN, 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 f=440f=440 Hz, sampled at fs=8000f_s=8000 Hz.

  1. Period and angular frequency. T=1/f=1/440=0.0022727T = 1/f = 1/440 = 0.0022727 s, and ω=2πf=2π(440)=2764.60\omega = 2\pi f = 2\pi(440) = 2764.60 rad/s.
  2. Digital frequency. Ω=2πf/fs=2π(440/8000)=2π(11/200)=0.34558\Omega = 2\pi f/f_s = 2\pi(440/8000) = 2\pi(11/200) = 0.34558 rad/sample. Since 11/20011/200 is already in lowest terms, the sampled sequence is exactly periodic with period N=200N=200 samples.
  3. A frequency-ambiguity check. A tone dialled in digitally at Ω=1.8π\Omega = 1.8\pi rad/sample produces the identical sample sequence as one at Ω=1.8π−2π=−0.2π\Omega = 1.8\pi - 2\pi = -0.2\pi rad/sample, whose positive equivalent (cosine being even) is 0.2π0.2\pi rad/sample: 1.8π1.8\pi and 0.2π0.2\pi 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 2π2\pi ambiguity you just saw is the very same idea Chapter 10 states as a rate, in the sampling theorem.

Reference card

QuantityFormulaNotes
Period, frequencyT=1/fT=1/fTT in seconds, ff in Hz (cycles/second)
Angular frequencyω=2πf\omega=2\pi fradians/second
Continuous sinusoidx(t)=Acos⁡(2πft+ϕ)x(t)=A\cos(2\pi f t+\phi)AA: amplitude, ϕ\phi: phase
Sine from cosinesin⁡θ=cos⁡(θ−π/2)\sin\theta=\cos(\theta-\pi/2)a quarter-cycle (90°90°) shift
Digital frequencyΩ=ωTs=2πf/fs\Omega=\omega T_s = 2\pi f/f_sradians/sample
Discrete sinusoidx[n]=Acos⁡(Ωn+ϕ)x[n]=A\cos(\Omega n+\phi)nn: sample number
Frequency ambiguityΩ\Omega and Ω+2πk\Omega+2\pi k are identicalunique range Ω∈(−π,π]\Omega\in(-\pi,\pi]
Periodicity conditioninteger period NN exists iff Ω/2π=k/N\Omega/2\pi=k/Na ratio of whole numbers

End of lesson 3.2

Where to go next.

Phasorium
LibraryEvery lesson, in order

Parts

About Phasorium
Look