Skip to content
AI360Xpert
Beta

Periodicity and Waves

A periodic function repeats one shape forever, so a whole infinite wave is described by just three numbers: height, length of repeat, and shift.

The wave 2 sine theta peaks at 2 every 360 degrees, so amplitude sets the height and the period sets the spacing of repeats
The wave 2 sine theta peaks at 2 every 360 degrees, so amplitude sets the height and the period sets the spacing of repeats

Why Does This Exist?

Sound, light, seasons, heartbeats, and alternating current all repeat. Machine learning meets repetition in audio waveforms, seasonal demand, rotating machinery vibration, and the positional encodings that label word order with sinusoids. Treating each repetition as a new event would be endless; periodicity says one copy of the shape plus a repeat rule describes the entire infinite signal.

The payoff is compression of description. Three numbers, amplitude, period, and phase, pin down a pure wave completely, and sums of such waves describe everything else (the Fourier idea). This page teaches the vocabulary of repetition and the anatomy of a wave. The circular origin is in sine, cosine, tangent; the decomposition of complex signals continues in the Fourier transform.

The one idea you need first

A function ff is periodic with period TT if f(x+T)=f(x)f(x + T) = f(x) for every xx: shifting by TT changes nothing. Sine has period 360°360° (2π2\pi radians). The period is the length of one repeat, measured on the input axis.

Think of It Like This

A picket fence in fog

You stand before a long picket fence in fog, able to see only a few pickets. Every picket looks like its neighbours: same height, same spacing, same paint. Once you measure one picket and the gap to the next, you know the whole fence without walking it.

Amplitude is the picket height, period is the gap between matching edges, and phase is where you happen to be standing along the row. A wave with a dented picket is still fully described the same way, as long as every picket carries the same dent. The analogy stops at sums: real signals layer several fences at once, and separating them needs Fourier tools.

How It Actually Works

A pure wave with amplitude AA, period TT, and phase shift ϕ\phi (phi) is:

y=Asin⁡(2πTx+ϕ)y = A \sin\left(\frac{2\pi}{T} x + \phi\right)

In plain words: AA is the peak height above the middle line; TT is the input length of one full repeat; ϕ\phi slides the whole shape left or right; xx is the input (time, angle, position). Frequency f=1/Tf = 1/T counts repeats per unit input, and angular frequency ω=2π/T\omega = 2\pi/T (omega) counts radians per unit. Higher frequency means shorter period: they are reciprocals, not synonyms.

Phase deserves care because it confuses: shifting ϕ\phi by 2π2\pi returns the identical wave, and a cosine is just a sine with ϕ=π/2\phi = \pi/2. Phase matters only relative to another wave, where matching or opposing peaks decide interference.

Worked example

Take y=2sin⁡θy = 2 \sin \theta in degrees, so A=2A = 2, T=360°T = 360°, ϕ=0\phi = 0:

  • Peak: sin⁡90°=1\sin 90° = 1, so y=2y = 2. Next peak at 90°+360°=450°90° + 360° = 450°, also 2.
  • Zero crossings: θ=0°,180°,360°\theta = 0°, 180°, 360°, … where sine is 0.
  • Trough: sin⁡270°=−1\sin 270° = -1, so y=−2y = -2.
  • Frequency: 1/3601/360 repeats per degree; angular frequency 2π/360=π/1802\pi/360 = \pi/180 radians per degree.

Check the repeat rule: y(90°+360°)=2sin⁡450°=2×1=2=y(90°)y(90° + 360°) = 2\sin 450° = 2 \times 1 = 2 = y(90°). The value at 450 degrees equals the value at 90, exactly as periodicity promises.

Watch Out For

Confusing period with frequency

Period is seconds per repeat, frequency is repeats per second, and swapping them inverts the answer: a 50 Hz hum has period 0.02 s, not 50 s. Code with the reciprocal mistake samples 2500x too slowly or generates a wave 2500x too fast.

Always carry the unit: write period_s or freq_hz in variable names, and quick-check with "more repeats per second means shorter repeats" before running anything long.

Ignoring phase when comparing two waves

Two identical waves shifted by half a period sum to zero, not to double. Averaging signals or adding a prediction to a seasonal baseline without aligning phase cancels the very pattern you wanted to keep.

Plot the sum, not just the parts, and check whether peaks line up. If cancellation appears where reinforcement was expected, the amplitudes were right and the phases disagreed.

The Quick Version

  • Periodic means f(x+T)=f(x)f(x + T) = f(x): one repeat describes the whole signal.
  • Amplitude is the peak height, period is the repeat length, phase is the shift.
  • Frequency 1/T1/T and period are reciprocals; angular frequency is 2π/T2\pi/T.
  • 2sin⁡θ2\sin \theta peaks at 2 every 360 degrees with zeros at multiples of 180.
  • Cosine is sine shifted by a quarter period, so phase is relative, not absolute.
  • Name units on periods and frequencies, and align phases before adding waves.