Signals & SystemsPrologue
Must readPrologue about 30 minutes

Waves and Numbers

Twelve centuries of taking a complicated thing apart into simple ones and counting them — letters in Baghdad, strings in Damascus and Urmia, heat in Grenoble, tides in Glasgow — and the fast algorithm that now does the counting inside every phone.

The figure beside this text is a plucked string. You can see it as one shape, a bent line with a corner, or as a sum of simple vibrations, each a whole number of half-waves with a pitch of its own. Move the pluck and the mixture changes. Holding both pictures at once — the signal, and the simple parts it is made of — is most of what this course teaches.

Count the parts

Baghdad, in the ninth century. A scholar is handed a letter written in a secret alphabet. He cannot read a word of it, and he does not try. He counts. How often does each symbol occur? Which is the most frequent, which the second, which the third?

His method rests on a fact about language. In a long enough stretch of any language, some letters turn up far more often than others, in much the same proportions from one text to the next. Rank the cipher’s symbols by how often they occur, rank the letters of an ordinary text the same way, match the two lists, and the secret alphabet gives itself away.

His name was Abū Yūsuf Yaʿqūb al-Kindī, and his method is still called frequency analysis. The word is the one this course uses for waves — how often something happens — and the idea is the one the course is built on. Do not stare at a complicated thing as a whole. Break it into simple parts, count how much of each part it holds, and the counts tell you what the whole is doing.

For a letter, the parts are the alphabet. For a sound, a radio signal, a tide or the shaking of a bridge, they are sine waves. This prologue follows the idea through twelve centuries: from the House of Wisdom in Baghdad, where letters were counted and the ratios of musical strings were written down, through a quarrel over a vibrating string and a bold claim about heat, to brass machines that predicted the sea, and an algorithm fast enough to do the counting as the signal arrives.

The atlas

Press play and watch the centuries run: the cities lit, in order, where the ideas of this prologue were written down or built, with the empires of the time on the timeline beneath. Drag the timeline to stop at any year.

Figure 2 · Where the ideas were made
Events are placed where the sources place them. The ninth-century work in Baghdad has no exact years, so it is drawn inside the century. Michelson, Gibbs, Nyquist, Shannon, Cooley and Tukey worked in the United States, off this map, and are gathered at its western edge.
Chapter I

The frequency of letters: al-Kindī

Kufa and Baghdad, ninth century

Al-Kindī was born in Kufa around 801, into a noble family of the Arab tribe of Kinda — his father was governor of Basra — and was educated in Baghdad. There he became a leading figure at the House of Wisdom, and a number of Abbasid caliphs set him to oversee the translation of Greek science and philosophy into Arabic. The bibliographer Ibn al-Nadīm credited him with at least 260 books, on geometry, medicine, philosophy, logic and physics; most are lost (al-Kindī).

One that survives is a short treatise, On Deciphering Cryptographic Messages: the first known recorded explanation of frequency analysis — indeed, of any kind of cryptanalysis (frequency analysis). He built on al-Khalīl of Basra (717–786), whose Book of Cryptographic Messages had used permutations and combinations to list every possible Arabic word, with and without vowels. Al-Kindī’s instructions read like an algorithm:

One way to solve an encrypted message, if we know its language, is to find a different plaintext of the same language long enough to fill one sheet or so, and then we count the occurrences of each letter. … Then we look at the cipher text we want to solve and we also classify its symbols. We find the most occurring symbol and change it to the form of the “first” letter of the plaintext sample, the next most common symbol is changed to the form of the “second” letter…

— al-Kindī, On Deciphering Cryptographic Messages, tr. in Simon Singh, The Code Book (1999)

What he asks for is not a dictionary or a guess at the words, but two distributions — the letters of a known text and the symbols of the unknown one — and a way to lay one against the other. The figure does it for an English cipher of the simplest kind, each letter moved the same number of places along the alphabet. Slide the trial shift and watch the score: at one shift the peaks of the two distributions fall on each other, and the letter reads. Sliding one pattern past another and adding up the agreements is called correlation; in Lesson 10-3 a GPS receiver uses it to pick a satellite’s signal out from far beneath the noise.

Figure 3 · Breaking a cipher by counting
The intercepted letter is a passage of English with every letter moved the same number of places along the alphabet. The ‘sheet of the same language’ al-Kindī asks for is a different passage, of 1139 letters. Al-Kindī matched ranks: here his first and second letters, E and T, do fall on the cipher’s first and second, but his third does not. The score settles it by laying the whole of one distribution against the other — a correlation — and one shift stands far above the rest. The letter, once read, is from a book that Chapter V is about.

Al-Kindī was also the first music theorist of the Arab-Islamic world whose writings have come down to us. He carried the Greek tonal system over to the ʿūd, the Arabic lute, writing its notes as letters of the alphabet, and is said to have given it a fifth string. His fortunes turned under the caliph al-Mutawakkil: at one point he was beaten and his library confiscated for a time — with the help, the sources say, of rivals at the House of Wisdom whom Chapter III introduces. He died in Baghdad in 873, “a lonely man”, in the words of the historian Henry Corbin.

al-Kindī

الكندي
c. 801–873 · Kufa and Baghdad · the Abbasid caliphs
Philosopher, mathematician, physician and music theorist: the first of the Islamic Peripatetic philosophers, and with al-Khwārizmī one of the men who brought the Hindu numerals into the Islamic world. His treatise on ciphers is the oldest known description of cryptanalysis.
In this course: Lesson 10-3 · Spread spectrum and correlation
Chapter II

Numbers you can hear: al-Fārābī and Ṣafī al-Dīn

Baghdad, Damascus and Urmia, c. 900–1294

Al-Kindī was not the last scholar of that world to treat sound as a matter of number. Abū Naṣr al-Fārābī was born around 870 somewhere in Central Asia — the sources name a Fārāb, a common place-name there — and spent most of his scholarly life in Baghdad, before Damascus and Egypt; he died in Damascus in 950 or 951. Whether his family was Persian or Turkic is disputed (al-Fārābī). Later writers called him the Second Master, after Aristotle.

He was a practising musician as well as a theorist. His Great Book of Music, the Kitāb al-Mūsīqā al-Kabīr, opens with the principles of the subject and an investigation of how sound is generated, then applies them to the instruments of his day, their intervals and their melodies (Kitāb al-Mūsīqā al-Kabīr). Behind it stands the Pythagorean theory of harmonic ratios: stop a string at half its length and it sounds an octave higher; at two-thirds, a fifth; at three-quarters, a fourth. Al-Fārābī held that the ear should judge such propositions, even where its verdict disagreed with the arithmetic.

Three centuries later Ṣafī al-Dīn al-Urmawī, born around 1216, probably in Urmia in north-western Iran, came to Baghdad as a young man. He made his name as a calligrapher, became a copyist at the new library of the caliph al-Mustaʿṣim, and there wrote the Kitāb al-Adwār, the first surviving work of scientific music theory since Avicenna’s. It records the final stage in the division of the octave into seventeen steps. When the Mongols took Baghdad in 1258, his music saved him: Hülegü, the sources say, was impressed, and doubled his income (Ṣafī al-Dīn al-Urmawī).

What do the simple ratios have in common? The figure shows the answer in the language of this course. Two tones whose frequencies stand in a ratio of small whole numbers, p : q, add up to a wave that repeats exactly, after q cycles of the lower tone. Small numbers, a short repeat. Make the ratio irrational and the sum never repeats at all — Lesson 1-1 proves it.

Figure 4 · Ratios you can hear
The Pythagorean intervals on a two-string monochord. The lower string is whole; the upper is stopped at q/p of its length, so it sounds p/q times higher. Beneath, the two tones and their sum; the turquoise marks show where the sum starts over. Press Listen to hear each pair. The √2 pair fits no whole numbers at all.

al-Fārābī

الفارابي
c. 870 – 950/951 · Central Asia, Baghdad, Damascus
Philosopher, logician and musician. His Great Book of Music describes the construction of the maqāms of his time, was translated into Hebrew in the Middle Ages, and has been called of “utmost importance” for the music of the Middle East.
In this course: Lesson 1-1 · Signals

Ṣafī al-Dīn al-Urmawī

صفي الدين الأرموي
c. 1216–1294 · Urmia and Baghdad · al-Mustaʿṣim, then the Juvaynī family
Calligrapher, ʿūd player and theorist. When his patrons the Juvaynīs fell he sank into poverty, was arrested over a debt of 300 dinars, and died in Baghdad in 1294.
Chapter III

An instrument that plays itself: the Banū Mūsā

The House of Wisdom, ninth century

The rivals who helped bring al-Kindī down were three brothers, the Banū Mūsā — Muḥammad, Aḥmad and al-Ḥasan, sons of Mūsā ibn Shākir, a former highwayman turned astronomer from Khorasan, whom al-Maʾmūn had taken into his service while governor there. After their father’s death the boys were raised at court and enrolled in the House of Wisdom. They sent to Byzantium for Greek manuscripts, recruited the translator Thābit ibn Qurra, measured a degree of latitude in the desert near Sinjar, and wrote some twenty books, of which three survive (Banū Mūsā). Under al-Mutawakkil they ridiculed al-Kindī’s treatise on the astrolabe and had him beaten and his library taken; it came back to him through the Persian Jewish scholar Sanad ibn ʿAlī.

Their Book of Ingenious Devices, of 850, describes a hundred machines, many of them trick vessels to amuse party guests; some of their valves and controls were not surpassed until modern times. Another treatise describes “the instrument which sounds by itself”. Its tune was set by pins on a cylinder turned by water, as in a music box: each pin, as it came round, sounded one note, and the cylinders could be exchanged. The brothers are credited with the first music sequencer, and their automatic flute player has been called the first programmable machine (music sequencer).

Unroll a pinned cylinder and you are looking at a picture this course draws many times: time running across, pitch running up, a mark wherever a note sounds. Lesson 6-4 computes the same picture from a recording and calls it a spectrogram. The cylinder makes sound from the picture; the spectrogram makes the picture from the sound.

The Banū Mūsā

بنو موسى
Muḥammad (before 803 – 873), Aḥmad and al-Ḥasan (9th century) · Baghdad · al-Maʾmūn and his successors
Geometers, astronomers and engineers. Muḥammad knew his Euclid and Ptolemy; al-Ḥasan was the mathematician, whose one known book, now lost, drew an ellipse with a loop of string; Aḥmad was the engineer, and the Book of Ingenious Devices is his.
In this course: Lesson 6-4 · Spectrograms
Figure 5 · An instrument that plays itself
A diagram of the principle, not a reconstruction. Pins rise up the front of the drum; at the top each lifts a lever and its pipe sounds. Below, the same drum unrolled — beats across, pitch up. Turn the sound on, swap cylinders, or click the grid to pin a tune of your own: the program is the pattern. The Banū Mūsā’s own tunes are not recorded, so the first cylinder carries a French song you will meet again at the end of this prologue.
Chapter IV

The string that started an argument

Paris, Berlin and Basel, 1747–1753

Europe took up the mathematics of sound in the eighteenth century, with the vibrating string itself. Jean le Rond d’Alembert, in Paris, sent the Berlin Academy a memoir on the curve that a stretched string forms when set into vibration, printed in its volume for 1747; some accounts date the discovery to 1746. In it he wrote down the equation of the string — the one-dimensional wave equation — and solved it: every motion of the string is the sum of two shapes, one sliding to the right and one to the left, at the same speed (wave equation).

Which shapes were allowed? Leonhard Euler, then at the Berlin Academy, disputed it with d’Alembert, and their quarrel did much to widen what mathematicians meant by a “function” (history of the function concept). Daniel Bernoulli, in Basel, took the physicist’s view. A string sounds its fundamental and its overtones at once, and its motion is a sum of simple vibrations, each a sine curve with a whole number of half-waves. In 1753 he stated it as a principle — the general motion of a vibrating system is a superposition of its proper vibrations — which the physicist Léon Brillouin later counted as the first statement of the principle of superposition (Daniel Bernoulli).

D’Alembert and Euler would not accept that every shape could be built that way. A sum of smooth sine curves, it seemed, could never make the sharp corner of a plucked string. Each side was partly right, and the mathematics needed to say which part did not yet exist. The figure computes the same motion both ways.

Figure 6 · One motion, two descriptions
Top, d’Alembert: two half-height copies of the starting shape, continued past the ends upside down so that the ends stay fixed, slide apart; their sum is the string. Bottom, Bernoulli: the sum of the first N standing vibrations, drawn over the exact motion. With a few vibrations the corner is rounded off — the objection. Add more and the gap closes. Lesson 3-2 measures how fast such sums close in, and what happens at a jump, where they never quite do.
Chapter V

Heat, and a bold claim: Fourier

Auxerre, Cairo, Grenoble and Paris, 1768–1830

Joseph Fourier was born in Auxerre in 1768, the son of a tailor, and was orphaned at nine. In 1798 he sailed with Napoleon’s expedition to Egypt as a scientific adviser and became secretary of the Institut d’Égypte in Cairo. Back in France, Napoleon made him prefect of the department of Isère, at Grenoble, in 1801; and it was there, between the road-building and the paperwork, that he began to experiment on the propagation of heat (Joseph Fourier).

On 21 December 1807 he presented his memoir On the Propagation of Heat in Solid Bodies to the Institut in Paris. In it he made the claim d’Alembert and Euler had refused: that a function — any function, smooth or not, even one with jumps — could be written as a sum of sines and cosines, each coefficient found by a single integral. Looking back, he wrote that d’Alembert and Euler had both been persuaded that an arbitrary and discontinuous function could never be resolved into such a series (Fourier, letter). The examiners were not convinced either. When he entered a revised essay for the Institut’s prize in 1811, the committee — Lagrange, Laplace, Malus and Legendre among them — concluded:

…the manner in which the author arrives at these equations is not exempt of difficulties and … his analysis to integrate them still leaves something to be desired on the score of generality and even rigour.

— the prize committee of the Institut, on Fourier’s essay of 1811

They had a point. What “any function” can mean took mathematicians most of the next century to settle, and the effort produced much of modern analysis (Fourier series). But the series worked. In 1822 Fourier published the whole theory as Théorie analytique de la chaleur, and in Chapter IV of the book he follows heat round a thin ring. Write the starting temperature as a sum of sines and cosines around the ring, and each term simply fades by itself — the n-th as e−n²t: the fine detail dies first, the broad shape last. Every system in this course that is linear and does not change with time treats sinusoids that way, each one separately, by a single complex number. That, more than heat, is why Fourier’s idea outlived its subject.

Figure 7 · Heat in a ring
A thin ring, hot along its top half and cold along the bottom: the kind of discontinuous start the examiners doubted. Cut open (right), it is a step; as a sum of harmonics, only the odd ones are present. Press play: each harmonic fades by itself, the n-th as e^(−n²t), so the corners round off first and the ring passes through a single sine wave on its way to an even warmth. Letting the high frequencies die first is what a low-pass filter does (Lesson 4-4).

Profound study of nature is the most fertile source of mathematical discoveries.

— Joseph Fourier, The Analytical Theory of Heat (1822), tr. Alexander Freeman (1878), p. 7

Joseph Fourier

1768–1830 · Auxerre, Cairo, Grenoble, Paris · Napoleon
Mathematician, prefect and Egyptologist: he collated the Description de l’Égypte, and his tomb in Père Lachaise carries an Egyptian motif. He is also credited with discovering the greenhouse effect, and his is one of the 72 names on the Eiffel Tower.
In this course: Lesson 3-1 · The Fourier series
Chapter VI

Brass that adds sines

Glasgow and London, 1860s–1879; Chicago and New Haven, 1898–1899

In the 1860s William Thomson — professor of natural philosophy at Glasgow, later Lord Kelvin — brought Fourier’s method to the tides. A port’s tide is not one rhythm but many: the Moon raises its bulges of water twice a day, the Sun twice a day on a slightly different beat, and the tilts and ellipses of their orbits add rhythms of about a day. The rhythms are astronomy; how much of each a particular port has, Thomson’s harmonic analysis drew out of its tide-gauge records (tide-predicting machine).

Predicting the tide then means adding the rhythms up, hour by hour, for a year: a vast and error-prone labour. In 1872–73, with Edward Roberts of the Nautical Almanac Office and the instrument maker Alexander Légé, Thomson built a machine to do the adding. The engineer Beauchamp Tower had suggested the trick in August 1872: a cord running alternately over and under a row of pulleys, each pulley moved up and down by a crank at the rate of one rhythm, so that the cord’s free end moves by their sum. Larger machines followed in 1876 and 1879, and could draw a year’s tides for a port in about four hours. Machines on Thomson’s pattern are credited with the tide predictions for the Normandy landings of 1944. Lesson 3-1 opens with his machine.

Figure 8 · A cord that adds
The principle of Thomson’s predictor, with the true periods of four tidal rhythms and made-up sizes for an imaginary port. Each crank moves its pulley at the rate of one rhythm; the cord, fixed at the left, runs under each moving pulley and over a fixed one, so the pen on its free end traces the sum. The Moon’s and the Sun’s twice-daily rhythms, 12.42 and 12 hours, drift in and out of step every 14.77 days: spring tides and neap tides. Add the daily rhythms, and the two high waters of a day become unequal.

Machines could run the other way too. In 1898 Albert Michelson, at Chicago, built with Samuel Stratton a harmonic analyser that could compute a Fourier series and add it back up. The story goes that, given the coefficients of a square wave, it drew wiggles at the corners, and that Michelson blamed the machine. In fact its curves were not fine enough to show the effect clearly, and he never mentioned it. But his exchange of letters in Nature with A. E. H. Love, on how such series converge, drew in J. Willard Gibbs, who in 1899 described the overshoot at a jump that now bears his name — found first, it turned out, by Henry Wilbraham in 1848 (Gibbs phenomenon). Lesson 3-2 is about that overshoot.

William Thomson, Lord Kelvin

1824–1907 · Belfast and Glasgow
Professor of natural philosophy at Glasgow for 53 years, and a founder of thermodynamics; absolute temperatures are measured in kelvins in his honour. In 1854 he worked out how fast a transatlantic telegraph cable could carry messages — its bandwidth, in modern terms — and he was knighted in 1866 for his part in laying one.
In this course: Lesson 3-1 · The Fourier series
Chapter VII

Samples, and a fast algorithm

New York, Moscow and Yorktown Heights, 1924–1965

The twentieth century turned the subject from analysis into engineering. Telegraph and telephone companies needed to know how fast they could signal down a line of limited bandwidth. Harry Nyquist’s papers of 1924 and 1928 tied the speed of signalling to the band of frequencies; Vladimir Kotelnikovproved in 1933 that a signal with no frequencies above B is fixed completely by samples taken more often than 2B times a second; and Claude Shannon’s “Communication in the Presence of Noise”, in 1949, made the theorem common property among engineers. Others found it too — E. T. Whittaker, Kinnosuke Ogura, Herbert Raabe — and Lesson 5-1 tells how it came to carry the names it does (sampling theorem).

Sampling turns a signal into a list of numbers, and counting how much of each frequency a list holds is a sum — the discrete Fourier transform — that for N samples takes about N² multiplications. In 1965 James Cooley of IBM and John Tukey published a way to do it in about N log N: for a million samples, the difference between a trillion operations and twenty million. Gauss had found much the same method around 1805, working out the orbits of the asteroids Pallas and Juno, but it was published only after his death, in Latin, and went unnoticed (Cooley–Tukey algorithm). Lesson 6-2 opens with why Cooley and Tukey were asked, and by whom.

What they left in your course

None of these people set out to found a subject called signals and systems. Between them they supplied its working ideas: count the parts; let simple ratios fix a period; write a program as a pattern in time and pitch; build any motion out of simple vibrations, and let each vibration evolve by itself; add sines by machine; take samples; compute fast.

Where these ideas return in the course
Small whole-number ratios repeat; irrational ones never do (al-Fārābī, Ṣafī al-Dīn)Lesson 1-1 · Signals
The whole as a superposition of simple parts (Daniel Bernoulli)Lesson 1-3 · System properties
Any periodic signal a sum of sines, and sines added by machine (Fourier, Thomson)Lesson 3-1 · The Fourier series
The overshoot at a jump (Wilbraham, Michelson, Gibbs)Lesson 3-2 · The Gibbs phenomenon
High frequencies fade first (Fourier’s ring)Lesson 4-4 · Filtering
Enough samples fix the signal (Nyquist, Kotelnikov, Shannon)Lesson 5-1 · The sampling theorem
The fast algorithm (Gauss, Cooley and Tukey)Lesson 6-2 · The DFT and the FFT
Time across, pitch up (the Banū Mūsā’s cylinder)Lesson 6-4 · Spectrograms
Slide one pattern past another and count the agreements (al-Kindī)Lesson 10-3 · Correlation

Turn the page

Every figure in this prologue has been a picture of a signal: a string’s shape, a column of letter counts, a ring’s temperature, the line a tide machine draws. The oldest picture of a human voice was made in Paris. In 1857 a typographer at a scientific publisher, Édouard-Léon Scott de Martinville, patented an instrument that let a voice draw itself — a horn, a membrane, a bristle scratching a wavy line into soot. In 1860 he sang “Au clair de la lune” into it: the tune on the first cylinder of Figure 5.

He meant his tracings to be read by eye, like writing. It seems not to have occurred to anyone before the 1870s that they held enough to recreate the sound, and no one did so until 2008 (phonautograph). That is where Lesson 1-1 begins: with a signal, what it is, and the few simple operations that change it.

End of the prologue
Lesson 1-1 · Signals
Begin the course
Sources and further reading
  • Simon Singh, The Code Book, 1999, ch. 1 — al-Kindī’s instructions in translation; Peter Adamson, Al-Kindī, Oxford University Press, 2007.
  • Owen Wright, The Modal System of Arab and Persian Music, A.D. 1250–1300, Oxford University Press, 1978 — Ṣafī al-Dīn and his seventeen steps.
  • Donald R. Hill (tr.), The Book of Ingenious Devices (Kitāb al-ḥiyal) by the Banū (sons of) Mūsà bin Shākir, Reidel, 1979; Teun Koetsier, “On the prehistory of programmable machines: musical automata, looms, calculators”, Mechanism and Machine Theory 36 (2001), 589–603.
  • J. le R. d’Alembert, “Recherches sur la courbe que forme une corde tenduë mise en vibration”, Histoire de l’Académie royale des sciences et belles lettres de Berlin 3 (for 1747).
  • Joseph Fourier, Théorie analytique de la chaleur, Paris, 1822; The Analytical Theory of Heat, tr. Alexander Freeman, Cambridge University Press, 1878 — the ring is Chapter IV. John Herivel, Joseph Fourier: The Man and the Physicist, Clarendon Press, 1975; Elena Prestini, The Evolution of Applied Harmonic Analysis, Birkhäuser, 2004.
  • Minutes of Proceedings of the Institution of Civil Engineers 65 (1881), pp. 25–64 — Thomson’s tide machines and their discussion; T. W. Körner, Fourier Analysis, Cambridge University Press, 1988.
  • A. A. Michelson and S. W. Stratton, “A new harmonic analyser”, Philosophical Magazine 45 (1898), 85–91; J. W. Gibbs, “Fourier’s series”, Nature 59 (1898), 200, and 59 (1899), 606.
  • C. E. Shannon, “Communication in the presence of noise”, Proceedings of the IRE 37 (1949), 10–21; J. W. Cooley and J. W. Tukey, “An algorithm for the machine calculation of complex Fourier series”, Mathematics of Computation 19 (1965), 297–301.
  • Wikipedia articles checked for every date here: al-Kindi, frequency analysis, al-Farabi, Kitab al-Musiqa al-Kabir, Safi al-Din al-Urmawi, the Banū Mūsā, the music sequencer, the wave equation, the history of the function concept, Daniel Bernoulli, Joseph Fourier, the Fourier series, Lord Kelvin, the tide-predicting machine, the Gibbs phenomenon, the Nyquist–Shannon sampling theorem, the Cooley–Tukey algorithm and the phonautograph; Fourier’s letter on d’Alembert and Euler as given on Wikiquote.
  • Where sources disagree — al-Fārābī’s birthplace and origin, the year of d’Alembert’s discovery — this page says so rather than choosing.