# Book Review: The Grapes of Math by Alex Bellos

I’m going to try something new on this blog: a book review. For my younger readers, a book is an object made of a series of static screen images printed on cellulose fiber. Think of it as a collection of thousands of tweets, Snapchat screenshots, and Facebook status updates all related by a common “narrative”. Or just ask your parents.

Despite its silly title, The Grapes of Math: How Life Reflects Numbers and Numbers Reflect Life by Alex Bellos is a fascinating look at some of the most interesting developments in mathematics throughout history. Math books often come in one of two flavors. There are the hard-core textbook-style books that quickly get over my head, despite having words like “elementary” and “introduction to” in the title. Then there are the overly simplified and popularized books that lack sufficient depth or patronize readers by refusing to ever show an equation. For me, The Grapes of Math hits the sweet spot between these extremes and does an extraordinary job of providing clear explanations of some really complex and abstract math, while still challenging a numerate reader.

Seriously, is this the best you could do for a cover?

Grapes is divided into chapters each dedicated to a broad topic in mathematics, like number theory, power laws, trigonometry, imaginary and complex numbers, exponential functions, complex systems, etc. Each chapter covers some of the history of the ideas, some explanations of the ideas themselves, and some modern applications or research. It’s by no means a comprehensive review of the history of mathematics or even all the big ideas. But there is plenty of fascinating material, not to mention amusing anecdotes about history’s parade of quirky mathematicians and improbable discoveries.

Rather than try to summarize everything, I’ll just highlight a few of the most interesting bits (for me at least).

One of the my favorite chapters, about power laws, starts by introducing Benford’s law. This law is all around us, present in many real-world data sets, but it’s so unexpected and counterintuitive that it was only discovered a century ago. Benford’s law states that for many real-life datasets, the first digits of each number in the set are not equally distributed as you might expect. In fact, the small digits (e.g. 1,2,3) occur much more frequently than the large ones (7,8,9). In almost any dataset that varies over an order of magnitude (and meets a few other criteria), about 30% of the first digits are one, and less than five percent are nine. This is really weird! Here is the distribution of first digits under Benford’s law:

Probability of first digit under Benford’s Law. Source: Wolfram Alpha

The law was discovered by observing that the books of logarithm tables were more worn on pages with tables of numbers starting with the smaller digits. The log books phenomenon was first noticed in 1880, but then rediscovered by Frank Benford in 1938. Benford found this distribution in all sorts of totally unrelated data sets, like the populations of US cities, areas of river basins, atomic weights of the elements, even baseball statistics.

It turns out that this phenomenon is so widespread that Benford’s Law is used by forensic accountants (yes, that’s really a thing) to look for falsified or manipulated data.

If you want an explanation for why Benford’s Law occurs, you’ll have to read the book.

Another of my favorite parts of the book is about the famous Mandelbrot set. Stunning computer-generated images of the Mandelbrot set, like the one below, are often used to illustrate fractal geometry and chaotic behavior in numeric systems. A fractal is an object (or a set of numbers) that looks similar no matter what the scale. In nature, examples of fractal geometries include the trace of a coastline, the drainage patterns in river basins, the topography of mountain ranges and geologic fault systems.

“Mandel zoom 00 mandelbrot set”. Licensed under CC BY-SA 3.0 via Wikimedia Commons.

When you approach the edges of the Mandelbrot set you see amazing complex patterns that just keeping going (and changing) no matter how far you zoom. There’re really no way to explain with words. You need to see it:

But what is the Mandelbrot set? I must confess that before reading The Grapes of Math I didn’t really know, despite working on fractals as a graduate student in geology. Bellos gives a clear explanation of how the set is generated, which is at the same time incredibly simple and very counterintuitive. The Mandelbrot set consists of complex numbers generated by iterating over a quadratic equation ($\large z_{n+1} = z_{n}^{2} + c$). The numbers that do not go to infinity upon iteration are members of the set, all others are not. The pictures are generated by projecting the set on the complex plane (and sometimes adding color to the edges). That’s all it takes to generate this image of extraordinary, indeed infinite, complexity!

Despite the simplicity of the algorithm, the discovery and implications of the Mandelbrot set were far from trivial. The work of Benoit Mandelbrot (who made the first computer image of the set) helped usher in an entirely new understanding of chaos in deterministic systems.

And if you don’t remember anything about imaginary or complex numbers from high school or college math (I needed a refresher), don’t worry. The Grapes of Math does a good job of walking the reader though it. In fact, the development of imaginary numbers is an extraordinary story in and of itself.

Speaking of high school or college math, this book introduced me to a beautiful equation that I can’t believe I never learned before:

$\large e^{i \pi } + 1 = 0$

This is Euler’s identity, discovered by the brilliant Swiss mathematician Leonhard Euler. It links five of the most basic numbers in mathematics: $\pi$, e (the exponential constant), i (the square root of negative one), zero, and one. Why am I only finding out about this now?

Euler’s identity an example of math at its most elegant and mysterious. Mathematician Benjamin Pierce once said the Euler’s Identity is “absolutely paradoxical; we cannot understand it, and we don’t know what it means, but we have proved it, and therefore we know it must be the truth”.

This is a fitting description for many of the mathematical concepts discussed in The Grapes of Math. The book shows how the history of math is a progression toward greater abstraction, from what we can physically see and count and measure, to concepts like Euler’s identify that cannot be intuitively understood, only discovered through applying mathematical logic.

I highly recommend this book. It’s perfect for summer beach reading, if you’re the kind of person who likes to draw curves and equations in the wet sand by the shore of a fractal coastline.

# Visualizing 100 Years of Earthquakes

My last post was about the 1960 Chile megathrust earthquake, and how much energy it released (about 1/3 of all seismic energy on earth over the last 100 years). I used data from USGS on all earthquakes greater than magnitude 6 from 1915-2015. Since I had this nice dataset (about 10,500 quakes), I could not resist playing around in CartoDB to make some nice visualizations.

This is an animated map of all earthquakes since 1915 using the Torque function in CartoDB. I know this has been done many times, but it makes such a striking image it’s hard to resist. If you watch closely you’ll notice that the earthquakes seem to occur more frequently towards the end of the time lapse (starting in the 1960s). That’s because seismologists got better at measuring and recording earthquakes, not because the quakes actually became more frequent.

This is a heatmap of all quakes in the dataset. The Pacific ring of fire (the arcs of subduction zones encircling much of the Pacific Ocean) dominates the global pattern. The mid-ocean spreading centers are also visible, but not as pronounced the ring of fire. There are fewer big earthquakes in the extensional spreading centers than the compressional subduction zones. There is also a broad zone of earthquake activity that stretches from Italy and Greece through Asia Minor, Iran, Central Asia, the Himalayas, into China. This is a huge zone of compression caused by the African, Indian, and other small plates colliding with Eurasia.

This map shows earthquake depth, with deep earthquakes in red, intermediate depth in orange, and shallow in yellow. Plotting earthquake depth on a map illustrates the geometry of subduction zones. For example, in South America, the ocean crust of the Nazca plate (under the Pacific Ocean) is subducting under the South American plate. As the Nazca plate plunges eastward at an angle, the earthquakes produced get deeper with distance to the east.

You can pan and zoom right in the embedded maps if you are keen to explore. You can also make the maps full screen using the button on the upper left.

# The 1960 Chile Earthquake Released Almost a Third of All Global Seismic Energy in the Last 100 Years

I just saw a trailer for the movie San Andreas. It looks preposterous but I love geology disaster movies, so I’ll probably see it. In the film, a series of earthquakes destroy California, culminating with a giant magnitude 9.5 quake. Fortunately the Rock is on scene to help save the day.

The largest earthquake ever recorded in real life struck central Chile on May 22, 1960. With a magnitude of 9.6 (some estimates say 9.5) this was a truly massive quake, more than twice as powerful as the next largest (Alaska 1964), and 500 times more powerful than the April 2015 Nepal quake. The seismic energy released by the 1960 Chile quake was equal to about 20,000 Hiroshima atomic bombs. Thousands were killed. It also triggered a tsumami that traveled 17,000 km across the Pacific Ocean and killed hundreds in Japan.

But I think the most striking thing about this quake is that it accounts for about 30% of the total seismic energy released on earth during the last 100 years. To illustrate this, I calculated the seismic moment (a measure of the energy released by an earthquake) of all earthquakes greater than magnitude 6 and plotted the global cumulative seismic moment over the last 100 years.

Click for interactive version

This plot clearly shows how the 1960 Chile quake (and to a lesser extent the 1964 Alaska event) dominates the last 100 years in terms of total energy released. This is not always obvious as the earthquake magnitude scale is logarithmic. So a magnitude 9.6 releases twice as much energy as a 9.4 and 250 times as much as an 8.0.

Technical notes: To make this plot I downloaded from the USGS archive data on all the earthquakes greater than magnitude 6 from 1915-2015. There are about 10,500 of them.

I calculated the seismic moment for each quake relative to a magnitude 6 (the smallest in the database) using

$\Delta M_{0} = 10^{3/2(m_{1}-m_{2})}\$

Where m1 is the magnitude of each quake and m2 = 6.

So a mag 9.6 is about 250,000 times more powerful than a mag 6.0. (Note that this refers to energy released, not necessarily ground shaking, which is influenced by many factors, such as earthquake depth).

Then I summed all the relative moments, normalized to 1, and plotted the cumulative seismic moment over the time period.

A few caveats. First, the quality of the magnitude measurements has improved over time, so that the data from the earlier part of the 20th century is not as reliable as the more current data.

Second, this analysis only looks at earthquakes larger than magnitude 6.0. Of course there are many, many smaller earthquakes. However, the cumulative amount of seismic energy released by these smaller quakes is very small compared to the larger ones (again, remember the logarithmic scale).

Third, the magnitudes listed in the USGS archive are calculated in different ways. The majority are moment magnitude or weighted moment magnitude. The equation above is meant for these types of magnitude. Other magnitude measurements, such as surface wave magnitude, have slightly different ways of calculating total energy release. This may introduce some inaccuracies, However, they will be small compared relative to total energy release.

If any seismologists would like to weigh in, I would be most grateful.

Data and R code here. Graph made with Plot.ly.