Numerical AnalysisPrologue
Must readPrologue about 35 minutes

The Origins of
Numerical Analysis

Nearly four thousand years of computing with numbers that are never quite exact — from a Babylonian school tablet to the madrasas of Baghdad, Isfahan and Samarkand — and of learning to say exactly how wrong they are.

The figure beside this text is the calculation Jamshīd al-Kāshī finished in Samarkand in July 1424. Press play: you are doubling the sides of a polygon twenty-eight times, and watching the error on his giant circle fall from billions of kilometres to less than the breadth of a hair.

The breadth of a hair

Samarkand, July 1424. In a city that Ulugh Beg, grandson of Timur, has filled with scholars, a mathematician from Kashan named Jamshīd al-Kāshī finishes a treatise on a single number: the ratio of a circle’s circumference to its diameter. He does not begin with his own answer. He begins by grading everyone else’s.

Archimedes, he writes, proved that the ratio lies between 3 10/71 and 3 1/7 — two bounds that differ by 1/497 of the diameter. On a circle the size of the Earth’s, that uncertainty is about five farsakh, some thirty kilometres. Abū al-Wafāʾ al-Būzjānī in Baghdad, using polygons of 720 sides, had brought it down to about a thousand cubits. Abū Rayḥān al-Bīrūnī, with 180 sides, to about one farsakh. And both of them, al-Kāshī adds, had made a slip in computing a chord. (He was right about al-Bīrūnī. Modern scholars have found that the slip he blamed on Abū al-Wafāʾ was in a later report of his work.)

Then he sets his own target, before he computes a single digit.

… in a circle that its diameter is six hundred thousand times the diameter of the sphere Earth, the difference between the result of our calculations and the actual value would not reach the breadth of a hair.

— Jamshīd al-Kāshī, introduction to the Treatise on the Circumference (1424), tr. M. K. Azarian

A hair, he specifies, a sixth of the width of a barley grain. To meet that tolerance he doubled the sides of a hexagon twenty-eight times, to a polygon of 3 · 2²⁸ = 805,306,368 sides, worked entirely in base 60, and wrote down 2π to nine sexagesimal places — sixteen decimal places. Nobody in the world did better for 172 years. By coincidence, sixteen decimal places is almost exactly what the 64-bit floating-point numbers in your laptop can hold.

Look again at the order of his work, because it is the order of this whole course. First, how large an error can I afford? Then, which method will get me there, and how many steps will it take? Then the arithmetic — and a proof that the answer is as good as promised. That is numerical analysis. Not the computing of numbers, which any machine can do, but the science of knowing how far to trust them.

Everything you will do in this course rests on four things the world had to build first: a way of writing fractions that a machine — or a scribe — can compute with; algorithms, fixed recipes that always end in an answer; iteration, the idea of improving an answer by repeating a step; and error bounds, the habit of proving how close the answer is. For six hundred years the people who built most of them wrote in Arabic and Persian. This prologue is their story.

The atlas

Thirty-six moments, thirty-two cities, three and a half thousand years.

Before the story, the map. Press play and watch where these ideas were made and how they moved. Gold arcs are books and methods travelling: base-60 fractions from Babylon to Alexandria, Greek mathematics into Arabic, Indian numerals to Baghdad, Arabic numerals to Pisa. The turquoise arcs are people. Notice how many of the great names in this story were born far to the east — in Khwarazm, Buzjan, Karaj, Nishapur, Tus and Kashan — and travelled to wherever the work was paid for.

Chapter I

Sixty on clay: Babylon

Mesopotamia, c. 1800–1600 BCE

Every number in this course is written in a place-value system: the same digit means different amounts in different positions. The first people to do that were the scribes of southern Mesopotamia, in what is now Iraq, nearly four thousand years ago. They counted in sixties. A “1” followed by a “24” could mean 1 + 24/60 — they wrote no point, and the scale came from context — and they wrote fractions as easily as whole numbers, with a stylus pressed into wet clay. We still count their way whenever we split an hour into sixty minutes and a minute into sixty seconds.

Sixty has a great virtue for computing: it divides by 2, 3, 4, 5, 6, 10, 12, 15, 20 and 30. So one tenth, in base 60, is simply 0;6 — six sixtieths, finished. Remember that. At the end of this prologue, the same one tenth will refuse to be written down at all, and in 1991 that refusal will cost lives.

In the Yale Babylonian Collection there is a small, round clay tablet, catalogued YBC 7289, about the size of a palm. Historians think it was a student’s rough work, held in one hand. On it is a square with its two diagonals. One side is marked 30. Along the diagonal are four numbers: 1;24,51,10 — and below them 42;25,35, the length of the diagonal. The first number is the square root of 2, to about six decimal places: wrong by less than one part in two million.

Figure 1 · Squaring the rectangle: √2 on YBC 7289
The tablet does not say how the scribe found 1;24,51,10. One rule that produces exactly these digits is the one Heron of Alexandria wrote down two thousand years later: a rectangle of area 2 with sides x and 2/x is made squarer by taking the average of its sides as the new x. From x = 1 the side becomes 1;30, then 1;25, then 1;24,51,10,35 — whose first three places are the tablet’s. The rule is Newton’s method for x² = 2, which you will meet in Lesson 2-2. The tablet is drawn in its own script: corner wedges for tens, upright wedges for units.
A small round clay tablet with a square and its two diagonals scratched into it, and rows of wedge-shaped numbers along the diagonal
YBC 7289, Yale Babylonian Collection (c. 1800–1600 BCE). The square and its diagonals are scratched across the face; the wedges of 1;24,51,10 run along the horizontal diagonal, and 42;25,35 sits just below it. Photograph: Yale Peabody Museum, CC0.
Chapter II

Squeezing π: the Greeks

Syracuse and Alexandria, c. 250 BCE–150 CE

Around 250 BCE, in Syracuse on the island of Sicily, Archimedes did something new with an approximation: he trapped it. In a short work, Measurement of a Circle, he drew regular polygons inside and outside a circle, doubled their sides from 6 to 96, and proved that π lies between 3 10/71 and 3 1/7. He did not claim to know π. He claimed to know an interval that contains it — and that is the idea of an error bound, which you will use in every unit of this course. Seventeen centuries later, al-Kāshī opened his treatise by quoting exactly this result.

In Alexandria, in the first century CE, Heron needed the square root of 720 to find the area of a triangle. He took 27, whose square is close to 729; divided 720 by 27 to get 26 2/3; and averaged the two to get 26 5/6. If you want it closer, he wrote, repeat the step with the new number. That is an iteration: a rule that takes an approximation and returns a better one.

And around 150 CE Ptolemy, also in Alexandria, built the great trigonometric table of antiquity — a table of chords for every half degree, written in Babylonian base-60 fractions — and took π as 3;8,30, which is 3.14167. For the next thirteen centuries, astronomers and mathematicians from Spain to India computed in sixties. Much of the work in this prologue is, at heart, the work of making better tables.

Chapter III

Zero and the sine table: India and Persia

Pataliputra, Bhinmal and Ctesiphon, 499–770 CE

In 499, a 23-year-old astronomer named Aryabhata finished a short book of verses near Pataliputra on the Ganges. In it he tabulated the half-chord, the ancestor of our sine, at 24 equal steps through a quarter circle — and he built the table from its differences, the amount each entry grows by, the way you will build difference tables in Unit 7. He also gave π as 62,832/20,000 = 3.1416 and called it, carefully, “approximate”.

In 628, at Bhinmal in what is now Rajasthan, Brahmagupta wrote the first rules for computing with zero as a number in its own right: what zero added to a number gives, what a number taken from itself leaves. Combined with the Indian decimal place-value numerals, it gave the world the digits you write today. In 665 he did something just as important for this course: he showed how to read between the lines of a table.

Figure 2 · Reading between the lines of a table
Brahmagupta’s sine table in his Khaṇḍakhādyaka (665) has only six entries, one every 15°, for a circle of radius 150: 39, 75, 106, 130, 145, 150. A straight line between neighbouring entries is out by up to 1.2 units. His rule bends the line using the difference before as well as the difference after — second-order interpolation, the modern Newton–Stirling formula — and is never out by more than 0.2. Drag the angle: the error panel shows both rules across the whole table. Interpolation is Unit 7 of this course.

Between India and the Mediterranean lay Persia. Its Sasanian kings (224–651) kept royal astronomical tables, the Zīj-i Shāh, at their capital Ctesiphon on the Tigris. When the empire fell in the 650s, its scholars and their tables did not vanish. A century later, thirty kilometres upriver, a new city would be built, and Persian scholars would be among the first to work in it.

Chapter IV

The House of Wisdom: Baghdad

Baghdad, Damascus and Cairo, 762–1050

The Abbasid caliph al-Mansur founded Baghdad in 762. Within about a decade an embassy from India brought a Sanskrit astronomical text to his court, and with it the Indian numerals — the nine digits and the zero — that Europe would later call “Arabic”. His great-grandson al-Maʾmūn (reigned 813–833) made learning a policy. In the House of Wisdom (بيت الحكمة), scholars paid by the state translated Greek, Persian and Sanskrit mathematics into Arabic, and then went further than any of their sources. The first of them, for this course, was a man from Khwarazm, south of the Aral Sea.

Muḥammad ibn Mūsā al-Khwārizmī

محمد بن موسى الخوارزمي
c. 780–c. 850 · from Khwarazm, worked in Baghdad · Abbasid, House of Wisdom
Around 820 he wrote al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr wa-l-muqābala, “the compendious book on calculation by completion and balancing”. Al-jabr, restoring, is moving a subtracted quantity to the other side of an equation; from it we get algebra. A second book taught calculation with the Indian numerals. Only a Latin version survives, which begins Dixit Algorizmi, “so said al-Khwārizmī” — and from his Latinised name we get algorithm.
Figure 3 · al-Khwārizmī completes the square
His own example, x² + 10x = 39. Split the ten roots into two strips of 5 by x along two sides of the square; the corner left empty is 5 × 5 = 25; the completed square is 39 + 25 = 64, so its side is 8 and the root is 3. On the right is his recipe, step by step, in words: he used no symbols at all. A fixed list of steps that always ends in the answer — that is what an algorithm is.

You halve the number of the roots, which in the present instance yields five. This you multiply by itself; the product is twenty-five. Add this to thirty-nine; the sum is sixty-four. Now take the root of this, which is eight, and subtract from it half the number of the roots, which is five; the remainder is three.

— al-Khwārizmī, al-Jabr (c. 820), tr. F. Rosen, 1831
Two pages of an Arabic manuscript in black ink, with square diagrams drawn in red at the bottom of each page
Two pages of al-Khwārizmī’s al-Jabr in the copy at the Bodleian Library, Oxford (MS. Huntington 214), with the geometric solutions of two quadratic equations drawn in red: squares and the strips that complete them. Public domain, via Wikimedia Commons.

Fractions with a decimal point

Indian numerals came with a habit: you wrote them in dust on a board, rubbed out as you went, and kept fractions in the old base 60. In 952–953 a mathematician probably working in Damascus, al-Uqlīdisī, wrote a book that changed both. He showed how to do the Indian methods with pen and ink on paper — a calculation you could check afterwards — and, for the first time in any book that survives, he wrote decimal fractions, marking the place where the whole number ends. Raise a number by a tenth of itself, he explains, five times over: write it, write it again shifted one place, add, and mark the point.

al-Uqlīdisī

أبو الحسن الإقليدسي
fl. 952–953 · probably Damascus
His Kitāb al-fuṣūl fī al-ḥisāb al-Hindī (“Chapters on Indian arithmetic”) is the earliest surviving book to use decimal fractions with Hindu–Arabic numerals. The historian A. S. Saidan, who edited and translated it, called that “the most remarkable idea in this work”. It was not taken up widely; the decimal point would be invented again, in Samarkand and then in Europe.
A page of Arabic handwriting with rows of Indian numerals; in one line a small mark above a digit separates whole part from fraction
Folio 61a of al-Uqlīdisī’s Kitāb al-fuṣūl. In line 10 a small vertical mark above the units digit separates the whole part of a number from its fraction: the earliest decimal point we know of. Public domain, via Wikimedia Commons.

A generation of giants

As the caliphs’ power waned in the tenth century, other dynasties took over the patronage of science: the Persian Buyids in Baghdad itself, the Samanids and then the Ghaznavids in the east, the Fatimid caliphs in Cairo. Most of the scholars they paid were Persian.

Abū al-Wafāʾ al-Būzjānī

أبو الوفاء البوزجاني
940–998 · from Buzjan in Khorasan, worked in Baghdad from 959 · Buyid
Computed sine and tangent tables at intervals of a quarter of a degree, by a method that made them more accurate than any before, and found the perimeter of a 720-sided polygon for π. He also wrote an arithmetic for scribes and merchants — the first text of medieval Islam to use negative numbers. The crater Abul Wáfa on the Moon is named after him.
In this course: Unit 7 · tables and interpolation

Abū Bakr al-Karajī

أبو بكر الكرجي
c. 953–c. 1029 · from Karaj, near Tehran; worked in Baghdad · Buyid
Began to free algebra from geometry, treating powers of an unknown as things you calculate with rather than lengths and areas you draw. He gave the triangle of binomial coefficients explicitly, and proved results with an argument by induction — the earliest surviving example of the method. His triangle comes back, under other names, later in this story.

Ibn al-Haytham (Alhazen)

الحسن بن الهيثم
c. 965–c. 1040 · from Basra, worked in Cairo · Fatimid
Remembered for optics, he also found the formula for the sum of fourth powers, 1⁴ + 2⁴ + … + n⁴, and used it to find the volume of a paraboloid by cutting it into thin slices and adding them up — what we would now call an integral, done as a sum.
In this course: Unit 8 · numerical integration
Figure 4 · Ibn al-Haytham slices a paraboloid
Spin the parabola x = y² about the line x = 1, at right angles to its axis. Every slice is a disc of radius 1 − y², so adding the slices needs fourth powers. Discs that stick out overestimate the volume; discs that stay inside underestimate it; the two always differ by exactly 1/n of the cylinder, and both close in on 8/15, the answer Ibn al-Haytham proved. Cutting, summing and bounding the error is how every quadrature rule in Unit 8 works.

Abū Rayḥān al-Bīrūnī

أبو ريحان البيروني
973–c. 1050 · from Kath in Khwarazm; worked in Ghazni from 1017 · Ghaznavid
The polymath of the age. In his astronomical encyclopaedia, al-Qānūn al-Masʿūdī (1030s), he worked with sines on a circle of radius 1 and applied fully developed second-order interpolation to find the values between the lines of his tables — the rule of Figure 2, three and a half centuries on. His sine of 1°, 0;1,2,49,43 in base 60, is correct to the last place; al-Kāshī checked it four hundred years later and said so.
In this course: Unit 7 · second-order interpolation
Chapter V

The Persian algebraists: Nishapur, Tus and Maragha

1048–1274

Al-Khwārizmī could solve any quadratic equation by completing a square. The cubic — an equation with x³ in it — would not yield to the same trick, and it occupied the best minds of Persia for two centuries. The story of how they attacked it is, in miniature, the story of numerical analysis: when you cannot find a formula, find a construction; when the construction will not give digits, find an iteration; and before you start, find out whether there is any root to look for.

Omar Khayyam

عمر خیّام
1048–1131 · Nishapur, Samarkand and Isfahan · Seljuk
Known to the world for his quatrains, he was first a mathematician. Around 1070, in Samarkand, under the patronage of the chief judge Abu Tahir, he began a Treatise on Algebra that sorted every cubic into types and solved each as the meeting point of two conic sections. In the 1070s the Seljuk sultan Malik-Shah called him to Isfahan to reform the calendar; the result, the Jalali calendar, was inaugurated on 15 March 1079 and is the ancestor of the calendar Iran uses today.
In this course: Unit 2 · nonlinear equations
Figure 5 · Khayyam’s cubic: a parabola meets a circle
His type “a cube and sides equal a number”, x³ + cx = d. Write c = a² and d = a²b; draw the parabola x² = ay and the circle on the diameter from 0 to b. Where they meet, x⁴/a² = x(b − x), which rearranges to the cubic itself — so the foot of the meeting point is the root. Change c and d and the construction follows. It gives the root as a length, not as digits; turning it into digits needed another idea.

Khayyam knew what he had not done. He had a geometric solution for every type, but no arithmetic one — no formula into which you could put the numbers and get the root out. He said so plainly, and left the problem open for whoever came next.

… possibly someone else will come to know it after us.

— Omar Khayyam, Treatise on Algebra, as quoted in Wikipedia’s article on him
Two facing pages of a Persian-Arabic manuscript; on the left page a geometric figure in red ink shows curves meeting above a line
Two pages of Khayyam’s Treatise on Algebra, with one of his constructions drawn in red on the left: conic sections whose meeting point gives the root of a cubic. Public domain, via Wikimedia Commons.

al-Samawʾal al-Maghribī

السموأل بن يحيى المغربي
c. 1130–c. 1180 · born in Baghdad; died in Maragha
Born in Baghdad to a Jewish family from Morocco — his father was a rabbi — he converted to Islam in 1163. At nineteen he wrote al-Bāhir, “the brilliant”, which carried al-Karajī’s algebra forward, extended the table of binomial coefficients to the twelfth power, and preserved al-Karajī’s lost induction proofs by quoting them. Historians trace al-Kāshī’s decimal methods back through his work.

Sharaf al-Dīn al-Ṭūsī

شرف‌الدین طوسی
c. 1135–1213 · from Tus; taught in Damascus, Aleppo, Mosul and Baghdad
His Treatise on Equations sorts equations up to the cubic into 25 types, including five that may have no positive solution at all. For those he asked a new question — not “what is the root?” but “is there one?” — and answered it by finding the greatest value of an expression. Then he computed the roots digit by digit, with what we call the Ruffini–Horner scheme, the first person known to apply it to general equations of this kind. In Mosul he taught Kamal al-Din ibn Yunus, who taught Naṣīr al-Dīn al-Ṭūsī.
In this course: Lesson 2-1 · does a root exist?
Figure 6 · Sharaf al-Dīn decides whether there is a root
For x³ + a = bx, look at bx − x³. It rises, reaches a greatest value 2(b/3)√(b/3) at x = √(b/3), and falls. The equation has two positive roots if a is below that peak, one if it just touches, none if it passes over the top. We find the peak by setting the derivative b − 3x² to zero. Sharaf al-Dīn wrote no derivative and did not say how he found the point, and historians still disagree about what he had in mind. Asking whether a solution exists before hunting for it opens Unit 2.

Naṣīr al-Dīn al-Ṭūsī

نصیرالدین طوسی
1201–1274 · Tus, Alamut and Maragha · Ilkhanate
After the Mongols took Baghdad in 1258, he persuaded their ruler Hülegü to build an observatory at Maragha, in north-western Iran, begun in 1259 — a research institute with a great library and salaried scholars. In his Treatise on the Quadrilateral he made trigonometry, for the first time, a branch of mathematics in its own right rather than a tool of astronomy.
Chapter VI

The prince’s calculator: Samarkand and Istanbul

1417–1580

Ulugh Beg, grandson of Timur, governed Samarkand and preferred mathematics to war. Between 1417 and 1420 he built a madrasa on the Registan square; between 1424 and 1429, an observatory on a hill outside the city, its great meridian arc cut into the rock. He wanted new astronomical tables, and tables need computation: sines and tangents, to more places than anyone had ever computed. To lead that work he brought to Samarkand the man this prologue began with.

We know an unusual amount about al-Kāshī, because letters he wrote in Persian to his father in Kashan survive. In them he praises the prince’s mathematics and is less generous about his colleagues: of the Samarkand scholars, only Qāḍī Zāda al-Rūmī earns his respect. He had reason to be confident. In his years in Samarkand he wrote three works that each, on its own, would have made him famous.

Jamshīd al-Kāshī

غیاث‌الدین جمشید کاشانی
c. 1380–1429 · from Kashan; worked in Samarkand · Timurid
The Treatise on the Circumference (1424): 2π to sixteen decimal places. The Treatise on the Chord and Sine: the sine of 1° by an iterative method, to the same accuracy. And the Key to Arithmetic, completed on 2 March 1427: a handbook of calculation that moves between decimal and sexagesimal fractions with ease — historians have judged its decimals as clearly explained as Simon Stevin’s in Europe in 1585 — with binomial coefficients, the solution of triangles, and a method for nth roots that is a special case of the Ruffini–Horner scheme. He died in Samarkand on 22 June 1429. In France the law of cosines is still called le théorème d’Al-Kashi.
In this course: Lesson 2-3 · fixed-point iteration
Figure 7 · al-Kāshī finds the sine of 1° by iteration
The sine of 3° can be built exactly from known chords. The identity sin 3θ = 3 sin θ − 4 sin³ θ then makes sin 1° the root of a cubic, which al-Kāshī rearranged as x = (sin 3° + 4x³)/3: put in a guess, take what comes out as the next guess, repeat. Because the right-hand side barely moves when x changes (its slope is 4x² ≈ 0.0012), each pass fixes about three more decimal places. Shown in base 60 with radius 60, as he wrote it. This is fixed-point iteration, and the slope that makes it work is the subject of Lesson 2-3.
A manuscript page with a ruled table of letters at the top, several lines of Arabic text below, and seals and a signature at the bottom
The closing page of a manuscript of al-Kāshī’s Treatise on the Circumference. The table holds sexagesimal values written in abjad letters, where each letter is a number (ن = 50 and ط = 9, so نط = 59). The paragraph beneath it turns to what Abū al-Rayḥān — al-Bīrūnī — computed for the perimeter of his polygon. Public domain, via Wikimedia Commons.
Figure 8 · The record for π
Correct decimal places of π against the year they were reached. The staircase climbs slowly for three thousand years, then al-Kāshī’s step of 1424 jumps from Madhava’s 11 places to 16, a record that stood until Ludolph van Ceulen’s 20 places in 1596. The dashed line is what a 64-bit double holds today. Records shown in turquoise come from Mesopotamia, Egypt and Persia.
An open manuscript with richly illuminated pages: gold and coloured floral borders framing two text panels, the right one headed by an ornamental arch
The illuminated opening of a copy of al-Kāshī’s Key to Arithmetic, made in Iran and dated 31 May 1656 — more than two centuries after his death, the book was still being copied in luxury editions. Public domain, via Wikimedia Commons.

Ulugh Beg’s astronomers completed his tables, the Zīj-i Sulṭānī, in 1437, with a catalogue of 994 stars and sine and tangent tables correct to at least eight decimal places. Qāḍī Zāda al-Rūmī, the colleague al-Kāshī respected, may have finished his sine treatise after his death. In 1449 Ulugh Beg was murdered on his own son’s orders, and the observatory was abandoned. Its arc lay buried until archaeologists dug it out in 1908.

A deep, narrow stone-lined trench curving down into the ground, with two parallel rails along its floor
What survives of the great meridian arc of Ulugh Beg’s observatory in Samarkand: a curved trench cut into the hill, lined with stone, along which the graduated arc ran. Al-Kāshī worked here. Photograph: Bobyrr, CC BY-SA 4.0, via Wikimedia Commons.

The Samarkand tradition did not end with Ulugh Beg. A century and a half later, Taqī al-Dīn, born in Damascus in 1526, built an observatory in Istanbul for the Ottoman sultan, finished in 1579 — and in his astronomical tables he computed the trigonometric functions in decimal fractions, the first recorded use of decimals for them. In January 1580 the observatory was demolished by order of the state. Five years later, in the Netherlands, Simon Stevin published a little book on decimal fractions that Europe would treat as the beginning of the subject.

Chapter VII

Meanwhile, elsewhere

China and Kerala

This prologue follows one river, but there were others, and two of them run straight into this course. In China, the Nine Chapters on the Mathematical Art, compiled by the first century CE and commented on by Liu Hui in 263, solves systems of linear equations by laying their coefficients out in columns on a counting board and eliminating them, column against column. It is the method you will learn in Unit 3 as Gaussian elimination — some 1,700 years before Gauss.

Figure 9 · Elimination on a counting board
Chapter 8, problem 1 of the Nine Chapters: three grades of grain and three harvests. Each condition is a column of counting rods (units upright, tens lying down), laid out right to left. Multiply a column by the top number of the right-hand column, take that column away until the top place is empty, and repeat; the last column ends as 36 and 99, so the low grade yields 99/36 = 2¾ dou, and working back up gives 4¼ and 9¼. Lesson 3-1 does exactly this, with a matrix instead of a board.
A page of a Chinese printed book in vertical columns of characters, with a commentary in smaller type
The opening page of an 1820 edition of the Nine Chapters. Liu Hui’s name (劉徽) stands among the commentators in the right-hand columns. Public domain, via Wikimedia Commons.

Zu Chongzhi, around 480, pinned π between 3.1415926 and 3.1415927 and found the fraction 355/113, a record that stood for nine centuries. Qin Jiushao, in 1247, solved polynomial equations digit by digit by a scheme close to Sharaf al-Dīn’s. And in Kerala, in southern India, Madhava of Sangamagrama found infinite series for π and for the sine in the late fourteenth century — the start of the series and truncation errors of Lesson 1-3.

Chapter VIII

The hand-over: Europe and the machines

1145–1985

In 1145, in Segovia, Robert of Chester translated al-Khwārizmī’s al-Jabr into Latin. In 1202 a young man from Pisa whose father had taken him to the customs house at Bugia, on the coast of what is now Algeria, published the Liber Abaci, which taught Europe the Hindu–Arabic numerals he had learned there. We know him as Fibonacci. Then the centres moved. Simon Stevin made decimals popular in 1585; John Napier published logarithms in 1614, giving astronomers a way to multiply by adding.

In 1669 Isaac Newton described his method for roots — the Babylonian averaging rule, it turns out, is its special case for square roots — and Joseph Raphson published a cleaner version in 1690. Leonhard Euler stepped a differential equation forward in small steps in 1768. Carl Friedrich Gauss recovered the lost asteroid Ceres in 1801 and published his method of least squares in 1809. Carl Runge (1895) and Wilhelm Kutta (1901) gave the methods for differential equations that still fly spacecraft.

Then came the machines, and with them an old question in a new form. In 1947 John von Neumann and Herman Goldstine asked whether the rounding errors of an electronic computer would ruin the solution of a large linear system. In 1948 Alan Turing studied the same question and named the quantity that decides it: the condition number. In 1985 the IEEE 754 standard, led by William Kahan, fixed exactly how a computer stores a number, rounds it and reports a failure. That standard is the subject of Lesson 1-1. It is al-Kāshī’s question — how large an error can I afford, and can I prove I stayed inside it? — asked a billion times a second.

What they left in your course

Look closely and it is everywhere

You will meet their work in this course without their names attached. Here are the names.

Words
  • algorithm — from al-Khwārizmī, Latinised as Algoritmi
  • algebra — from al-jabr, “restoring”, in the title of his book
  • zero, cipher — from ṣifr, “empty”, the Arabic for the Sanskrit śūnya
  • root — Latin radix, translating jadhr, al-Khwārizmī’s word for the unknown
  • surd — Latin surdus, “deaf”, translating aṣamm
  • sine — jyā → jība → jayb → sinus
  • minute, second — the first and second places of Babylonian sixtieths
Methods with their names
  • Babylonian method — square roots by averaging, YBC 7289
  • al-Kashi’s theorem — the law of cosines, so called in France
  • Khayyam’s triangle — the binomial triangle, so called in Iran
  • Brahmagupta’s formula — second-order interpolation, 665
  • Ruffini–Horner — used by Sharaf al-Dīn, al-Kāshī and Qin Jiushao first
  • Heron’s method — square roots by iteration
  • fangcheng — the Nine Chapters’ elimination
Where these ideas return in the course
Base 60, base 10, base 2 — and one tenthLesson 1-1 · Floating point
A tolerance set before computing (al-Kāshī’s hair)Lesson 1-2 · Rounding error
Infinite series and where to stop (Madhava)Lesson 1-3 · Truncation error
Does a root exist? (Sharaf al-Dīn)Lesson 2-1 · Bracketing
Square roots by averaging (Babylon, Heron)Lesson 2-2 · Newton’s method
sin 1° by iteration (al-Kāshī)Lesson 2-3 · Fixed-point iteration
Elimination on a counting board (Nine Chapters)Lesson 3-1 · Gaussian elimination
Turing’s condition numberLesson 3-2 · Condition numbers
Least squares (Gauss and Ceres)Lesson 5-1 · Least squares
Between the lines of a table (Brahmagupta, al-Bīrūnī)Lesson 7-1 · Interpolation
Polygons doubled, error divided by four (Archimedes, al-Kāshī)Lesson 8-1 · Richardson extrapolation
Slices summed and bounded (Ibn al-Haytham)Lesson 8-2 · Quadrature rules
Small steps forward (Euler, Runge, Kutta)Lessons 9-1, 9-2 · ODE solvers

Turn the page

Here is the thread that runs through four thousand years. The scribe of YBC 7289 wrote √2 in sixties and stopped after three places. Al-Uqlīdisī and al-Kāshī wrote fractions in tens. Each of them knew that the digits they stopped at were not the whole number, and each of them chose where to stop.

A computer counts in twos, and it chooses where to stop for you — a fixed number of binary places, every time. Most of the time you never notice. But some very ordinary numbers have no end in base 2, however harmless they look in base 10. One of them is one tenth.

Figure 10 · One tenth, in three bases
Divide 1 by 10. In base 60 the division ends after one place, 0;6. In base 10, after one place, 0.1. In base 2 the remainders run 2, 4, 8, 6, 2, … and the digits 0011 repeat for ever. A system that keeps 23 binary places throws the rest away, and every tenth of a second it counts comes up short by 0.000000095 s. Let it run for 100 hours.

Dhahran, Saudi Arabia, 25 February 1991. A Patriot air-defence battery has been running for about a hundred hours, counting time in tenths of a second. That is Lesson 1-1. It is where the craft that began on a clay tablet in Mesopotamia meets the machine on your desk — and where you start learning to ask al-Kāshī’s question of every number your computer prints.

End of the prologue
Lesson 1-1 · Floating-Point Representation
Begin the course
Sources and further reading
  • M. K. Azarian, “The introduction of al-Risāla al-Muḥīṭīyya: an English translation”, International Journal of Pure and Applied Mathematics 57 (2009) 903–914; and “Al-Risāla al-Muḥīṭīyya: a summary”, Missouri Journal of Mathematical Sciences 22 (2010) 64–85.
  • A. Aaboe, “Al-Kāshī’s iteration method for the determination of sin 1°”, Scripta Mathematica 20 (1954) 24–29.
  • F. Rosen (tr.), The Algebra of Mohammed ben Musa, London, 1831.
  • A. S. Saidan, The Arithmetic of al-Uqlīdisī, Reidel, 1978.
  • R. Rashed, The Development of Arabic Mathematics: Between Arithmetic and Algebra, Kluwer, 1994.
  • J. L. Berggren, Episodes in the Mathematics of Medieval Islam, 2nd ed., Springer, 2016.
  • V. J. Katz, “Ideas of calculus in Islam and India”, Mathematics Magazine 68 (1995) 163–174.
  • E. S. Kennedy, “The motivation of al-Bīrūnī’s second order interpolation scheme”, Proceedings of the First International Symposium for the History of Arabic Science, vol. II (1976) 67–71.
  • D. Fowler and E. Robson, “Square root approximations in Old Babylonian mathematics: YBC 7289 in context”, Historia Mathematica 25 (1998) 366–378.
  • K. Chemla and Guo Shuchun, Les Neuf Chapitres, Dunod, 2004.
  • The MacTutor History of Mathematics archive, University of St Andrews — biographies of each mathematician named here (mathshistory.st-andrews.ac.uk); the Encyclopaedia Iranica on al-Bīrūnī; the U.S. GAO report IMTEC-92-26 (1992) on the Patriot at Dhahran.
  • Where sources disagree — how the Babylonian scribe found √2, what Sharaf al-Dīn had in mind with his maxima, the dates of the Nine Chapters and of Madhava — this page says so rather than choosing.

Images: YBC 7289, Yale Peabody Museum, CC0; the meridian arc at Samarkand, photograph by Bobyrr, CC BY-SA 4.0; al-Khwārizmī’s al-Jabr (Bodleian MS. Huntington 214), Khayyam’s Treatise on Algebra, al-Uqlīdisī’s Kitāb al-fuṣūl, al-Kāshī’s Treatise on the Circumference and Key to Arithmetic, and the 1820 Nine Chapters are public-domain reproductions via Wikimedia Commons. Coastlines: Natural Earth (public domain).