Analysis

When two circular motions come home

Drive a point across with one sine wave and up and down with another. If the two frequencies are in a whole-number ratio the point retraces a closed figure whose crossings can be counted in advance — 2pq − p − q of them — and if they are not, it never comes back and fills the square, spending twenty times longer in the corners than in the middle.

Worth reading first: The angle that is really an area.

The circle seen from the side is a sine wave. Seen from below it is a cosine wave — the same motion projected onto the other axis. Put the two projections back together, one on each axis, and the point retraces the circle it came from.

A circle unrolled into a sine wave. On the left a radius turns through an angle; on the right the height of its tip is plotted against the angle, tracing a sine curve.
Fig. 1 A point on the unit circle at 45 degrees with both of its shadows traced: the height as sin\sin, solid, and the horizontal position as cos\cos, dashed. Two waves of the same frequency, a quarter-period apart, which together are the circle.

That reassembly works because the two waves have the same frequency. Give them different frequencies — drive the point across at one rate and up and down at another — and the path it traces is no longer a circle. It is a Lissajous figure, after Jules Antoine Lissajous, who in 1857 bounced light off mirrors attached to two tuning forks at right angles and watched the spot on a wall draw them. Nathaniel Bowditch had described the same curves in 1815 for a pendulum swinging differently in two directions.

The figures are pretty, and they were for a century the standard way to compare two frequencies — an oscilloscope with one signal on each axis draws one. They also answer a clean question with a clean count, and the count is what this essay is about.

Coming home

Take x=sin(pt+φ)x = \sin(pt + \varphi) and y=sin(qt)y = \sin(qt). The first returns to its starting value after any whole multiple of 2π/p2\pi/p, the second after any multiple of 2π/q2\pi/q. The point returns to where it started — and from then on repeats — exactly when some time is a multiple of both, which happens precisely when p/qp/q is a ratio of whole numbers.

When it is, write it in lowest terms, with pp and qq sharing no factor. Then the first common period is 2π2\pi: in that time the horizontal motion completes pp oscillations and the vertical motion qq. A rational ratio closes; an irrational one never does. That is the same dichotomy as a circle rotated by a rational or an irrational angle, and for a reason: the pair of phases (pt,qt)(pt, qt) is a point moving in a straight line on a torus, and the Lissajous figure is that line’s shadow.

The Lissajous figure with frequencies 1 and 2. The curve x = sin(1t + 0.3), y = sin(2t) for one full period, drawn in a square, with its 1 self-crossings marked. A generic figure with coprime frequencies p and q crosses itself 2pq − p − q times.
Fig. 2 Frequencies 1 across and 2 up and down, with a small phase offset: one oscillation across while two go up and down, closing after one full turn. The curve crosses itself once, marked, touches the left and right sides once each and the top and bottom twice each.

Reading the ratio off the edges

The figure touches the sides of its bounding square, and those touches are where the frequency ratio can be read without counting anything else.

The horizontal coordinate reaches +1+1 once per horizontal oscillation and 1-1 once, so in the full period the curve touches the right side pp times and the left side pp times. The vertical coordinate touches the top and bottom qq times each. The ratio of vertical-side touches to horizontal-side touches is p:qp : q, whatever the offset.

That is exactly how the figures were used. A technician tuning an oscillator against a reference frequency put one signal on each axis of an oscilloscope, counted the points of tangency along the top and along a side, and read off the ratio; a figure that held still meant the ratio was exact, and a figure that slowly rotated meant it was slightly off, with the speed of rotation measuring the error.

Counting the crossings

The crossings are harder to see and more interesting to count. A self-crossing is a pair of different times t1t2t_1 \neq t_2 in one period at which the point is in the same place:

sin(pt1+φ)=sin(pt2+φ),sin(qt1)=sin(qt2).\sin(pt_1 + \varphi) = \sin(pt_2 + \varphi), \qquad \sin(qt_1) = \sin(qt_2).

Two sines are equal exactly when their angles are equal or supplementary, up to whole turns. So each equation holds in one of two ways — the times differ by a whole number of that coordinate’s periods, or they add up to a particular value. A crossing needs one way for xx and one way for yy.

Both coordinates cannot hold “by difference”: the times would then differ by a common period, which within one period means they are equal. Both cannot hold “by sum” at a generic phase: that would fix t1+t2t_1 + t_2 in two incompatible ways. So a crossing is either xx by difference and yy by sum, or xx by sum and yy by difference.

In the first case the difference t2t1t_2 - t_1 is one of p1p - 1 non-zero multiples of 2π/p2\pi/p and the sum is one of the values allowed by the yy condition, and each such choice pins down one crossing point; there are q(p1)q(p-1) of them. The second case gives p(q1)p(q-1) by the same count with the roles exchanged. So a generic Lissajous figure with coprime frequencies crosses itself

q(p1)+p(q1)=2pqpqq(p-1) + p(q-1) = 2pq - p - q

times.

The Lissajous figure with frequencies 3 and 4. The curve x = sin(3t + 0.3), y = sin(4t) for one full period, drawn in a square, with its 17 self-crossings marked. A generic figure with coprime frequencies p and q crosses itself 2pq − p − q times.
Fig. 3 Frequencies 3 and 4. Seventeen self-crossings, all marked, which is 234342 \cdot 3 \cdot 4 - 3 - 4. Five of them lie so close to the edges of the square — within a ten-thousandth — that the curve appears to touch the edge there rather than cross itself; the count finds them where the eye does not.

The 3:4 figure makes a point about counting against looking. A viewer counting crossings on this picture by eye finds only those well inside the square. The other five are genuine crossings of two different arcs, but both arcs are turning at the edge of the square at nearly the same place, and they cross at a distance from the edge that no drawing could show. The formula is more reliable than the picture here, and the picture had to be checked against the formula rather than the other way round.

Lissajous figures for every coprime pair of frequencies up to 4. A 4 by 4 grid of Lissajous figures x = sin(pt + 0.3), y = sin(qt), with the crossing count 2pq − p − q under each and the non-coprime pairs left blank.
Fig. 4 Every coprime pair of frequencies up to four, with pp increasing to the right and qq downward. The number under each figure is its count of self-crossings, 2pqpq2pq - p - q; the blank squares are pairs with a common factor, which draw the same figure as their reduced ratio.

The grid shows the formula growing. The first row, q=1q = 1, has crossings 0,1,2,30, 1, 2, 3 — each additional horizontal oscillation folds the curve once more across the single vertical sweep. The diagonal neighbours 2:32:3 and 3:43:4 have 7 and 17. And the grid is symmetric under exchanging pp and qq, as the formula is, though the figures are not: swapping the frequencies turns a figure on its side.

The offsets at which a figure folds

The count assumed a generic phase, and the exceptions are worth seeing because they are where the figure looks simplest.

The 1:2 Lissajous figure at 5 phases. The 1:2 Lissajous figure drawn at 5 phase offsets. At the folding phases it collapses to an arc traced twice; at the others it is a closed curve with 1 crossings.
Fig. 5 The 1:2 figure at five offsets. At φ=π/4\varphi = \pi/4 and 3π/43\pi/4 the closed figure-eight collapses to an open parabola traced there and back; at the offsets in between it is a figure-eight with one crossing.

At certain phases the curve traces an open arc, goes out along it, and comes back the same way. That happens when there is a time cc such that running the clock backwards from cc retraces the curve — x(ct)=x(t)x(c - t) = x(t) and y(ct)=y(t)y(c - t) = y(t) for every tt — and by the supplementary-angle rule that requires qcqc and pc+2φpc + 2\varphi each to be an odd multiple of π\pi. For given pp and qq those conditions pick out finitely many offsets in each half-turn.

For the 1:2 figure at φ=π/4\varphi = \pi/4 the arc can be written down. Then x=sin(t+π/4)x = \sin(t + \pi/4), so x2=(1+sin2t)/2x^2 = (1 + \sin 2t)/2, and y=sin2t=2x21y = \sin 2t = 2x^2 - 1: the arc is the parabola y=2x21y = 2x^2 - 1, which is the Chebyshev polynomial T2T_2. That is not a coincidence of the small case. The relation cos(nθ)=Tn(cosθ)\cos(n\theta) = T_n(\cos\theta) ties every folded Lissajous figure to a Chebyshev polynomial relation between xx and yy, and the same polynomial is the one that makes the logistic map at parameter four a disguised doubling.

The 2:3 Lissajous figure at 5 phases. The 2:3 Lissajous figure drawn at 5 phase offsets. At the folding phases it collapses to an arc traced twice; at the others it is a closed curve with 7 crossings.
Fig. 6 The 2:3 figure across half a turn of phase. At the two folding phases it becomes an open arc traced twice; everywhere else it is a closed curve with seven crossings.

Between folds the crossing count is constant, and the reason is continuity. As the offset changes the curve moves smoothly, and crossings can only be created or destroyed where the curve becomes tangent to itself or folds. At a generic phase neither happens, so the count cannot change until the next fold, where the whole curve doubles back and every crossing briefly disappears into the retraced arc.

Frequencies with no common measure

When the ratio is irrational the point never returns, and the question changes from how many times the curve crosses itself to where it goes.

Two circular motions whose frequencies have no common measure. A Lissajous curve with frequency ratio √2, which never closes, beside a map of how much time it spends in each part of the square. The corners are visited 23.2 times as much as the centre.
Fig. 7 On the left, x=sintx = \sin t and y=sin(2t)y = \sin(\sqrt 2\,t) over the first nine turns: already a tangle, and never closing. On the right, the share of four hundred turns spent in each of 576 cells, darker for more on a logarithmic scale. The corner cells hold 23.2 times the centre cell’s share, and every cell is within ten per cent of the product of two arcsine laws.

The path is dense: given any point of the square and any tolerance, the curve eventually passes within that tolerance. That is the torus picture again. The angles (t,2t)(t, \sqrt 2\,t) move along a line of irrational slope on a torus, and such a line comes arbitrarily close to every point of the torus — Kronecker’s theorem — so its shadow comes arbitrarily close to every point of the square.

More is true, and the right-hand panel shows it. The line on the torus is not merely dense but equidistributed: in the long run it spends equal time in equal areas of the torus. Each coordinate on its own is then a sine sampled at uniformly random phases, and a sine sampled that way spends most of its time near its extremes, where it moves slowly, with density 1/(π1x2)1/\big(\pi\sqrt{1 - x^2}\big) — the arcsine law. Equidistribution on the torus makes the two coordinates behave as if independent, so the time spent in a small cell of the square is the product of two arcsine densities. The corners, where both coordinates are near an extreme, are visited many times more than the middle, where both are moving fastest.

The arcsine law is the same density that a chaotic orbit of the logistic map leaves in its histogram, and that is not a second coincidence. At parameter four the logistic map is the doubling map in the coordinate x=sin2x = \sin^2 of an angle, and uniformly distributed angles, seen through a sine, give the arcsine law whether the angles come from doubling or from turning at an irrational rate.

The same count on a billiard table

Replace each sine by a triangle wave — a coordinate that moves at constant speed from 1-1 to 11 and back — and the point becomes a billiard ball in a square table, travelling in a straight line and bouncing off the cushions. The ball’s path at slope q/pq/p in lowest terms closes after bouncing pp times off each vertical side and qq times off each horizontal one, and it is the Lissajous figure drawn with straight segments.

The resemblance is exact rather than approximate. The triangle wave is 2πarcsin(sinθ)\tfrac{2}{\pi}\arcsin(\sin\theta), so the billiard path is the Lissajous figure with each coordinate passed through the same increasing function. A function that is increasing in each coordinate separately moves points but never changes which of two points is further left, or further up, so it cannot create or destroy a crossing. The billiard path at slope q/pq/p crosses itself exactly 2pqpq2pq - p - q times, the same count, and it touches the cushions in the same pattern.

That makes the square billiard table a folded torus in the same way the Lissajous figure is a shadow of one: unfold the reflections and the ball’s path becomes a straight line on four copies of the table glued into a torus, each bounce a fold. The sines round off the corners of the path and the arcsine straightens them again; the arithmetic of when the path closes and how often it crosses itself lives on the torus and does not notice which.

When two oscillators are nearly in step

The laboratory use of the figures relied on a fact about nearly rational ratios. If the true ratio is p/qp/q plus a tiny error, the figure is the p:qp : q figure with an offset that drifts slowly, and the drift carries it through every offset in turn — including the folding phases, where it flattens into an arc and opens out again. On an oscilloscope that looks like a figure slowly turning over, and the time for one full turn is inversely proportional to the frequency error.

That turned a visual pattern into a precision measurement. A drift of one turn per minute between a 1,000-cycle reference and an unknown signal meant the unknown was within about a sixtieth of a cycle per second of the ratio being displayed, a resolution far better than the eye could judge from either waveform alone.

Two real oscillators coupled together do something the idealised figure does not: they can pull each other into an exact ratio and hold it, so that the figure stops turning altogether over a whole range of mismatches. That locking, and the way a lock comes apart at the edge of its range, belong to coupled oscillators rather than to two independent sines — but a Lissajous figure that freezes when it ought to be turning is the classic sign that locking has happened.

A figure that is a shadow of a knot

A Lissajous figure is a curve in the plane with crossings, and a curve in the plane with crossings is exactly what a knot diagram looks like. The connection can be made literal. Add a third coordinate z=sin(rt+ψ)z = \sin(rt + \psi) with a third frequency, and the closed curve lives in space; at generic phases it does not meet itself, so it is a knot, and its projection onto the xyxy-plane is the Lissajous figure with a choice of over or under at every one of its 2pqpq2pq - p - q crossings, decided by which of the two times has the larger zz.

These Lissajous knots were introduced in 1994 by Bogle, Hearst, Jones and Stoilov, and they are a surprisingly restricted family. Their symmetry — every coordinate is a sine, so the whole curve is carried to itself by a point reflection through the centre composed with a shift of time — forces invariants to take special values: the Arf invariant of every Lissajous knot is nought, and so the trefoil and the figure-eight knot, whose Arf invariants are one, are not Lissajous knots at all. A figure-eight made of two perpendicular sines cannot be tied into a figure-eight knot.

What the square of curves cannot show

The crossing counts in the figures are found by testing every pair of segments of a sampled curve, and they agree with 2pqpq2pq - p - q. But at 3:4 five of the seventeen crossings sit a ten-thousandth from the edge, and a coarser sampling would miss them; the drawn curve alone is not evidence for the count. The count is proved by the supplementary-angle argument, and the samples only confirm that argument at the pairs drawn.

The density panel is four hundred turns, which is a long but finite stretch of a curve whose equidistribution is a statement about the limit. The agreement with the product of arcsine laws to within ten per cent in every cell is what four hundred turns deliver; it would improve with more, and nothing drawn can show the limit being reached. Nor does the left panel show density — nine turns of a curve that never closes look exactly like nine turns of a curve that closes after ninety.

And the folding phases are drawn at their exact values, which a physical oscilloscope never achieves. A real phase is always slightly off a folding value, so a real 1:2 figure is always a very thin figure-eight rather than a parabola, and the fold is a property of the idealisation.

Still open: which knots can be drawn with sines

The Lissajous knots are all closed curves of three sines, and some knots are not among them. The known obstructions — the Arf invariant must vanish, and the Alexander polynomial must be a square modulo two — rule out many knots, including the two simplest. Many other knots have been exhibited as Lissajous knots by finding explicit frequencies and phases.

Which knots are Lissajous knots is not known. No complete list exists and no characterisation has been proved; for many small knots that pass every known obstruction, no Lissajous representation has been found and none has been ruled out. The question sounds like a curiosity about pictures made of sines, and it is a question about how much symmetry a knot can be forced to have, which is the kind that tends to stay open.

Two clocks and a count

The figures began as a laboratory method for comparing two frequencies, and the method worked because of arithmetic. A rational ratio closes up and draws a finite figure whose touches with the edges report the ratio and whose crossings are fixed by it at 2pqpq2pq - p - q, whatever the offset, until the offset reaches a value where the figure folds. An irrational ratio draws a curve that never ends, fills the square, and lingers in the corners in a precise proportion.

All of it comes from one fact used twice: two sines are equal exactly when their angles are equal or supplementary. That fact decides when the point comes home, how many times it crosses its own path on the way, and at which phases it goes out and comes back along a single arc — the circle unrolled on one axis, unrolled again on the other, and made to meet itself.